Issue with sites outside C:/users and startup/welcome

Hi there,

I’m installing on my local machine at home (tried it at work and had no issues after disabling Hyper-V).

I’ve encountered several problems on my home system while trying to get Local setup, and have been able to solve most of them, however a couple have persisted.

The first is starting Local up. I’m consistently being presented the welcome screen when starting Local _every_time. At work it jumps straight to the sitelist, so I’m not sure whether this is intentional. Sometimes the VirtualBox field is filled, sometimes the Host Machine is. Most of the time it doesn’t progress past this screen (usually finishes VirtualBox and then tries to start Local Image and just hangs), so a restart of the program usually fixes it. Though it seems odd to have to start the program twice to get it to work.

I had a look at the logs for when this happens. From boot to failure (hanging after finishing VirtualBox, starting Local Image):

Apr 25, 2018, 3:38 PM GMT+10 - info: [main/virtualbox-installer-windows] Starting VirtualBox Install...
Apr 25, 2018, 3:38 PM GMT+10 - info: [main/virtualbox-installer-windows] VirtualBox installed!
Apr 25, 2018, 3:38 PM GMT+10 - info: [docker-import-image] Checking for Local Docker Image...
Apr 25, 2018, 3:38 PM GMT+10 - info: [main/set-docker-env] Getting Docker Machine env.
Apr 25, 2018, 3:38 PM GMT+10 - info: [main/set-docker-env] Received Docker Machine env. 
Apr 25, 2018, 3:38 PM GMT+10 - error: [main/index] TypeError: Cannot read property 'forEach' of null
    at exports.default (C:\Users\Chris\AppData\Local\Programs\local-by-flywheel\resources\app.asar\helpers\process-exports-vars.js:1:806)
    at _child_process2.(anonymous function).(anonymous function) (C:\Users\Chris\AppData\Local\Programs\local-by-flywheel\resources\app.asar\main\actions-docker\set-docker-env.js:1:2415)
    at ChildProcess.exithandler (child_process.js:224:5)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at maybeClose (internal/child_process.js:899:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

The second issue is with creating sites outside of the C:\Users folder. I checked that Local does support this (since an earlier 2.x version) but I end up with issues both creating and accessing the sites. Creating the site gives an “Error! WordPress installation failed.”, and attempting to access the site gives either a 403 error or a Local Routing Error, depending whether the installation failed to properly create the public folder (and all its contents) or something else failed. Based on the log, Local appears to either have issues copying WordPress over (the 403) onto a different drive, or issues running install-wp.sh (routing error). Database also appears to be missing for the routing error.

I guess everything sort of works, but would appreciate getting Local to work at full capacity would be awesome. I can delete the log and paste a full one of the start to failed site creation process if you’d like too.

Thanks!

Hi Chris,

Sorry for the trouble! Also, thanks for the log snippet and details.

Regarding the startup issue, can you try manually upgrading VirtualBox? Here’s how:

  1. Quit Local if it’s running
  2. Download and run the following installer: https://download.virtualbox.org/virtualbox/5.2.8/VirtualBox-5.2.8-121009-Win.exe
  3. Re-open Local

As far as the 403 error goes, can you send the entire log? Also, is Faster Docker Volumes enabled under Preferences » Advanced?

Hi Clay,

Good news! Managed to fix it in the end. There were definitely some quirky issues - so if this happens again to someone else hopefully you’ll be able to debug it super quickly.

So after you suggested to install Virtual Box manually to the latest version, I double checked to see whether I had the latest (I did remember installing 5.2.8 during my initial run of trying to fix local). Opened it up and said it was 5.2.4, which was probably the version I updated it to when I updated Vagrant/VVV.

I thought that was odd, but then just updated VirtualBox to 5.2.8. Opened Local and had the same issues. After a bit of back and forth of reinstalling VirtualBox, Local and restarting my machine I noticed that whenever I reinstalled Local it would replace VB with 5.2.4.

A “quirk” with my system is that I don’t often install programs to the default location, so in this case I had VB under a different directory still on the C:/ drive. Checking Local’s logs, I saw that it was trying to reference the default location for VB - under C:\Programs\Oracle\VirtualBox, and obviously not finding it. So I installed VB to its default location, and everything worked. I guess this was the reason for all the errors, though I’m not sure why Local was replacing VB with version 5.2.4 every time it was starting up.

For reference, here was the screen I was getting every time I was starting Local up before I fixed it all: Welcome to Local by Flywheel.

Thanks!

Hey @chrismheath,

Glad you got it sorted! Also, thanks for the details!

This will be addressed with Local 2.3 which should be officially released soon!