./launcher rebuild app: failing out of nowhere (NoMethodError)

AI-generated summary

A user encountered a NoMethodError during a ./launcher rebuild app command, traced to an invalid after_ssl block in app.yml. The issue persisted even after removing a newly installed plugin, suggesting the problem was unrelated to the plugin. After removing the problematic after_ssl block, the rebuild succeeded. Falco suggested the block was likely added long ago and forgotten, emphasizing that staying close to a standard install reduces issues. The user confirmed HTTPS remained functional, and the issue was resolved. minipunch thanked the community for the help.

NoMethodError: undefined method `[]' for nil:NilClass

in /pups/lib/pups/replace_command.rb:17

Pretty simple problem I am having, really.

  1. had a working forum

  2. just a few days ago decided to try installing a new, official plugin (this one)

  3. a) tried installing it, got the error pictured above
    b) tried without the plugin, still get the same error

  4. stuck and now can’t use the forum at all

  5. made this post

  6. hope for a response or will have to find another forum software to use lol

thanks

FYI I have been able to install a couple other plugins successfully previously and was using the official plugin installation guide; so I do not believe it is related to the plugin.

EDIT:

Could I have accidentally deleted some contents of app.yml?

That is the only section I was modifying and that is what it looks like currently. Should there be more “params” (I guess you’d call it) for the replace directive?

Why do you have this after_ssl block?

Not sure, I didn’t put it there manually lol. I believe the ./discourse-setup script added that or it was there by default. I know I did not and I am the only one with access to the server.

I don’t think discourse-setup does that.

In this case, let’s remove all lines from the after_ssl line until the end and try a rebuild.

So I tried that and it does indeed let the rebuild finish, which makes sense.

What doesn’t make sense to me right now is why or how that line was there, I just hope it doesn’t somehow effect the Let’sEncrypt settings stuff down the line

It seems like HTTPS is still enabled (according to my browser), so :man_shrugging:

So thanks! (for now, and hopefully I won’t be back anytime soon :joy:)

Well, you probably added that ages ago and forgot about it :stuck_out_tongue:

Good thing it’s working. The closer you are to a standard install the less likely it is to break!