Error when selecting site from sidebar

Hey @clay!

I’m using the pre-release of Local 2.3.0.
I’ve restarted Local’s machine and restarted Virtualbox.
I’m on a Mac running 10.13.4

When I try to select some, not all, sites in Locals sidebar I get the following error.

This is in my log.

May 6, 2018, 5:25 PM PDT - info: [main/index] Existing Pressmatic data does not exist.
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Environment does not have package.json: /Users/afragen/Library/Application Support/Local by Flywheel/environments/custom/package.json
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Loading Environment: /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/environments/custom-1-0-0/out/environment.js
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Successfully Loaded Environment: /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/environments/custom-1-0-0/out/environment.js
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Loading Environment: /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/environments/custom-1-1-0/out/environment.js
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Successfully Loaded Environment: /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/environments/custom-1-1-0/out/environment.js
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Loading Environment: /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/environments/custom-1-2-0/out/environment.js
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Successfully Loaded Environment: /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/environments/custom-1-2-0/out/environment.js
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Loading Environment: /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/environments/flywheel-1-0-0/out/environment.js
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Successfully Loaded Environment: /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/environments/flywheel-1-0-0/out/environment.js
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Loading Environment: /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/environments/flywheel-1-1-0/out/environment.js
May 6, 2018, 5:25 PM PDT - info: [main/EnvironmentLoader] Successfully Loaded Environment: /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/environments/flywheel-1-1-0/out/environment.js
May 6, 2018, 5:25 PM PDT - info: [main/check-system] Check System: Docker Machine:  
{ stdout: 'Stopped\n', stderr: '' }
May 6, 2018, 5:25 PM PDT - info: [renderer/CheckEnvPage] Check system promise response: 
[ undefined, 'machine-halted' ]
May 6, 2018, 5:25 PM PDT - info: [main/docker-machine] Checking Boot2Docker.iso hash
May 6, 2018, 5:25 PM PDT - info: [main/docker-machine] Running  /Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine start local-by-flywheel
May 6, 2018, 5:25 PM PDT - info: [main/docker-machine] Starting "local-by-flywheel"...
May 6, 2018, 5:25 PM PDT - info: [main/docker-machine] (local-by-flywheel) Check network to re-create if needed...
May 6, 2018, 5:25 PM PDT - info: [main/docker-machine] (local-by-flywheel) Waiting for an IP...
May 6, 2018, 5:26 PM PDT - info: [main/docker-machine] Machine "local-by-flywheel" was started.
May 6, 2018, 5:26 PM PDT - info: [main/docker-machine] Waiting for SSH to be available...
May 6, 2018, 5:26 PM PDT - info: [main/docker-machine] Detecting the provisioner...
May 6, 2018, 5:26 PM PDT - info: [main/docker-machine] Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
May 6, 2018, 5:26 PM PDT - info: [main/set-docker-env] Getting Docker Machine env.
May 6, 2018, 5:26 PM PDT - info: [main/set-docker-env] Received Docker Machine env. export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.80.100:2376"
export DOCKER_CERT_PATH="/Users/afragen/.docker/machine/machines/local-by-flywheel"
export DOCKER_MACHINE_NAME="local-by-flywheel"
# Run this command to configure your shell: 
# eval $("/Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine" env --shell bash local-by-flywheel)

May 6, 2018, 5:26 PM PDT - info: [main/docker-machine-fdv] NFS Mount Status 
{ mountedPoints: [ '/Users', '/Volumes' ],
  mountPoints: [ '/Users', '/Volumes' ] }
May 6, 2018, 5:26 PM PDT - info: [main/docker-machine-fdv] unfsd already running
May 6, 2018, 5:26 PM PDT - info: [main/docker-machine] checking IP
May 6, 2018, 5:26 PM PDT - info: [main/set-docker-env] Getting Docker Machine env.
May 6, 2018, 5:26 PM PDT - info: [main/docker-machine] checked IP 192.168.80.100

May 6, 2018, 5:26 PM PDT - info: [main/set-docker-env] Received Docker Machine env. export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.80.100:2376"
export DOCKER_CERT_PATH="/Users/afragen/.docker/machine/machines/local-by-flywheel"
export DOCKER_MACHINE_NAME="local-by-flywheel"
# Run this command to configure your shell: 
# eval $("/Users/afragen/Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine" env --shell bash local-by-flywheel)

May 6, 2018, 5:26 PM PDT - error: [renderer/app] 
May 6, 2018, 5:26 PM PDT - error: [renderer/ErrorBoundaryDialog] Caught error in <ErrorBoundaryDialog /> 
{ error: {},
  info: { componentStack: '\n    in SiteInfoEnvironment\n    in ul\n    in TableList\n    in SiteInfoSetup\n    in ErrorBoundaryDialog\n    in div\n    in SiteInfo\n    in ErrorBoundaryDialog\n    in div\n    in Window\n    in MainPage\n    in div\n    in App\n    in RouterContext\n    in Router' } }
May 6, 2018, 5:28 PM PDT - warn: [main/EnvironmentUpdater] Error retrieving "custom" from "stable" channel. Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1130:19)
at Object.onceWrapper (events.js:314:30)
at emitNone (events.js:110:20)
at TLSSocket.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1045:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
May 6, 2018, 5:28 PM PDT - info: [main/waitForMySQL] Querying MySQL
May 6, 2018, 5:28 PM PDT - info: [renderer/CheckEnvPage] Check system promise response: 
[ undefined ]
May 6, 2018, 5:29 PM PDT - info: [main/check-system] Check System: Docker Machine:  
{ stdout: 'Running\n', stderr: '' }

Any ideas?

Hey Andy,

Thanks for the heads up!

This should be fixed in one of the upcoming builds.

Was the selected site created in Local more than a year ago?

Glad it’s going to be fixed.

I honestly don’t know the age of the sites affected. I suspect that I have some greater than a year old and some less.

@clay, so I’ve updated to v2.3.1 and now I get the following error.

There doesn’t seem to be any way to fix it.

Can you browse to ~/Library/Application Support/Local by Flywheel and open site.json?

Once you find mainwp, let me know what the enviroment and environmentVersion values are.

"S1fZ1WTlb": {
    "id": "S1fZ1WTlb",
    "path": "~/Local Sites/mainwp",
    "webServer": "nginx",
    "mysql": {
      "database": "local",
      "user": "root",
      "password": "root"
    },
    "container": "966a1a46870ece04bda8a74c3e4c8e571d951641afcb7b0f04312bf294bf3d6e",
    "name": "mainwp",
    "mysqlVersion": "5.6",
    "domain": "mainwp.test",
    "multiSite": "no",
    "phpVersion": "7.2.0",
    "ports": {
      "HTTPS": 4510,
      "HTTP": 4010,
      "MAILCATCHER": 5510,
      "MYSQL": 5010
    },
    "localVersion": "1.4.2",
    "sslSHA1": "28E9B9B8165B71158898E4601B4327FD7B58554B",
    "environment": "custom"
  },

That’s the whole entry and there are several other entries that don’t seem to have environmentVersion, etc.

Got it. Try adding "environmentVersion": "1.2.0" to that site and then restart Local.

That worked. Thanks @clay.

I also see this in the log on Local’s startup.

May 16, 2018, 1:58 PM PDT - info: [main/EnvironmentLoader] Environment does not have package.json: /Users/afragen/Library/Application Support/Local by Flywheel/environments/custom/package.json

Is this a problem?

Glad to hear!

Nope, good catch though!

1 Like

What is the path on Windows 10 ?