mikestead / lighthouse-batch

Run Lighthouse analysis over multiple sites in a single command
MIT License
153 stars 42 forks source link

Failure to create new browser tab #77

Open gordonbazeley opened 2 years ago

gordonbazeley commented 2 years ago

When I try to call lighthouse from the command line I successfully get results returned e.g. lighthouse https://www.bbc.com

However when I try to audit the same site using lighthouse-batch it fails (command is lighthouse-batch -s https://www.bbc.com)

Comparing the output of the two commands they differ after this line: LH:CriConnection:warn Cannot create new tab; reusing open tab.

Any ideas why this might be please?

pixeline commented 2 years ago

Same here (Apple M1 macbook pro 2021).

alex-rankin commented 1 year ago

Same issue here, cannot find any work arounds - tried on new windows env and same issue.

alex-rankin commented 1 year ago

UPDATE/FIX

For this running into this error, seems you need to use global "-g" as this has the correct perm access for Chromian

npx lighthouse-batch -g -s https://www.bbc.com,https://housing.com

Updating your package.json is also a good idea to stay upto scratch

{ "name": "lighthouse-batch", "version": "9.0.0", "description": "Generate lighthouse reports for one or more websites", "main": "index.js", "bin": { "lighthouse-batch": "run.js" }, "engines": { "node": ">=12.13" }, "author": "Mike Stead", "license": "MIT", "homepage": "https://github.com/mikestead/lighthouse-batch", "repository": { "type": "git", "url": "https://github.com/mikestead/lighthouse-batch.git" }, "dependencies": { "commander": "^9.4.0", "lighthouse": "9.6.7", "shelljs": "^0.8.5" } }