Re: Local Beta 9.1.0

Please don’t forget WP-CLI 2.11.0.

Thanks for the request, @emmtre.

WP-CLI 2.11 won’t make 9.1.0 but it’s on our radar for an upcoming release.

2 Likes

Thanks for the update. Or even better try to fix the GitHub pull request to handle spaces in PHP binary path. :slight_smile:

1 Like

@nickc

What happened with the Local 9.1.0 release? Did you run into any unforeseen issues?

No reported issues with the beta so far, I’ll post here when we start to roll out the release.

1 Like

@emmtre 9.1.0 is out now. Releases - Local

1 Like

The nginx version was updated from 1.16.0 to 1.26.1. Existing sites are automatically upgraded.

@nickc

Thanks for the heads up. Starting up and provisioning the old nginx sites the very first time after updating to Local 9.1.0 took hell of a time and my MacBook Pro locked up for a while the CPU load spiked. But after a while everything settled down and the CPU load went back down to normal. Changing the PHP version works as usual but there is something strange about the nginx version. It looks like Local is trying to download the old 1.16.0 nginx version and not recognizing 1.26.1 as the actual version. You see the download icon in front of the Nginx name in the drop-down menu? And then Local is trying to change the web server version from “nginx to nginx” and download 1.16.0. But the only nginx version downloaded in the lightning-services folder is the new 1.26.1. Please see the attached screenshots.

1 Like

Thanks for the report, @emmtre. I just made a change to the lightning services server to ensure that nginx 1.26.1 appears as available. If after restarting Local you see the same issue, can you share your logs, please?

1 Like

@nickc

Unfortunately, the same issue still exists. The only thing that happened after you made the change to the server was that PHP 8.3.11 was available to download. When I tried to update PHP version to 8.3.11 for the test site the Local app crashed and I couldn’t open any sites after that. I got the usual “Uh-oh! Unable to provision site” plus some other error messages. So I had to wipe the entire installation of the Local app and save all my sites before installing Local again. I will send the logs in a private message but you will only see the latest log messages from when I tried to change the nginx server one more time. I know I should have taken some screenshots and saved the old logs but I was in a rush and just wiped the Local installation using an app I have to delete apps with all their files.

I had to wipe the entire installation of the Local app and save all my sites before installing Local again.

Sorry for the extra work here and thank you for the logs. To be clear, are you now able to use your sites under Local 9.1 after the reinstall?

1 Like

No problems. I have a good structure with a recovery plan, backups, config setup scripts, etc in case something happens. I’m more surprised what the hell happened when I chose to update the PHP version and why the Local app crashed so hard. So after some work I’m back in the game again but the nginx version issue still exists. Do you have any idea why the Local app doesn’t recognizing 1.26.1 as the actual nginx version?

@emmtre Thanks for the update and sorry for the trouble here. I couldn’t repro this in repeated testing so far (all sites upgrade from earlier nginx, are recognised as nginx 1.26.1, run without error).

Do you have any idea why the Local app doesn’t recognizing 1.26.1 as the actual nginx version?

It could be that ~/Library/Application\ Support/Local/lightning-services/nginx-1.26.1+3 is missing, corrupt, or the wrong architecture for your current system. You could try resetting lightning services on your system by copying a fresh version from the ones that Local bundles:

  1. Quit Local.
  2. Open the Finder and choose Go → Go to folder.
  3. Input this path including the leading ~/ and press enter: ~/Library/Application Support/Local/
  4. In the “Local” folder that opens, find and delete the lightning-services folder.
  5. Start Local.
  6. Try to start your site.

If that doesn’t help, you’re welcome to DM your sites.json file for review in case there’s an irregularity there. (It’s at ~/Library/Application\ Support/Local/sites.json.)

1 Like

@nickc

I couldn’t repro this in repeated testing so far (all sites upgrade from earlier nginx, are recognised as nginx 1.26.1, run without error).

All nginx sites are working and running 1.26.1 after the first hiccup. But that damn download icon in front of the Nginx name in the drop-down menu is still there. My guess is that it’s a bug in the web server change logic and the nginx version hasn’t been changed everywhere? The screenshots above is from when I try to change from nginx to nginx (with the download icon). Don’t you have the download icon in front of the Nginx namn in the menu?

It could be that nginx-1.26.1+3 is missing, corrupt, or the wrong architecture for your current system. You could try resetting lightning services on your system by copying a fresh version from the ones that Local bundles.

I already tried that several times. It was the first action I did earlier today even before the Local app crashed. And then again when I wiped the entire Local app installation including all the files in the Application Support folder.

@nickc

Do you have any use for the macOS crash reports? It looks like it was the php and php-fpm processes that caused the Local app to crash earlier when I updated the PHP version. Tonight the Local app had frozen in the background (no response in activity monitor) without any sites running so I had to force quit. I also have the macOS diagnostic reports from when it happened if you want to have a look. But the strange thing is that it says that the Local version is 9.0.5 (9.0.5.20240709.2) in the macOS logs?

From your screenshots it looks like your site is running nginx 1.26.1 (top-most ticked nginx version) and the switch happened correctly, but Local is offering the older nginx to optionally download and switch to. (You’ll see that download icon if the other nginx version is not available on disk.) We may need to do some work to at least label the versions differently to make that more clear, or to only show the latest version. It does not look like an indication that you need to change anything with those sites if they’re running under nginx 1.26.1, though (you’ll see the version in response headers).

…the strange thing is that it says that the Local version is 9.0.5 (9.0.5.20240709.2) in the macOS logs?

That is strange, I wonder if it crashed during the upgrade? If you continue to see crashes under 9.1, feel free to DM the logs. Thanks again for these reports.

1 Like

@nickc

From your screenshots it looks like your site is running nginx 1.26.1 (top-most ticked nginx version) and the switch happened correctly, but Local is offering the older nginx to optionally download and switch to.

Yes, that’s exactly what’s happening and as I also understand it. I guess you also can see the nginx version with the download icon in the drop-down menu in your installed Local app as well or is it just in some macOS installations? When I choose the nginx version with the download icon the dialog says that version 1.16.0 will be downloaded but nothing happens then even if the next message says nginx swap is starting. I have looked everywhere and the only present nginx version is 1.26.1 on my machine and in the Local app. Also verified in the in response header that all the sites are running nginx 1.26.1. Are there any json file in the Application Support folder that might have been corrupt or has the wrong nginx version?

We may need to do some work to at least label the versions differently to make that more clear, or to only show the latest version.

As far as I can remember, you have only been able to switch between the latest Apache and nginx version and you have had no choice to be able to use any other version of Apache or nginx than the bundled one.

That is strange, I wonder if it crashed during the upgrade? If you continue to see crashes under 9.1, feel free to DM the logs. Thanks again for these reports.

No Local crashed after I installed the new version and when I tried to switch to PHP 8.3.11 for a site. And when the Local app had frozen in the background, it was several hours later after the update. I’ll send you the logs anyway if you can see anything special but they all say I’m using 9.0.5 which is not true at all which is very strange. Is there a process name or version string in the Local app that hasn’t been changed or any cached files in the Application Support folder that Local is using?

Has the CDN for latest been updated?

When I choose the nginx version with the download icon the dialog says that version 1.16.0 will be downloaded but nothing happens then even if the next message says nginx swap is starting.

I have looked everywhere and the only present nginx version is 1.26.1 on my machine and in the Local app.

We’ll likely remove the option to swap between nginx versions in the next release. Local does not support hot-swapping of nginx (only swapping between nginx and Apache), so you may not be able to download nginx 1.16.1 again if it’s not already on disk — you’ll only have the 1.26.1 version that now ships with Local.

Thanks for the screenshots showing nginx is running 1.26.1. You should be able to continue running new and existing sites with that, but will have to ignore the doubled ‘nginx’ in the site info pane until we remove it. I’m sorry for the confusion in the meantime.

Is there a process name or version string in the Local app that hasn’t been changed or any cached files in the Application Support folder that Local is using?

Version bumps are automated (we specify them at build time and our build system bumps and includes the new version in the release) and we have not changed our release or bundling process recently. Version strings in the built version all look good to me. macOS reads version strings from the bundled version. You can confirm bundled version strings are correct with plutil like this:

plutil -p /Applications/Local.app/Contents/Info.plist | grep CFBundleVersion

You should see:

  "CFBundleVersion" => "9.1.0.20241003.1"

If you see 9.0.5… then Local is not at 9.1.0.

The 9.0.5 in the crash logs you sent via DM suggest either an outdated crash report, incomplete update, multiple copies of Local installed, or — possibly — Apple’s launch services somehow caching old application version metadata.


Has the CDN for latest been updated?

Yes. Lightning Services and Local CDNs are updated. Rollout for 9.1 is currently set to 25% (a quarter of automated checks will receive an update notice, although manually checking for an update always tells you if there is one or not).


@emmtre I’ll reply to your crash report via DM.

If folks in this thread have further questions about multiple nginx versions, unexpected Local versions in crash reports, crash reports from PHP/Local, or Local’s CDN perhaps we could start new topics for those to keep threads focussed on single issues.

1 Like

@nickc

We’ll likely remove the option to swap between nginx versions in the next release.

Good, back to normal then in the next release and also to avoid any future confusion about nginx versions.

macOS reads version strings from the bundled version. You can confirm bundled version strings are correct with plutil.

Yes, I checked that as well when I was trying to figure out what was wrong and the contents of the plist itself.

An outdated crash report, incomplete update, multiple copies of Local installed, or possibly Apple’s launch services somehow caching old application version metadata.

Since it is the logs from the crash and I replaced the Local app and it also was the only version installed it must have been old cached application version metadata for some reason.

Thanks for all the help and for clarifying the reason why there are two nginx choices in the menu even though one doesn’t work.

1 Like