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

globalExceptionHandler catching unrelated errors/creating bogus messages around Ace2Editor.init() #6802

Open
ljrk0 opened this issue Dec 15, 2024 · 0 comments

Comments

@ljrk0
Copy link

ljrk0 commented Dec 15, 2024

Describe the bug
It seems that errors when loading an etherpad that are produced outside of the actual etherpad (e.g., by extensions) are caught by the globalExceptionHandler just so and result in the pad not loading at all. In addition, the error message given is misleading and centers around Ace2Editor.init, despite being unrelated.

To Reproduce
One way to reproduce the behavior (on both Chrome/Firefox on Linux and macOS):

  1. Install the BitWarden Extension
  2. Install the Dashlane Extension
  3. Log into BitWarden (a free account suffices)
  4. Navigate to any etherpad, e.g. https://etherpad.wikimedia.org/p/foo
  5. Observe the error (full error Additional context):
    Error: Ace2Editor.init() error event while waiting for load event at unknown at line -1
    

Expected behavior
The page should load despite the injected code by extensions producing an error.

Screenshots
N/A

Server (please complete the following information):

  • Etherpad version: AFAICT any current, tested various public instances
  • OS: multiple
  • Node.js version (node --version): multiple
  • npm version (npm --version): multiple
  • Is the server free of plugins: depends

Desktop (please complete the following information):

  • OS: Linux, macOS
  • Browser: Chrome, Firefox
  • Version: Chrome 131, Firefox 133, Chrome 124 (Linux)

Smartphone (please complete the following information):
N/A

Additional context
Add any other context about the problem here.

A more complete error message on Chrome looks like this:

An error occurred
Please press and hold Ctrl and press F5 to reload this page

If the problem persists, please send this error message to your webmaster:

Error: Ace2Editor.init() error event while waiting for load event
at unknown at line -1
ErrorId: Q7gwaJ4w3jej5CE2HWO2
Unhandled Promise rejection
URL: https://etherpad.wikimedia.org/p/foo
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

On Firefox, the page may not load at all and error with:

in moz-extension://f14098bf-cd97-4f0b-8963-35f10ea5a79c/content/fido2-page-script.js
at line 0:0

Stack trace:

If one loads a pad with BitWarden disabled and then enables BitWarden (with BitWarden logged in) while the pad is open, a more helpful/accurate error can be seen:

An error occurred
Please press and hold Ctrl and press F5 to reload this page

If the problem persists, please send this error message to your webmaster:

TypeError: Uncaught TypeError: Cannot assign to read only property 'create' of object '#<CredentialsContainer>'
at chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js at line 455
ErrorId: 5hygymjqBZ7C6APENAAX
Uncaught exception
URL: https://etherpad.wikimedia.org/p/foo
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

The same on Firefox:

An error occurred

Please press and hold Ctrl and press F5 to reload this page

If the problem persists, please send this error message to your webmaster:
Script error.
at moz-extension://f14098bf-cd97-4f0b-8963-35f10ea5a79c/content/fido2-page-script.js at line 0
ErrorId: IQkHIuJ4y7xNOKQKg60W
Uncaught exception
URL: https://etherpad.wikimedia.org/p/foo
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0

Of course this isn't purely an etherpad issue, but arguably the exception handler doesn't need to be that rigorous? Otherwise, feel free to close this, my debugging session might still be helpful to other people searching for the error :'D

Related BitWarden issues are bitwarden/clients#7080 and bitwarden/clients#6767.

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

No branches or pull requests

1 participant