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

Unsupported pdf notification message buttons not working anymore if canceling print/save action #12284

Closed
bogdanmaris opened this issue Aug 26, 2020 · 5 comments
Labels

Comments

@bogdanmaris
Copy link

Affected versions

  • Firefox 81.0b2
  • Latest Nightly 82.0a1

Affected platforms

  • Windows 10 64bit
  • MacOS 10.15.6
  • Ubuntu 18.04 64bit

Steps to reproduce

  1. Open a pdf with form (eg: https://www.irs.gov/pub/irs-pdf/f1040.pdf)
  2. Click inside the pdf so that the yellow notification bar will appear
  3. Click the print button inside pdf/Hit CTRL+S
  4. Cancel the print action/save action
  5. Reload/close the tab with the pdf
  6. Click Open With Different Viewer or X button from the yellow notification bar

Expected result

  • The buttons from yellow notification bar can be used.

Actual result

  • Clicking the buttons from yellow notification bar does nothing.

Regression range

Additional notes

  • These are the errors thrown in Browser console:
    InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable PdfjsParent.jsm:276:12
    Uncaught DOMException: An attempt was made to use an object that is not, or is no longer, usable PdfjsParent.jsm:276

Suggested severity

  • I my opinion this should have the S2 severity since the notification will be stuck on the page and user has to close the tab to get rid of it.
@Snuffleupagus
Copy link
Collaborator

Potential regressor: Bug 1660617 - Update pdf.js to version 2.6.302 / #12265

Huh, those changes really cannot be responsible for the problem described here...

These are the errors thrown in Browser console:

InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable PdfjsParent.jsm:276:12
Uncaught DOMException: An attempt was made to use an object that is not, or is no longer, usable PdfjsParent.jsm:276

... note how these errors mention files not even found in this repository, but only found in mozilla-central.

@Snuffleupagus
Copy link
Collaborator

As it turns out, it's actually very easy to determine that the above isn't relevant and that it's rather an older and more general problem.

Steps to reproduce:

  1. Open any "regular" PDF document, e.g. http://mirrors.ctan.org/info/lshort/english/lshort.pdf
  2. Open the web-console, using e.g. Ctrl+Shift+K.
  3. Execute PDFViewerApplication.fallback(); in the web-console.
  4. Re-load the tab, using e.g. F5.
  5. Click Open With Different Viewer or X button from the yellow notification bar.

Here you'll notice the same error message, as mentioned above, in the browser-console for a document without forms.

@timvandermeij
Copy link
Contributor

Does this have something to do with #12285 or is that unrelated?

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Aug 26, 2020

Does this have something to do with #12285 or is that unrelated?

Unfortunately it's unrelated, since the errors mentioned above happens on browser-side (and in the parent process nonetheless, rather than in the content process); I'd even expect that the issue reported here has been around since basically forever.

@Snuffleupagus
Copy link
Collaborator

This is actually a (forward) duplicate of #12305, which was fixed a while back!

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

No branches or pull requests

3 participants