IBMa/equal-access

[BUG]: accessibility-checker with Playwright error: “Navigation timeout of 30000 ms exceeded”

Closed this issue · 7 comments

jrpool commented

Project

accessibility-checker for Node

Browser

Chrome, Safari, Firefox

Operating system

MacOS

Description

I am running getCompliance on a Playwright page. The function usually returns a result, but for some targets it crashes in a way that I have not found a way to trap. The emitted message on the console appears after 30 seconds and says “Navigation timeout of 30000 ms exceeded” and then continues by appending the entire content of the target HTML document. Thereafter, at intervals of 30 seconds, indefinitely, the console redisplays that message.

This behavior can occur when the content given to getCompliance is the page content rather than the page URL.

None of the Playwright error events for the page object occurs when this error occurs.

What I expect is that the above-described error message never appears.

Steps to reproduce

Run getCompliance on a Playwright page, with the page content rather than a URL as an argument, on one of the following documents with chromium, webkit, or firefox as the browser type:
https://globalsolutions.org/
https://monsido.com/

On first glance, it looks like your test timeout is just too short. Between your browser loading the page (which isn't related to the tool), and then reporting on all of the issues (200+), it's just exceeding 30 seconds. We'll do some more digging into the performance to confirm there isn't something taking too long in the engine, but you can probably avoid these issues by increasing the test timeout to be more than 30 seconds.

See https://playwright.dev/docs/test-timeouts for information about Playwright timeouts.

Triage: need to do performance evaluation for the engine and the packaging.

jrpool commented

There were 3 issues:

  1. The duration.
  2. The impossibility of trapping a timeout error.
  3. The indefinitely repeated logging of the entire page.

@shunguoy I see PR for this issue, should it be in Review?

I have succeeded in managing this by running accessibility-checker in a child process and killing it after it completes or times out.

The issue related to the code was fixed in the branch dev-4.x-mergemaster2, the pull request is in #1960.
Customers may still get the same issue if the timeout specified for the engine to load and execution is too short. In this case, the customers need to increase the timeout period.