You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running lighhouse on ec2 I am getting error TypeError: Failed to fetch browser webSocket URL from http://127.0.0.1:45185/json/version: globalThis.fetch is not a function
#1055
Open
rajeshchinnam opened this issue
Jul 8, 2024
· 1 comment
Describe the bug
Getting error on running lighthouse on my Ec2
TypeError: Failed to fetch browser webSocket URL from http://127.0.0.1:45185/json/version: globalThis.fetch is not a function
To Reproduce
Steps to reproduce the behavior:
Go to EC2
Installed versions of npm 8.19.4 and node 16.20.2 and lighhouse 12.1.0
See error
Runtime error encountered: Failed to fetch browser webSocket URL from http://127.0.0.1:35681/json/version: globalThis.fetch is not a function
TypeError: Failed to fetch browser webSocket URL from http://127.0.0.1:35681/json/version: globalThis.fetch is not a function
at getWSEndpoint (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:67:41)
at getConnectionTransport (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:54:37)
at _connectToBrowser (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:24:56)
at PuppeteerNode.connect (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.js:93:16)
at PuppeteerNode.connect (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/node/PuppeteerNode.js:88:22)
at gatherFn (file:///usr/lib/node_modules/lighthouse/core/gather/navigation-runner.js:283:35)
at Function.gather (file:///usr/lib/node_modules/lighthouse/core/runner.js:210:31)
at navigationGather (file:///usr/lib/node_modules/lighthouse/core/gather/navigation-runner.js:306:34)
at async navigation (file:///usr/lib/node_modules/lighthouse/core/index.js:58:24)
at async runLighthouse (file:///usr/lib/node_modules/lighthouse/cli/run.js:210:26)
Expected behavior
I want ighthouse report generated
Logs/Screenshots
Runtime error encountered: Failed to fetch browser webSocket URL from http://127.0.0.1:35681/json/version: globalThis.fetch is not a function
TypeError: Failed to fetch browser webSocket URL from http://127.0.0.1:35681/json/version: globalThis.fetch is not a function
at getWSEndpoint (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:67:41)
at getConnectionTransport (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:54:37)
at _connectToBrowser (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:24:56)
at PuppeteerNode.connect (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.js:93:16)
at PuppeteerNode.connect (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/node/PuppeteerNode.js:88:22)
at gatherFn (file:///usr/lib/node_modules/lighthouse/core/gather/navigation-runner.js:283:35)
at Function.gather (file:///usr/lib/node_modules/lighthouse/core/runner.js:210:31)
at navigationGather (file:///usr/lib/node_modules/lighthouse/core/gather/navigation-runner.js:306:34)
at async navigation (file:///usr/lib/node_modules/lighthouse/core/index.js:58:24)
at async runLighthouse (file:///usr/lib/node_modules/lighthouse/cli/run.js:210:26)
Environment (please complete the following information):
OS: Amazon Linux CentOS
Browser Chrome
Version [Google Chrome 115.0.5790.102]
The text was updated successfully, but these errors were encountered:
I am seeing this same behavior using the same environment listed above. I was trying to get a simple test running and used the official documentation found here
Describe the bug
Getting error on running lighthouse on my Ec2
TypeError: Failed to fetch browser webSocket URL from http://127.0.0.1:45185/json/version: globalThis.fetch is not a function
To Reproduce
Steps to reproduce the behavior:
Go to EC2
Installed versions of npm 8.19.4 and node 16.20.2 and lighhouse 12.1.0
run command sudo lighthouse https://google.com --quiet --chrome-flags="--no-sandbox --headless" --output-path=/opt/lighthouse/report.json --output json
See error
Runtime error encountered: Failed to fetch browser webSocket URL from http://127.0.0.1:35681/json/version: globalThis.fetch is not a function
TypeError: Failed to fetch browser webSocket URL from http://127.0.0.1:35681/json/version: globalThis.fetch is not a function
at getWSEndpoint (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:67:41)
at getConnectionTransport (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:54:37)
at _connectToBrowser (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:24:56)
at PuppeteerNode.connect (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.js:93:16)
at PuppeteerNode.connect (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/node/PuppeteerNode.js:88:22)
at gatherFn (file:///usr/lib/node_modules/lighthouse/core/gather/navigation-runner.js:283:35)
at Function.gather (file:///usr/lib/node_modules/lighthouse/core/runner.js:210:31)
at navigationGather (file:///usr/lib/node_modules/lighthouse/core/gather/navigation-runner.js:306:34)
at async navigation (file:///usr/lib/node_modules/lighthouse/core/index.js:58:24)
at async runLighthouse (file:///usr/lib/node_modules/lighthouse/cli/run.js:210:26)
Expected behavior
I want ighthouse report generated
Logs/Screenshots
Runtime error encountered: Failed to fetch browser webSocket URL from http://127.0.0.1:35681/json/version: globalThis.fetch is not a function
TypeError: Failed to fetch browser webSocket URL from http://127.0.0.1:35681/json/version: globalThis.fetch is not a function
at getWSEndpoint (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:67:41)
at getConnectionTransport (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:54:37)
at _connectToBrowser (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js:24:56)
at PuppeteerNode.connect (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.js:93:16)
at PuppeteerNode.connect (file:///usr/lib/node_modules/lighthouse/node_modules/puppeteer-core/lib/esm/puppeteer/node/PuppeteerNode.js:88:22)
at gatherFn (file:///usr/lib/node_modules/lighthouse/core/gather/navigation-runner.js:283:35)
at Function.gather (file:///usr/lib/node_modules/lighthouse/core/runner.js:210:31)
at navigationGather (file:///usr/lib/node_modules/lighthouse/core/gather/navigation-runner.js:306:34)
at async navigation (file:///usr/lib/node_modules/lighthouse/core/index.js:58:24)
at async runLighthouse (file:///usr/lib/node_modules/lighthouse/cli/run.js:210:26)
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: