paulirish / pwmetrics

Progressive web metrics at your fingertipz
Apache License 2.0
1.25k stars 74 forks source link

No Chrome installations found #227

Open Jikodis opened 4 years ago

Jikodis commented 4 years ago

Config / CLI options

pwmetrics https://example.com/

Steps to reproduce.

  1. Fresh install in project using npm install pwmetrics
  2. Run pwmetrics https://example.com/
  3. See error in console output

Stack trace

Launching Chrome
{ Error
    at new LauncherError (/usr/local/lib/node_modules/pwmetrics/node_modules/chrome-launcher/dist/utils.js:35:22)
    at new ChromeNotInstalledError (/usr/local/lib/node_modules/pwmetrics/node_modules/chrome-launcher/dist/utils.js:66:9)
    at Launcher.<anonymous> (/usr/local/lib/node_modules/pwmetrics/node_modules/chrome-launcher/dist/chrome-launcher.js:145:27)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/pwmetrics/node_modules/chrome-launcher/dist/chrome-launcher.js:9:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:282:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
  message: 'No Chrome installations found.',
  code: 'ERR_LAUNCHER_NOT_INSTALLED' }
  ✘ Error: Unable to complete run 1 of 1 due to connect ECONNREFUSED 127.0.0.1:9222.

Environment

  1. pwmetrics version: ^4.2.3
  2. Chrome version: Version 80.0.3987.116 (Official Build) (64-bit)
  3. OS version: macOS Catalina 10.15.3

Potential Solution

Update chrome-launcher dependency to a more recent version. Lighthouse root repo uses 0.11.2 currently.

"chrome-launcher": {
      "version": "0.11.2",
      "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.11.2.tgz",
      "integrity": "sha512-jx0kJDCXdB2ARcDMwNCtrf04oY1Up4rOmVu+fqJ5MTPOOIG8EhRcEU9NZfXZc6dMw9FU8o1r21PNp8V2M0zQ+g==",
      "requires": {
        "@types/node": "*",
        "is-wsl": "^2.1.0",
        "lighthouse-logger": "^1.0.0",
        "mkdirp": "0.5.1",
        "rimraf": "^2.6.1"
      }
    }
zelenkoff commented 4 years ago

Any updates here? Have same issue!

zelenkoff commented 4 years ago

Possible solution is to set path to Chrome instance directly using flag chromePath chromePath: "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary" But hope there is better solution