Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protocol Timeout:Network.disable #15532

Closed
2 tasks done
ChooLiangYi opened this issue Oct 12, 2023 · 1 comment
Closed
2 tasks done

Protocol Timeout:Network.disable #15532

ChooLiangYi opened this issue Oct 12, 2023 · 1 comment
Assignees

Comments

@ChooLiangYi
Copy link

ChooLiangYi commented Oct 12, 2023

FAQ

URL

localhost:4000/ lighthouse generated port

What happened?

attempting to setup lighthouse ci for angular project but tests just wont run at github actions ci
relevant code:
lighthouserc.js

module.exports = {
  ci: {
    collect: {
      staticDistDir: './dist/ch-web-frontend/browser',
    },
    upload: {
      target: 'temporary-public-storage',
    },
  },
};

//build.yml

      - name: Checkout
        uses: actions/checkout@v3

      - name: Setup nodejs and npm
        uses: actions/setup-node@v3
        with:
          node-version: '18'
          cache: 'npm'

      - name: Build ch-web-fe csr only
        if: steps.ch-web-fe-dist.outputs.cache-hit != 'true'
        run: |
          npm run build:prod

      - name: run Lighthouse CI
        run: |
          npm install -g @lhci/cli
          lhci autorun

What did you expect?

lighthouse tests to run

What have you tried?

referred to #6512 but didnt see network.disable
added staticdistdir as per https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/configuration.md, tried setting different options such as headless:false, adding a serverStartCommand to open localhost:4000 with http-server, but it just kept timing out without running the tests
have also tried npm i chrome-launcher

How were you running Lighthouse?

CLI

Lighthouse Version

12

Chrome Version

No response

Node Version

No response

OS

No response

Relevant log output

Run npm install -g @lhci/cli
  
npm WARN deprecated [email protected]: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser

added 292 packages in 17s

24 packages are looking for funding
  run `npm fund` for details
✅  .lighthouseci/ directory writable
✅  Configuration file found
✅  Chrome installation found
⚠️   GitHub token not set
Healthcheck passed!

Started a web server on port 46107...
Running Lighthouse 3 time(s) on http://localhost:46107/index.html
Run #1...failed!
Error: Lighthouse failed with exit code 1
    at ChildProcess.<anonymous> (/opt/hostedtoolcache/node/18.18.1/x64/lib/node_modules/@lhci/cli/src/collect/node-runner.js:120:21)
    at ChildProcess.emit (node:events:517:28)
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
Thu, 12 Oct 2023 06:13:59 GMT LH:ChromeLauncher Waiting for browser.
Thu, 12 Oct 2023 06:13:59 GMT LH:ChromeLauncher Waiting for browser...
Thu, 12 Oct 2023 06:14:00 GMT LH:ChromeLauncher Waiting for browser.....
Thu, 12 Oct 2023 06:14:00 GMT LH:ChromeLauncher Waiting for browser.......
Thu, 12 Oct 2023 06:14:01 GMT LH:ChromeLauncher Waiting for browser.........
Thu, 12 Oct 2023 06:14:01 GMT LH:ChromeLauncher Waiting for browser.........✓
Thu, 12 Oct 2023 06:14:01 GMT LH:status Connecting to browser
Thu, 12 Oct 2023 06:14:01 GMT LH:status Navigating to about:blank
Thu, 12 Oct 2023 06:14:01 GMT LH:status Benchmarking machine
Thu, 12 Oct 2023 06:14:02 GMT LH:status Preparing target for navigation mode
Thu, 12 Oct 2023 06:14:02 GMT LH:status Navigating to about:blank
Thu, 12 Oct 2023 06:14:02 GMT LH:status Preparing target for navigation
Thu, 12 Oct 2023 06:14:03 GMT LH:status Cleaning origin data
Thu, 12 Oct 2023 06:14:03 GMT LH:status Cleaning browser cache
Thu, 12 Oct 2023 06:14:03 GMT LH:status Preparing network conditions
Thu, 12 Oct 2023 06:14:03 GMT LH:status Navigating to http://localhost:46107/index.html
Thu, 12 Oct 2023 06:18:03 GMT LH:ChromeLauncher Killing Chrome instance 900
Runtime error encountered: Waiting for DevTools protocol response has exceeded the allotted time. (Method: Debugger.disable)
LighthouseError: PROTOCOL_TIMEOUT
    at file:///opt/hostedtoolcache/node/18.18.1/x64/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/gather/session.js:91:47
    at new Promise (<anonymous>)
    at ProtocolSession.sendCommand (file:///opt/hostedtoolcache/node/18.18.1/x64/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/gather/session.js:87:28)
    at file:///opt/hostedtoolcache/node/18.18.1/x64/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/gather/driver/prepare.js:48:19
    at _navigation (file:///opt/hostedtoolcache/node/18.18.1/x64/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/gather/navigation-runner.js:255:9)
    at async _navigations (file:///opt/hostedtoolcache/node/18.18.1/x64/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/gather/navigation-runner.js:297:30)
    at async file:///opt/hostedtoolcache/node/18.18.1/x64/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/gather/navigation-runner.js:370:27
    at async Runner.gather (file:///opt/hostedtoolcache/node/18.18.1/x64/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/runner.js:212:21)
    at async navigationGather (file:///opt/hostedtoolcache/node/18.18.1/x64/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/gather/navigation-runner.js:343:21)
    at async navigation (file:///opt/hostedtoolcache/node/18.18.1/x64/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/index.js:95:24)

Error: Process completed with exit code 1.
@devtools-bot
Copy link

Howdy! Appreciate you filing this bug. 👏

We think this is the same root issue as #6512. So, we'll automatically mark this as a duplicate. Thanks!
🤖 Beep beep boop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants