Open Bug 1795859 Opened 2 years ago Updated 1 year ago

PDF fails to display in Firefox tab

Categories

(Firefox :: PDF Viewer, defect, P3)

Firefox 105
defect

Tracking

()

People

(Reporter: williams.mavis, Unassigned)

References

Details

Attachments

(2 files)

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

Steps to reproduce:

I opened this URL in FF: https://www.plymouth.ac.uk/learn/LDstudyguides/pdf/11Reflection.pdf

Actual results:

FF opened the PDF page, but the PDF was not displayed.
I selected the Download File icon, and FF proceeded to execute saving the file in File Explorer as normal. However, when I attempted to open the saved PDF file in PDF-XChange Editor, an error message was returned: "[PXV Lib]: File is empty".

Expected results:

The PDF file should have been opened in FF, or saved to Downloads.

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

The server is returning 404, this PDF file effectively doesn't exist.

We should probably display something in order to explain what's wrong.
I tried the above url in Chrome and Edge: the behaviour the same: they display an alert box to warn that something went wrong.
In Brave, there is an infobar telling "Sorry this page is missing... blah blah".

:RT, any idea on what we should do here ?

Flags: needinfo?(rtestard)

I agree that we need some kind of error message.
It feels like we could leverage an error page, a Firefox modal or the pdf.js modal but we need UX input first to steer us to the right UI component or help design a new one. I pinged the design systems group for help there, will come back to the bug once I have an answer.

Flags: needinfo?(rtestard)

Hey all, I work with the design systems team. We need a bit of context before we can give input:
Are there any existing patterns within pdf.js for giving users feedback whether it's an error / warning / informative note?
Are there any other existing error feedback that pdf.js throws, if so what are they? Or would this be the first?
What does the pdf.js modal look like and what messaging is it used for?

Thank you.

(In reply to Jules from comment #5)

Are there any existing patterns within pdf.js for giving users feedback whether it's an error / warning / informative note?

Right now: no.
We used to have an infobar in the past to warn the user that a feature or whatever is not supported by pdf.js.
We removed it few years ago:

Are there any other existing error feedback that pdf.js throws, if so what are they? Or would this be the first?

No there aren't.
Usually we try to fix pdf.js to avoid to have some errors.

What does the pdf.js modal look like and what messaging is it used for?

Thank you.

Attached image pdfjs modal.png

Comment on attachment 9300662 [details]
pdfjs modal.png

(In reply to Calixte Denizet (:calixte) from comment #6)

Thanks for getting back to me.

I was wondering if this is what the pdf.js modal that Romain referred to above looks like?

(In reply to Jules from comment #8)

Comment on attachment 9300662 [details]
pdfjs modal.png

(In reply to Calixte Denizet (:calixte) from comment #6)

Thanks for getting back to me.

I was wondering if this is what the pdf.js modal that Romain referred to above looks like?

Yes this is the one I was thinking about.
It's not great but I'd say this scenario is rare enough that we could re-use this UI since this is better to inform users overall.
Long term we should make this modal look more aligned with the rest of the browser.

(In reply to Romain Testard [:RT] from comment #9)

(In reply to Jules from comment #8)

Comment on attachment 9300662 [details]
pdfjs modal.png

(In reply to Calixte Denizet (:calixte) from comment #6)

Thanks for getting back to me.

I was wondering if this is what the pdf.js modal that Romain referred to above looks like?

Yes this is the one I was thinking about.
It's not great but I'd say this scenario is rare enough that we could re-use this UI since this is better to inform users overall.
Long term we should make this modal look more aligned with the rest of the browser.

Thanks. I feel as though using the Infobar to trigger this error, like the old instance Calixte mentioned above, would be the way to go here since Firefox relies on that pattern to display any errors or unexpected behaviors happening within the page. Let me know what you think about this solution.

The severity field is not set for this bug.
:calixte, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(cdenizet)
Severity: -- → S3
Flags: needinfo?(cdenizet)
Priority: -- → P3
Duplicate of this bug: 1805113

The following field has been copied from a duplicate bug:

Field Value Source
Status NEW bug 1805113

For more information, please visit auto_nag documentation.

Status: UNCONFIRMED → NEW
Ever confirmed: true

This ticket on the PDF.js issue tracker asks to "Add some UI feedback when a PDF fails to load for any reason"
https://github.com/mozilla/pdf.js/issues/16599

The resolution there is blocked on the decision making on this bug.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: