Skip to content

Errors shown in the web console after reopening a closed viewer tab #18196

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

Closed
timvandermeij opened this issue May 31, 2024 · 1 comment · Fixed by #18605
Closed

Errors shown in the web console after reopening a closed viewer tab #18196

timvandermeij opened this issue May 31, 2024 · 1 comment · Fixed by #18605

Comments

@timvandermeij
Copy link
Contributor

timvandermeij commented May 31, 2024

Attach (recommended) or Link to PDF file here: any PDF works, but I used the default Tracemonkey PDF file that is opened when going to https://mozilla.github.io/pdf.js/web/viewer.html

Configuration:

  • Web browser and its version: Firefox 126.0
  • Operating system and its version: Arch Linux
  • PDF.js version: 4.4.4 as of writing
  • Is a browser extension: no

Steps to reproduce the problem:

  1. Open a first tab with https://mozilla.github.io/pdf.js/web/viewer.html.
  2. Open a second tab (may be empty or navigated to any page).
  3. Close the first tab.
  4. Reopen the first tab with Right Click -> Reopen closed tab.
  5. Notice that the viewer is restored, but in the web console some uncaught errors appeared:
Uncaught Error: The AnnotationEditor is not enabled.
    set annotationEditorParams pdf_viewer.js:2265
    webViewerSwitchAnnotationEditorParams app.js:2402
    dispatch event_utils.js:115
    dispatchEvent annotation_editor_params.js:56
    bindListeners annotation_editor_params.js:66
pdf_viewer.js:2265:12
    set annotationEditorParams pdf_viewer.js:2265
    webViewerSwitchAnnotationEditorParams app.js:2402
    dispatch event_utils.js:115
    dispatchEvent annotation_editor_params.js:56
    bindListeners annotation_editor_params.js:66
Uncaught Error: The AnnotationEditor is not enabled.
    set annotationEditorParams pdf_viewer.js:2265
    webViewerSwitchAnnotationEditorParams app.js:2402
    dispatch event_utils.js:115
    dispatchEvent annotation_editor_params.js:56
    bindListeners annotation_editor_params.js:69
pdf_viewer.js:2265:12

What is the expected behavior? (add screenshot)
No errors are shown in the web console.

What went wrong? (add screenshot)
Errors (see the tracebacks above) are shown in the web console

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): https://mozilla.github.io/pdf.js/web/viewer.html

@timvandermeij
Copy link
Contributor Author

timvandermeij commented May 31, 2024

Note that I accidentally stumbled upon this and don't know if this actually causes problems in the viewer given that the annotation editor seems to work at first glance.

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