Local UI Showing Websites in a "Start" State Incorrectly - macOS

Issue Summary

Local shows site(s) as running when they are not. Attached screen shot shows one site with green dot, but sometimes the site below the top one also shows a green dot so that it appears 2 sites are running. But in fact, there are no sites running. Confuses things.

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    Uncertain, but definitely more than a couple.

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

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!
See Screen shot.

System Details

  • Which version of Local is being used?
    Local 6.7.2+6375

  • What Operating System (OS) and OS version is being used?
    MacOS 12.6.6 (Monterey)

  • Attach the Local Log. See this Help Doc for instructions on how to do so:
    Attached.

Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
local-logs.zip (233.1 KB)

Hi @NdnaJnz

It seems like you’re running into a similar issue as some other users. There is a thread with some more detail here most recently for context. I’m checking with the team on this now to get this looked into further:

1 Like

This is not a new issue, as I’ve been seen it for at least 6 months. A search here found only older posts, but I did not find one with a resolution.

I’ve attached a bit more info: screen shot showing 2 sites supposedly running, but neither of them are. I have also seen up to 3 sites in this mode/status.

Hi @NdnaJnz - Apologies, I wasn’t trying to insinuate this was a “new” issue but merely linking the latest post related. I’ve shared all the related posts with the team and they are going to look into this further. We may end up merging all of the posts into one large “Bug” thread. Stay tuned!

1 Like

Hi @NdnaJnz - there is a known fix; the bug is due to erroneous data in your sites.json file. You can follow along in this thread on how to fix it. It involves opening that file, and deleting the “status: running” line for the sites affected.

I’m going to merge this to a bigger bugs post and I’ve created a ticket for the engineering team to look in to.

Hah! No insinuation taken, Nick! I understand merging only helps us all when searching for a topic.

3 Likes

I can’t find my sites.json file where you supposedly can fix this. Where is this supposed to be located (on MacOS)?

@abroes
You can find sites.json here on macOS:
~/Library/Application Support/Local/sites.json. <=== This is an invisible directory

NOTE: On my system, there is both a visible and an invisible directory. It’s the invisible one that contains the path shown above.

Once you’ve located the file, you can open it in Visual Studio Code or similar editor. If you’re using VSC then you’ll need to use the ⇧⌄F command to format the json document in a way that’s suitable for editing.

Then, do a search in the sites.json document on the word “status”. This will likely reveal the following attributes:

    "__typename": "Site",
    "status": "running",

You’ll want to delete both of these attributes per @austinwendt advice above.

Also, you’ll probably find a set of these attributes corresponding to every site that you have in Local that is exhibiting the unwanted behavior, i.e. always showing a “Started” stated in the Local UI.

In my case I had (3) such sites. Once these (6) attributes were removed, Local was launched and is now functioning normally, i.e. no more sites showing as started in the UI.

NOTES:

  1. Be sure to backup your sites.json file prior to making any edits
  2. Be sure to close down Local prior to making any edits to sites.json
  3. Kudos to @austinwendt 
thank you!..your solution is working as far as I can tell
1 Like

@webworx thank you so much for the detailed instructions, that was exactly what I needed and it works like a charm now! So glad to be finally rid of this annoying issue. I appreciate it!

1 Like

@abroes
No problem and glad to hear that you got things working properly
really it’s kudos to @austinwendt whose tip was the trick. :+1:

2 Likes

Hi @webworx - thanks for helping @abroes out!

As an update to everyone,

A fix for this issue is merged and is waiting for release as the Local engineering does some internal testing.

It should be out to users next week! :crossed_fingers:

In the meantime, it is expected that sites can still get into this state so please use the steps mentioned above.

Thank you,

Sam

1 Like

Bug Summary

When we activate a site to “start”, sometimes in the sidebar, I see a website randomly running while it’s actually NOT running and I did not touch it. And when I click on it, the site is not even active.

Steps to reproduce

I open Local and go to a website title or create a new one and start the site. Then the last site that was open appears to be active in the sidebar.

Environment Info

Describe your environment.

  • What Operating System are you using? MacOS 13.4.1 (22F82)
  • What versions of site software (Nginx, Apache, PHP, MySQL) is used? N/A but Nginx
  • What version of Local is installed? 7.0.2+6395

Supporting info

Please provide your Local Log. See this Community Forum post for instructions on how to do so:

local-logs1.zip (108.7 KB)

Include any screenshots or video recordings of the issue to help others reproduce.

Screenshot of when I go to one website that is inactive but “green”

@sambrockway, does the upcoming version try to correct the erroneous data in the sites.json file, or does it just prevent the issue from happening in future?

Hello @burt!

Thank you for your question.

The sites.json file should be corrected for both new & existing sites with the fix in this release.

Sam

3 Likes

Great to hear that it’s a complete solution!

2 Likes

FYI –
I was just able to fix this by editing the sites.json file. However, I had tried that with 7.0.1 and it did not help. Since I updated to 7.0.2+6395 last night, and again edited the sites.json file, I have not seen this problem. I hope a general explanation of the fix (hopefully in 7.0.3?) can enlighten us. While this anomaly was certainly not a showstopper, it was rather annoying, especially when we do have 2 or 3 sites actually running, and then 1 or 2 random sites “pretending” to be running.

1 Like

Hey @NdnaJnz - absolutely, happy to provide a better explanation. The good news is this is released and live with Local v7.1, so the fix is out!

Explanation - Local uses TypeScript on the front-end and GraphQL to query for many things, including a site’s status (running vs. not). The underlying bug was caused by a type mismatch that caused the wrong properties to be written to the sites.json file. To @burt’s question above, in the fix we fixed the improper types to address the root. We also changed how we determine if a site is running or not, so that even in the event bad data is written to sites.json, it won’t affect Local’s UI for displaying that status to the user.

Hopefully that helps!

1 Like

Austin –
Thanks a ton for the detailed technical explainer. It’s so nice to have a host willing to share such info, and acknowleging some of us Lcal users are actually quite smart and technical. :wink:

Cheers,
Jeff

2 Likes

Of course! Lots of brilliant developers out there using Local and pushing WordPress forward; just doing what we can to make it easier. :slight_smile:

2 Likes

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