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)
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:
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!
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.
@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:
Be sure to backup your sites.json file prior to making any edits
Be sure to close down Local prior to making any edits to sites.json
Kudos to @austinwendt âŠthank you!..your solution is working as far as I can tell
@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!
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:
@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?
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.
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.
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.