Closed Bug 1809454 Opened 3 years ago Closed 3 years ago

Failed to save PDF annotations (Error when saving the document: this.parent is null)

Categories

(Firefox :: PDF Viewer, defect)

Firefox 108
defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox109 --- wontfix
firefox110 --- fixed

People

(Reporter: yushijinhun, Assigned: calixte)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0

Steps to reproduce:

  1. Open a PDF file which is long enough (mine is 34 pages).
  2. Make an annotation on the first page.
  3. Scroll to the last page.
  4. Press Ctrl+S and save the annotated PDF.

Actual results:

  1. The annotation is NOT saved.
  2. There is an error log in the console:
Error when saving the document: this.parent is null viewer.js:1914:15
    save resource://pdf.js/web/viewer.js:1914
    downloadOrSave resource://pdf.js/web/viewer.js:1931
    webViewerDownload resource://pdf.js/web/viewer.js:2842
    dispatch resource://pdf.js/web/viewer.js:3373
    handleEvent resource://pdf.js/web/viewer.js:11932

It's probably because the page where the annotation locates has been unloaded. If I scroll to where I made the annotation, the annotated PDF can be saved successfully.

Expected results:

The PDF annotation should be saved, and no error should occur.

If you can't reproduce this bug, please try:

  1. scrolling over the last few pages to ensure the first page is unloaded
  2. keeping the thumbnail sidebar collapsed

The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → PDF Viewer

It should be fixed in nightly:
https://github.com/mozilla/pdf.js/issues/15780

Could you make a try with the last nightly ?
https://www.mozilla.org/en-US/firefox/channel/desktop/

Thank you. I switched to Firefox Nightly and it works fine now.

Assignee: nobody → cdenizet
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Depends on: 1804797
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.