If you’re trying to pull a site from one of your Flywheel slots and Local is giving you strange errors, the fix is simple.
Simply log out in the Connect to Flywheel tab and reconnect. While you’re at it, make sure you’re running the latest release version of Local.
Now for a little more of an explanation.
Error Pulling Site Scenario
You click on the Connect to Flywheel tab and under Available Sites, you select Pull to Local. It goes through the motions and when it’s done you see this error:
The site shows up under Local Sites but doesn’t start and your directory doesn’t have the site listed.
You restart your web environments and the entire Local application. When it starts back up you get different errors.
Looking at the overview of your newly pulled site you see the environment is unavailable, thus unable to even start.
You also get a popup error that stipulates the same thing. The environment is undefined.
And you also see an error heading stating the site container is missing as well. Boy, Flywheel really wants you to see there is something wrong! This isn’t a bad thing.
At this point, you realize that you changed your email or password to your Flywheel account. Flywheel uses a security token to associate your account and now your old token is invalid. Unfortunately, they do not prompt you or error anything out before this point.
You click on the Connect to Flywheel button and look for your account options in the top right of the application.
You click on your name and click log out.
You can restart here if you want but the goal is to reauthenticate your account. You’ll be redirected to their web service and they’ll ask permission to redirect you back to Local.
Giving it another try, you’ll find yourself in familiar territory. Flywheel is packing up the files to get ready to transport. This can potentially take a while.
Now you will see the actual pulling dialog showing the data transfer.
Finally, before we’re able to view the pulled site, you’ll see all the files that need to extract.
That’s it, then everything will be back to normal.
Potential Fixes For Other Issues
So if you see any weird errors like:
- Unable to back up database after stopping site
- Other SQL issues
- Can’t push or pull site to or from flywheel due to the sites not being recognized as WordPress setups when they really are
- Site container is missing
- And potentially more
It goes a long way to stop all running sites and try the following:
- Make sure you’re running the latest stable version of Local
- Try to start and stop each site
- Restart Local
- If you have Virtualbox installed, use the window preview to make sure Docker and other Flywheel initiated routines are starting
- Sometimes stopping and restarting Local may be necessary multiple times depending on resources
- Try restoring any affected sites
- For pulling or pushing sites, you will need to have them running for the push or pull buttons to actually work
- Click on the Connected to Flywheel cloud icon on the left menu of Local
- Then in the top right corner, click on your name and log out
- Then log back in
- Click Accept
- Open or allow when it prompts you to and then everything will be back to normal in Local
Hopefully, this helps other people out there. Local by Flywheel is a great web development application but sometimes it can be irritating to work through all the issues.
Fortunately, they are descriptive enough in their error reporting to give you context. And if they weren’t they have system logs and router logs. That’s always appreciated.
Other than that, you can check out their community forums at the Local by Flywheel Community.
Do you use Local? If not, what local web development application do you use? What are the types of errors you come across?