daisy / ace-gui

Ace by DAISY App, the official graphical user interface for the EPUB accessibility checker developed by the DAISY Consortium, available for the Windows, MacOS and Linux desktop operating systems.
MIT License
18 stars 6 forks source link

Ace failing to run on PC, randomly (Chromium timeout?) #166

Open clapierre opened 1 year ago

clapierre commented 1 year ago

From eBound Canada (a GCA partner with Benetech) We've been finding that it won't open EPUBs (and we try multiple different files), or sometimes it'll work after 5+ tries. I've also re-installed the latest version which didn't help.

The error message I get is:

Error: Failed to check Content Document 'xhtml/04_title.xhtml': did-fail-load: -3 - - acehttps://0.0.0.0//OPS/xhtml/04_title.xhtml?AXE_RUNNER=3 - true - 8 - 1

I'm running the GUI version on a PC. Our whole team is using GUI on PC and has the same issue.

Note: when I run the same EPUB with the same Ace 1.3.2 version but using my Mac it seems to work fine and always gave me a report after about 10 seconds.

Daniel, I will send you the EPUB to test with if that will help.

danielweck commented 1 year ago

This "bug" is so frustrating, because hard to reproduce consistently. I assume in some cases the time allowance for checking HTML documents inside EPUB publications is too short. The Ace command line tool's default timings can be overridden via environment variables:

Typically these environment variables will be effective only temporarily when passed directly on the command line inside the console / shell terminal (i.e. env vars active just for the duration of the command line tool's execution).

However for the Ace graphical user interface application, such environment variables would need to be configured at the level of the operating system, in a more permanent fashion. This is definitely not user-friendly, but bear in mind that this method was designed for troubleshooting, not as a proper user-facing feature. On Windows there is a configuration panel dedicated to environment variables. On Linux and Mac OS the process is more complicated, unfortunately.

Code reference, for developers:

https://github.com/daisy/ace/blob/d56a8e1c927c49ee450ceaaa670efdb21dd2fb5f/packages/ace-axe-runner-electron/src/init.js#L664

The error -3 means "aborted due to user action" in the Chromium web browser engine, which doesn't make sense as the Electron browser windows are hidden from view, users cannot directly interact with them, and the error is thrown by Electron anyway as did-fail-load.

https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h;l=35 =>

// An operation was aborted (due to user action).
NET_ERROR(ABORTED, -3)
danielweck commented 6 months ago

I am seeing a number of timeout reports in Deque Axe as well. Probably related: https://github.com/dequelabs/axe-core/issues?q=is%3Aissue+is%3Aopen+timeout