Lighthouse: No Chrome Installations Found

Created on 28 Oct 2016  Â·  21Comments  Â·  Source: GoogleChrome/lighthouse

Hi, after install via command line the package, when I run lighthouse http://myurl.com I obtain this error:

Runtime error encountered: Error: No Chrome Installations Found
    at Promise.resolve.then (/myfolder/node/v6.7.0/lib/node_modules/lighthouse/lighthouse-cli/chrome-launcher.js:94:33)
    at process._tickCallback (internal/process/next_tick.js:103:7)
Error: No Chrome Installations Found
    at Promise.resolve.then (/myfolder/node/v6.7.0/lib/node_modules/lighthouse/lighthouse-cli/chrome-launcher.js:94:33)
    at process._tickCallback (internal/process/next_tick.js:103:7)

I already have Chrome installed on my Mac.

Most helpful comment

could you try run lighthouse with sudo? I think your terminal doesn't have access to the executable
sudo lighthouse http://myurl.com

All 21 comments

Can you tell us where it is installed? (full path) and what do you get when running 'lighthouse --version' and 'lighthouse url --verbose

Full path: /Users/myUser/.nvm/versions/node/v6.7.0/lib/node_modules/lighthouse/lighthouse-cli/

The version is 1.1.6. When I run the command with my url and the verbose option I obtain the same result about Chrome:

Launching Chrome...
created /var/folders/w1/yfn41vys7d3_pk18xgtwsvgjh7stmh/T/lighthouse.XXXXXXX.Zmo44rgq
Runtime error encountered: Error: No Chrome Installations Found
    at Promise.resolve.then (/Users/myUser/.nvm/versions/node/v6.7.0/lib/node_modules/lighthouse/lighthouse-cli/chrome-launcher.js:94:33)
    at process._tickCallback (internal/process/next_tick.js:103:7)
Error: No Chrome Installations Found
    at Promise.resolve.then (/Users/myUser/.nvm/versions/node/v6.7.0/lib/node_modules/lighthouse/lighthouse-cli/chrome-launcher.js:94:33)
    at process._tickCallback (internal/process/next_tick.js:103:7)

Sorry, I meant chrome path

It is in my applications folder:

/Applications/Google Chrome.app

Could you type this command in terminal please
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -i 'google chrome\( canary\)\?.app$' | awk '{$1=""; print $0}'

hi, it shows the same result:

~ $ /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -i 'google chrome\( canary\)\?.app$' | awk '{$1=""; print $0}'

 /Applications/Google Chrome.app

could you try run lighthouse with sudo? I think your terminal doesn't have access to the executable
sudo lighthouse http://myurl.com

~ $  sudo lighthouse http://www.google.com

Password:
Launching Chrome...
created /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/lighthouse.XXXXXXX.MWlrM4my
Runtime error encountered: Error: No Chrome Installations Found
    at Promise.resolve.then (/Users/myUser/.nvm/versions/node/v6.7.0/lib/node_modules/lighthouse/lighthouse-cli/chrome-launcher.js:94:33)
    at process._tickCallback (internal/process/next_tick.js:103:7)
Error: No Chrome Installations Found
    at Promise.resolve.then (/Users/myUser/.nvm/versions/node/v6.7.0/lib/node_modules/lighthouse/lighthouse-cli/chrome-launcher.js:94:33)
    at process._tickCallback (internal/process/next_tick.js:103:7)

I ran into the same issue. I think the regex in the latest release is the problem. It looks like it is fixed in master.

thank you, can you try that @felixzapata ?

I´ve cloned the repository and installed it locally via npm link but wich is the task who transpile the TypeScript? The command fails due to a missing JavaScript file:

$ lighthouse http://www.google.com
module.js:457
    throw err;
    ^

Error: Cannot find module './bin.js'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/myUser/proyectos/github/lighthouse/lighthouse-cli/index.js:5:1)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)

@felixzapata

https://github.com/GoogleChrome/lighthouse#develop

cd lighthouse-cli/
npm install
npm run build

thanks @samccone.

now the error is different:

$ lighthouse http://www.google.com

Lighthouse CLI Launching Chrome... +0ms
  ChromeLauncher Waiting for browser. +78ms
  ChromeLauncher Waiting for browser... +2ms
  ChromeLauncher Waiting for browser..... +508ms
  ChromeLauncher Waiting for browser.....✓ +3ms
  config:warn CacheContents gatherer requested, however no audit requires it. +320ms
  Lighthouse:warn The URL provided should be on HTTPS +6ms
  Lighthouse:warn Performance stats will be skewed redirecting from HTTP to HTTPS. +0ms
undefined:1
{"method":"Page.loadEventFired","params":{"timestamp":33491,597237}}
                                                            ^

SyntaxError: Unexpected number in JSON at position 60
    at Object.parse (native)
    at CriConnection.handleRawMessage (/Users/myUser/proyectos/github/lighthouse/lighthouse-core/gather/connections/connection.js:91:25)
    at WebSocket.ws.on.data (/Users/myUser/proyectos/github/lighthouse/lighthouse-core/gather/connections/cri.js:41:39)
    at emitTwo (events.js:106:13)
    at WebSocket.emit (events.js:191:7)
    at Receiver.ontext (/Users/myUser/proyectos/github/lighthouse/node_modules/ws/lib/WebSocket.js:841:10)
    at /Users/myUser/proyectos/github/lighthouse/node_modules/ws/lib/Receiver.js:536:18
    at /Users/myUser/proyectos/github/lighthouse/node_modules/ws/lib/Receiver.js:368:7
    at /Users/myUser/proyectos/github/lighthouse/node_modules/ws/lib/PerMessageDeflate.js:249:5
    at afterWrite (_stream_writable.js:361:3)

this should now be fixed with the latest release. Please reopen if this is still an issue.

@brendankenny is it available via npm? The last one published there is 1.1.6

not yet on npm it seems.

for whatever weird reason the web interface for npm is still showing 1.1.6. If you npm install lighthouse you should get 1.1.7. No idea why it's doing that

@brendankenny ok, i´ve checked that the version I´ve installed yesterday it was 1.1.7. But I obtain the same error that in a comment before:

$ lighthouse http://www.google.com

Lighthouse CLI Launching Chrome... +0ms
  ChromeLauncher Waiting for browser. +78ms
  ChromeLauncher Waiting for browser... +2ms
  ChromeLauncher Waiting for browser..... +508ms
  ChromeLauncher Waiting for browser.....✓ +3ms
  config:warn CacheContents gatherer requested, however no audit requires it. +320ms
  Lighthouse:warn The URL provided should be on HTTPS +6ms
  Lighthouse:warn Performance stats will be skewed redirecting from HTTP to HTTPS. +0ms
undefined:1
{"method":"Page.loadEventFired","params":{"timestamp":33491,597237}}
                                                            ^

SyntaxError: Unexpected number in JSON at position 60
    at Object.parse (native)
    at CriConnection.handleRawMessage (/Users/myUser/proyectos/github/lighthouse/lighthouse-core/gather/connections/connection.js:91:25)
    at WebSocket.ws.on.data (/Users/myUser/proyectos/github/lighthouse/lighthouse-core/gather/connections/cri.js:41:39)
    at emitTwo (events.js:106:13)
    at WebSocket.emit (events.js:191:7)
    at Receiver.ontext (/Users/myUser/proyectos/github/lighthouse/node_modules/ws/lib/WebSocket.js:841:10)
    at /Users/myUser/proyectos/github/lighthouse/node_modules/ws/lib/Receiver.js:536:18
    at /Users/myUser/proyectos/github/lighthouse/node_modules/ws/lib/Receiver.js:368:7
    at /Users/myUser/proyectos/github/lighthouse/node_modules/ws/lib/PerMessageDeflate.js:249:5
    at afterWrite (_stream_writable.js:361:3)

Same error for me.

lighthouse https://airhorner.com/
config:warn CacheContents gatherer requested, however no audit requires it. +0ms
undefined:1
{"method":"Page.loadEventFired","params":{"timestamp":29007,007518}}
^

SyntaxError: Unexpected number
at Object.parse (native)
at CriConnection.handleRawMessage (/usr/local/lib/node_modules/lighthouse/lighthouse-core/gather/connections/connection.js:91:25)
at WebSocket. (/usr/local/lib/node_modules/lighthouse/lighthouse-core/gather/connections/cri.js:40:39)
at emitTwo (events.js:87:13)
at WebSocket.emit (events.js:172:7)
at Receiver.ontext (/usr/local/lib/node_modules/lighthouse/node_modules/ws/lib/WebSocket.js:841:10)
at /usr/local/lib/node_modules/lighthouse/node_modules/ws/lib/Receiver.js:536:18
at /usr/local/lib/node_modules/lighthouse/node_modules/ws/lib/Receiver.js:368:7
at /usr/local/lib/node_modules/lighthouse/node_modules/ws/lib/PerMessageDeflate.js:249:5
at afterWrite (_stream_writable.js:346:3)

@samccone

The error is coming from:
lighthouse/lighthouse-core/gather/connections/connection.js:92:25

Code:

handleRawMessage(message) {
    const object = JSON.parse(message);

I just putted a console.log()

message {"id":1,"result":{}}
message {"id":2,"result":{}}
message {"method":"Page.frameStartedLoading","params":{"frameId":"87578.1"}}
message {"method":"Page.frameNavigated","params":{"frame":{"id":"87578.1","loaderId":"87578.1","url":"about:blank","securityOrigin":"://","mimeType":"text/html"}}}
message {"method":"Page.loadEventFired","params":{"timestamp":396337,195681}}

"params":{"timestamp":396337,195681}}

hope this help

More investigation point me that can be a Chrome issue, I opened a bug then:
https://bugs.chromium.org/p/chromium/issues/detail?id=667699#

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dkajtoch picture dkajtoch  Â·  3Comments

sanprieto picture sanprieto  Â·  3Comments

mohanrohith picture mohanrohith  Â·  3Comments

devrsi0n picture devrsi0n  Â·  3Comments

bitttttten picture bitttttten  Â·  3Comments