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

Puppeteer Error: Navigation failed because browser has disconnected! #570

Open
josebolos opened this issue May 18, 2021 · 0 comments
Open

Comments

@josebolos
Copy link
Member

josebolos commented May 18, 2021

Running pa11y on some urls (e.g. https://chimes.cornell.edu/Chimesmasters) causes it to fail to run randomly:

$ pa11y --debug "https://chimes.cornell.edu/Chimesmasters"

Welcome to Pa11y

 > Running Pa11y on URL https://chimes.cornell.edu/Chimesmasters
 > Debug: Launching Headless Chrome
 > Debug: Opening URL in Headless Chrome

Error: Navigation failed because browser has disconnected!
    at CDPSession.<anonymous> (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/node_modules/puppeteer/lib/LifecycleWatcher.js:46:107)
    at CDPSession.emit (node:events:365:28)
    at CDPSession._onClosed (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/node_modules/puppeteer/lib/Connection.js:215:10)
    at Connection._onClose (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/node_modules/puppeteer/lib/Connection.js:138:15)
    at WebSocket.<anonymous> (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/node_modules/puppeteer/lib/WebSocketTransport.js:48:22)
    at WebSocket.onClose (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/node_modules/ws/lib/event-target.js:124:16)
    at WebSocket.emit (node:events:365:28)
    at WebSocket.emitClose (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/node_modules/ws/lib/websocket.js:191:10)
    at Socket.socketOnClose (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/node_modules/ws/lib/websocket.js:850:15)
    at Socket.emit (node:events:365:28)
  -- ASYNC --
    at Frame.<anonymous> (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/node_modules/puppeteer/lib/helper.js:111:15)
    at Page.goto (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/node_modules/puppeteer/lib/Page.js:674:49)
    at Page.<anonymous> (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/node_modules/puppeteer/lib/helper.js:112:23)
    at runPa11yTest (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/lib/pa11y.js:183:14)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async pa11y (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/lib/pa11y.js:55:19)
    at async runProgram (/Users/jose.bolos/.nvm/versions/node/v16.1.0/lib/node_modules/pa11y/bin/pa11y.js:122:19)

Reported initially in pa11y/pa11y-ci#128

Additional examples of random failures on other projects and URLs:

Environment:

pa11y --environment
Pa11y:      5.3.1
Node.js:    16.1.0
npm:        7.11.2
OS:         20.3.0 (darwin)
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

1 participant