Latest 2.4.0 update can break all sites... again... if you update the environment

Have run the gauntlet that is updating Local by Flywheel this morning - updates are meant to make things better, right?

Anyway, my issue is exactly the same as this one except without the issue of the VM running out of disk space: WordPress Installation Fails and can't connect to Database

sigh

Creating new sites fail and updating old sites with the ā€˜New Environmentā€™ also causes them to fail but old sites working on the old environment (PHP 7.1.7 and MySQL 5.6.37) still work. I darenā€™t touch that ā€˜Update Environmentā€™ button if I want to get any work done today!

Ok, a quick update:

It turns out I can create new sites but only if I use a custom environment, choosing nginx, PHP 7.1.4 and MySQL 5.6 as the options. If I use the ā€˜Preferredā€™ environment that Flywheel recommend, creating a new site fails, as per the thread linked to above.

I used to only use Custom environments but switched to Preferred as I was running into issue using Apache instead of nginx.

Itā€™s a workaround, for now.

Yeah it surely breaks excisting site. Now I get this " 502 Bad Gateway"
Anyway to role back to former Local install. ??

I donā€™t think thereā€™s a way to role back to a previous version as the update will alter the VM.
Replacing the app in Applications alone wonā€™t work.
Unless you have a backup e.g. in Time Machine you can restore from?

Yes, I can confirm exactly this issue with 2.4

Do not try upgrading environment - it will break your site

This is strange.
I updated both on windows and mac to Local 2.4.0 and updated the preffered envoirments of 3 sites. All work fineā€¦

I updated and get the error 502 too, but before I to update, I created a zip with my sites so I just need import them using Flywheel and works fineā€¦

Edit: The first site I updated using ā€œCloningā€ option and the Clone works fine.

Sorry to hear of otherā€™s having trouble.

I however can report the update to 2.4 on macOS went fine for me.

I will note that updating environments on several sites did fail, harmlessly. Unable to backup MySQL (but Iā€™ve always gotten that from time to time and it never harms anythiing Iā€™m aware of ā€“ we donā€™t work local on DBs).

Closing and restarting Local, then restarting the sites and again initiating the enviroment update I was eventually able to get them to update.

Iā€™m really not sure why they were failing (half of them Iā€™d say), but I think itā€™d fail more often when I was trying to update more then 3-4 sites at once (some of which are very large sites).

The other thing you might want to try is to CLONE UPDATE. Then delete the clone (really), then go back and update the original. This often works for me.

Loving dark modeā€¦

Finally, for those updating to PHP 7.2. 7.2 is is known to still break a LOT of pluginsā€¦ yeah you can do it, but be careful youā€™re not blaming new PHP fatals due to 7.2 on Local.

1 Like

Thanks, thatā€™s helpful. Your clone then update then delete clone method sounds interesting.
Iā€™ll look into those suggestions and see if I can get a site to update to the new environment properly.
For clarity, iā€™ve tried restarting local, VirtualBox, and my computer but to no avail. Iā€™ve only updated one site to the new environment so far but thatā€™s the broken one. Creating new site using the new environment was a no go too.
Itā€™s arguable though that none of the above should be necessary when updating Flywheel, ever.

I havenā€™t had any issues with PHP 7.2 and any plugins personally but thatā€™s good to know too.

I confirm also that I got ā€œ502 Bad Gatewayā€ page after update environmentā€¦ I must go back to custom environment to make it work again

Trouble here, as well. A few more observations:

If I have Faster Docker Volumes turned ON , I get I get the WordPress installation screen (Choose a language).
If I have Faster Docker Volumes turned OFF , I get ā€œError establishing a database connectionā€.

More disconcerting is the message that I get when I try to log in to the database via Adminer: ā€œNo tables.ā€

Iā€™ve never been able to use Faster Docker Volumes. Itā€™s never ever worked for me in Local by Flywheel.

As much as I was hoping to work this issue through and determine what the root cause was with this, Iā€™ve got a client deadline and had to pull my live site back into Local and get back to work.

With that said, Iā€™ve got well over a dozen sites that are due for an environment update - this was my first. Iā€™ll continue to post my results here and keep the gang at Flywheel Engineering in the loop.

In project-name/app/sql I see all the tables, but when I tried viewing the database via Sequel Pro I got this error:

Unable to connect to host 192.168.75.100, or the request timed out.

Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).

MySQL said: Canā€™t connect to MySQL server on ā€˜192.168.75.100ā€™ (61)

Iā€™m having the same issue as zforsman above. Crazy issues with connecting to a db among other things.

Same here. All my sites are out of whack.

1 Like

Just updated to 2.4.1.

I did have an issue installing after it downloaded the update via the in-app update mechanism. Had to resort to downloading Local 2.4.1 from these forums and overwriting the app in the Applications folder.

I then tried to update a fairly non-critical site to the new environment from a custom environment using the new ā€˜update and cloneā€™ method and this seemed to work at first but then started to hang and failed to complete. The site itself is tiny so I donā€™t think the size is an issue. I then canceled the clone migration to the new environment and deleted it. Now, for some reason, even though the original site seemed to be untouched, I cannot start it at all. Everything looks fine - itā€™s still a custom environment and PHP and MySQL seem to boot however, it wonā€™t move beyond the ā€˜Startingā€™ phase. Accessing in the browser gives the standard 502 error message. Looks like I still wonā€™t be attempted to update any sites.

Do these releases even get tested?

A quick update: The site was stuck ā€˜Startingā€™ but I right clicked on the site and clicked ā€˜Startā€™ again and it then started and gave the green light next to the site. Unfortunately, it still gave the 502 error when trying to access it in the browser. I could SSH into the site successfully though.

Right clicking on the site and selected Show in Finder has allowed me to delete the ā€˜confā€™ folder, rename the ā€˜conf-custom-1-3-1ā€™ folder to ā€˜confā€™, restart the site, and this got the it working again.

Another quick update: The update to 2.4.2 seems to have fixed most things for me this morning.
Updating and cloning a custom environment to a preferred one still has issues but I can now upgrade from custom to preferred and preferred to preferred environments again. Hurrah!