Closed
Bug 796694
Opened 14 years ago
Closed 13 years ago
[PDF viewer] broken PDF file does not trigger error
Categories
(Firefox OS Graveyard :: Gaia::PDF Viewer, defect)
Firefox OS Graveyard
Gaia::PDF Viewer
Tracking
(blocking-basecamp:-)
RESOLVED
FIXED
| blocking-basecamp | - |
People
(Reporter: ghtobz, Assigned: zalun)
References
Details
(Keywords: reproducible, Whiteboard: [label:mentored][label:pdf.js])
[GitHub issue by timdream on 2012-09-21T06:40:00Z, https://github.com/mozilla-b2g/gaia/issues/5003]
STR:
1. Open browser app, go to http://people.mozilla.com/~tchien/
2. Press `empty.pdf`.
Expected:
1. Some kind of error dialog, and perhaps the app should close itself after the user dismiss the dialog.
Actual:
1. No warning and the loading progress bar stays empty
Note:
- On Firefox Desktop this will trigger a alert info bar with error [This PDF document might not be displayed correctly.]
[GitHub comment by autonome on 2012-09-26T16:52:26Z]
We should at least provide the user feedback that it can't be displayed.
[GitHub comment by autonome on 2012-09-26T16:53:35Z]
@vingtetun who's the pdf js hacker to fix this?
Comment 3•14 years ago
|
||
[mass adding reproducible keyword for any open Gaia bug with the word "STR:" in comments]
Keywords: reproducible
Comment 4•14 years ago
|
||
(In reply to GH to BZ from comment #0)
> - On Firefox Desktop this will trigger a alert info bar with error [This PDF
> document might not be displayed correctly.]
On desktop, that bar will appear for other types of broken PDFs as well (I've seen it appear for some PDFs that are mostly okay but have some glitches). That notification is more useful on desktop because you can choose to open the PDF with an alternate viewer, but you can't do that on B2G.
Is the B2G browser doing anything to handle other kinds of errors? We should probably just make some generic error about the PDF being busted.
I'd be interested in helping with this, but I'd need a few pointers about where to jump into the pdf.js code.
| Assignee | ||
Comment 5•14 years ago
|
||
There is an issue with the author's expectations.
in pdf.js
line 589:
// Fatal errors that should trigger the fallback UI and halt execution by
// throwing an exception.
line 30706 (sic!):
// Add a logger so we can pass warnings on to the main thread, errors will
// throw an exception which will be forwarded on automatically.
Unfortunately this isn't true (anymore?). App does not quit on throwing an exception. Also there is a question if it is allowed to quit application by itself.
I believe that the use case (loading a pdf from the browser) justifies that it should be possible.
| Assignee | ||
Comment 6•14 years ago
|
||
In my opinion we should display the modal with the message and close the app after confirming it.
@vingtetun says that window.close should do the job.
| Assignee | ||
Comment 7•14 years ago
|
||
so, there is a need to find a way to call navigator and window from within a worker. No idea how to do it yet.
| Assignee | ||
Updated•14 years ago
|
Assignee: nobody → zaloon
| Assignee | ||
Comment 8•14 years ago
|
||
Comment 9•14 years ago
|
||
(In reply to Piotr Zalewa [:zalun] from comment #8)
> please r? https://github.com/mozilla-b2g/gaia/pull/5772
Thanks for the patch! I've left some feedbacks on Github, please address them accordingly.
| Assignee | ||
Comment 10•14 years ago
|
||
r? https://github.com/mozilla/pdf.js/pull/2264
This bug should be moved to PDF.js ...
Comment 11•14 years ago
|
||
(In reply to Piotr Zalewa [:zalun] from comment #10)
> r? https://github.com/mozilla/pdf.js/pull/2264
>
> This bug should be moved to PDF.js ...
zalun, now the that |window.alert()| is available on inline activity frames, do you want to submit another pull request to gaia for review besides changes on PDF.js side?
| Assignee | ||
Comment 12•14 years ago
|
||
It is there and working great on my emulator :)
In the same pull request - waiting for second (or third?) code review
| Assignee | ||
Comment 13•14 years ago
|
||
squashed pull request: https://github.com/mozilla/pdf.js/pull/2298
Comment 14•14 years ago
|
||
Blocking-, per driver triage. To land, ask for approval on the patch, explaining level of risk involved in the fix.
blocking-basecamp: + → -
| Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 15•14 years ago
|
||
It is still out of the gaia master - should I do it or is this somehow automated and not yet merged?
Comment 16•14 years ago
|
||
You have to submit a pull request to update gaia (after you build pdf.js with 'node make b2g'). See https://github.com/mozilla-b2g/gaia/pull/5638 as example.
| Assignee | ||
Comment 17•14 years ago
|
||
reopening - needs to be merged first
https://github.com/mozilla-b2g/gaia/pull/6169
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•14 years ago
|
Component: Gaia → Gaia::PDF Viewer
| Assignee | ||
Comment 18•13 years ago
|
||
It's been more than a month and this PR is still open ...
Comment 19•13 years ago
|
||
(In reply to Piotr Zalewa [:zalun] from comment #18)
> It's been more than a month and this PR is still open ...
Do you have an r+ on that pull request? To ask for review, we usually attach a patch (or pointer to a PR) to the bug, then flip the r? flag on that, asking the appropriate reviewer (unfortunately, people often don't notice "in the wind" r? flags that don't include a reviewer).
As dietrich mentioned in comment 14, you'll also need to request approval explaining the risk/reward for landing the patch at this point.
Comment 20•13 years ago
|
||
We've updated pdf.js on gaia already a few times, so I'm pretty sure the code you added has already landed in gaia.
| Assignee | ||
Comment 21•13 years ago
|
||
Great - marking it as fixed then
Status: REOPENED → RESOLVED
Closed: 14 years ago → 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•