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

Page crash errors when running against a Jekyll site #128

Closed
dmundra opened this issue Mar 9, 2021 · 13 comments
Closed

Page crash errors when running against a Jekyll site #128

dmundra opened this issue Mar 9, 2021 · 13 comments

Comments

@dmundra
Copy link

dmundra commented Mar 9, 2021

Hi there,

I have noticed that when running pa11y-ci locally or in a GitHub action I will get these errors

> http://localhost:4000/people/jennifer-aube - 0 errors
(node:1918) UnhandledPromiseRejectionWarning: Error: Page crashed!
    at Page._onTargetCrashed (/home/runner/work/accessibility/accessibility/node_modules/puppeteer/lib/Page.js:215:24)
    at CDPSession.<anonymous> (/home/runner/work/accessibility/accessibility/node_modules/puppeteer/lib/Page.js:123:56)
    at CDPSession.emit (events.js:315:20)
    at CDPSession._onMessage (/home/runner/work/accessibility/accessibility/node_modules/puppeteer/lib/Connection.js:200:12)
    at Connection._onMessage (/home/runner/work/accessibility/accessibility/node_modules/puppeteer/lib/Connection.js:112:17)
    at WebSocket.<anonymous> (/home/runner/work/accessibility/accessibility/node_modules/puppeteer/lib/WebSocketTransport.js:44:24)
    at WebSocket.onMessage (/home/runner/work/accessibility/accessibility/node_modules/ws/lib/event-target.js:120:16)
    at WebSocket.emit (events.js:315:20)
    at Receiver.receiverOnMessage (/home/runner/work/accessibility/accessibility/node_modules/ws/lib/websocket.js:789:20)
    at Receiver.emit (events.js:315:20)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1918) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1918) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Do you have a recommendation of something I could try to avoid these errors. Anyone else has gotten these?

Thank you

@ssh6
Copy link

ssh6 commented Mar 11, 2021

@dmundra I'm getting the same error, but intermittently. Running 2.4.0 in a docker container.

(node:1) UnhandledPromiseRejectionWarning: Error: Page crashed!
    at Page._onTargetCrashed (/usr/local/lib/node_modules/pa11y-ci/node_modules/puppeteer/lib/Page.js:215:24)
    at CDPSession.Page.client.on.event (/usr/local/lib/node_modules/pa11y-ci/node_modules/puppeteer/lib/Page.js:123:56)
    at CDPSession.emit (events.js:182:13)
    at CDPSession._onMessage (/usr/local/lib/node_modules/pa11y-ci/node_modules/puppeteer/lib/Connection.js:200:12)
    at Connection._onMessage (/usr/local/lib/node_modules/pa11y-ci/node_modules/puppeteer/lib/Connection.js:112:17)
    at WebSocketTransport._ws.addEventListener.event (/usr/local/lib/node_modules/pa11y-ci/node_modules/puppeteer/lib/WebSocketTransport.js:44:24)
    at WebSocket.onMessage (/usr/local/lib/node_modules/pa11y-ci/node_modules/ws/lib/event-target.js:120:16)
    at WebSocket.emit (events.js:182:13)
    at Receiver.receiverOnMessage (/usr/local/lib/node_modules/pa11y-ci/node_modules/ws/lib/websocket.js:789:20)
    at Receiver.emit (events.js:182:13)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

• Error: Pa11y timed out (60000ms) (note: I don't think this is correct)

"defaults": {
  "concurrency": "8",
  "chromeLaunchConfig": {
     "ignoreHTTPSErrors": true,
     "args": ["--no-sandbox"]
   },
    "timeout": 60000
},

@ssh6
Copy link

ssh6 commented Mar 11, 2021

probably related to https://jonasjancarik.medium.com/handling-those-unhandled-promise-rejections-when-using-javascript-async-await-and-ifee-5bac52a0b29f and #111

@dmundra
Copy link
Author

dmundra commented Mar 11, 2021

Good find @ssh6. I will take a look.

johnnycrich added a commit to engagementlab/engagement-lab-website-2.x that referenced this issue Mar 11, 2021
@ssh6
Copy link

ssh6 commented Mar 12, 2021

switching to older pa11y-ci (2.1.1) may be helping. Hard to troubleshoot intermittent problems though.

@dmundra
Copy link
Author

dmundra commented Apr 14, 2021

Hey, @ssh6 is the older version more stable?

@ssh6
Copy link

ssh6 commented Apr 15, 2021

@dmundra doesn't appear to be. And the older version interprets results differently as well. So I would probably stick with the new version and hope for a magic update that fixes everything. (To "fix" my problem, I dropped the page in question from testing.)

@josebolos
Copy link
Member

Hi @dmundra and @ssh6

Could you please provide a URL that triggers this issue, even if it is occasionally? There's no way that we can replicate this issue otherwise.

@ssh6
Copy link

ssh6 commented May 18, 2021

@josebolos https://chimes.cornell.edu/Chimesmasters was the item I removed from my tests.

@dmundra
Copy link
Author

dmundra commented May 18, 2021

@josebolos here is an example of a recent pull request with the error: CivicActions/accessibility#419

We run pa11y-ci on every commit in a pull request.

@josebolos
Copy link
Member

josebolos commented May 18, 2021

Thanks both! I'll try to see if I can replicate it.

@hursey013
Copy link

In case you need another example: https://github.com/usdoj-crt/beta-ada/runs/2603206599

@josebolos
Copy link
Member

Thanks all, I've been able to replicate the problem so I've opened a new issue in the pa11y repo:
pa11y/pa11y#570

Feel free to subscribe to that issue for updates.

I will keep this one open until a fix is released in pa11y-ci anyway.

josebolos added a commit that referenced this issue May 24, 2021
This is a first attempt at fixing #128. It's unlikely to fix the issue completely, or even at all, as the browser will sometimes crash after testing several URLs and we don't have any logic to reopen a browser that has crashed mid-tests.
josebolos added a commit that referenced this issue Jun 28, 2021
This is a first attempt at fixing #128. It's unlikely to fix the issue completely, or even at all, as the browser will sometimes crash after testing several URLs and we don't have any logic to reopen a browser that has crashed mid-tests.
josebolos added a commit that referenced this issue Jun 28, 2021
This is a first attempt at fixing #128. It's unlikely to fix the issue completely, or even at all, as the browser will sometimes crash after testing several URLs and we don't have any logic to reopen a browser that has crashed mid-tests.
yous added a commit to yous/yous.be that referenced this issue Sep 28, 2021
ryanhofdotgov added a commit to 18F/development-guide that referenced this issue Oct 22, 2021
@josebolos
Copy link
Member

Version 3.0.0 of pa11y-ci is out which include several improvements (including a puppeteer upgrade) that should have gotten rid of this error. Please create a new issue if you stumble upon a URL that fails to run with v3.0.0.

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

4 participants