Debugging Error 502

Issue Summary

One or two sentence summary of the issue.

Unable to start any local websites and can’t debug it.

  • Does this happen for all sites in Local, or just one in particular?

All the sites I’ve created

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?

No, the site will start but it will show the same error

Replication

I don’t know what caused the problem. Sites were working and then, suddenly they gave me 502 errors.

I tried the following:

  • Reboot the computer
  • Restart Local
  • Wipe out browser data
  • Switch to secondary browsers
  • Reinstall Local 4.9.2
  • Reinstall the previous version
  • Move the files to a different location, delete and recreate the site.

System Details

  • Which version of Local is being used?

4.9.1 and 4.9.2 (latest)

  • What Operating System (OS) and OS version is being used?
    macOS Monterey 12.15.1

  • Attach the Local Log. See this Help Doc for instructions on how to do so:
    local-lightning.log (704.0 KB)

Hi @caraya - thank you for bringing your question to the Local community. :wave:

To clarify, the latest version of Local is 6.4.2 - is that the version you are using? You mentioned 4.9.1 and 4.9.2 in your thread.

You can view the latest Local releases here:

Let me know if upgrading Local helps (I’d recommend making a backup of sites before doing this).

Sam

Yes, both 6.4.1 and 6.4.2 exhibit the same problem, and neither of them worked. I’m assuming some hidden preference remains that is breaking things.

Got it @caraya -

Do you have any special Local configurations you’ve set up in the preferences?

For example, what are you using as your Router mode?
Local > Preferences > Advanced > Router Mode

What do you have set for your Default browser?
Local > Preferences > Appearance & behavior > Default apps

Thanks!

Sam

No, I do not.

I haven’t changed anything from the default settings for the application. It is set up for Site Domains. This was working until a few days ago but it stopped.

I have tried the system default, Firefox, and Chrome as the default browser.

I did some more troubleshooting and when I change the router mode to localhost, it now works without a problem. Still trying to figure out why

1 Like

Is there any movement on this?

Having Local working is not the same as having it working correctly. HTTPS will not work with the localhost option

Hi @caraya! If Local is working while you have your Router Mode changed there is likely a conflict with another application or program. You can try using the guide here to check for anything that may be conflicting: What is Router Mode? - Local

This wasn’t the problem, The command didn’t return anything running on port 80. I think I know what the problem is.

I followed the steps in the What is Router document and hit the SSL problem listed in Managing a Local site’s SSL certificate in macOS .

New Problem is that Monterey won’t even let me create the certificate so the keychain access solution listed in the SSL article doesn’t work for me.

will try doing this again once I’ve had a time to rebook the machine

1 Like

It didn’t work. Changing the router configuration to site domains keeps returning a 502 error.

Rebooted the machine and reinstalled Local.

Is there a way to wipe all the Local preferences from my machine when I uninstall? I’m starting to think it may be some lingering settings left somewhere

Delete Local
Install via homebrew
brew install --cask local
brew uninstall --cask --zap local

I think that should remove all of Local’s preferences.

Hi @caraya -

Andy (@afragen) offered some suggestions - did you happen to try that?

Sam

Updating to 6.4.3 fixed the issue.

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.