Closed
Bug 1452954
Opened 7 years ago
Closed 7 years ago
Firefox cannot open PDFs because pdf.js viewer is not available in this profile
Categories
(Firefox :: File Handling, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 218257
People
(Reporter: aam141, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180323154952
Steps to reproduce:
I don't recall changing anything in Firefox except installing the usual updates. The issue appears whenever I attempt to open a PDF file (it appears to be any PDF). Restarting in safe mode does not fix the issue, but creating a new profile does.
Actual results:
The first time I noticed the issue, clicking on a PDF link caused Firefox to open an endless sequence of new (blank) tabs. Now, Firefox opens the "What should Firefox do with this file?" type dialog, and if I keep my default of opening with Firefox, it either opens the Save File dialog or opens another tab asking me "What should Firefox do with this file?" in and endless loop.
Expected results:
I'd expect the "What should Firefox do with this file?" type dialog to appear once, and for one of the options to let me view the PDF in the standard pdf.js viewer.
Comment 1•7 years ago
|
||
1. Enter about:support into the location bar.
2. Click the Open Folder button. This opens a file manager window with your Firefox profile folder.
3. Exit Firefox.
4. Back in the file manager window, delete the handlers.json file.
If you get a "What should Firefox do with this file?" dialog and you choose to open with Firefox, that will create an infinite loop. That dialog is for external applications only, and you're not supposed to be able to pick Firefox there [1]. To do that safely, use the Open in Browser extension [2].
The only way to view PDFs in Firefox is to set the action to "Preview in Firefox" in about:preferences. However, servers can still trigger the "What should Firefox do with this file?" dialog, usually by sending the Content-Disposition: attachment header. One way to get around that is the Bypass Forced Download extension [3]. Less commonly, they can also fail to correctly identify the file type by sending Content-Type: application/octet-stream. Extensions like Header Editor can override that [4].
[1] Bug 218257
[2] https://addons.mozilla.org/firefox/addon/open-in-browser/
[3] https://addons.mozilla.org/firefox/addon/bypass-forced-download/
[4] https://addons.mozilla.org/firefox/addon/header-editor/
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Component: Untriaged → File Handling
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•7 years ago
|
||
(In reply to Gingerbread Man from comment #1)
> 1. Enter about:support into the location bar.
> 2. Click the Open Folder button. This opens a file manager window with your
> Firefox profile folder.
> 3. Exit Firefox.
> 4. Back in the file manager window, delete the handlers.json file.
>
>
> If you get a "What should Firefox do with this file?" dialog and you choose
> to open with Firefox, that will create an infinite loop. That dialog is for
> external applications only, and you're not supposed to be able to pick
> Firefox there [1]. To do that safely, use the Open in Browser extension [2].
>
> The only way to view PDFs in Firefox is to set the action to "Preview in
> Firefox" in about:preferences. However, servers can still trigger the "What
> should Firefox do with this file?" dialog, usually by sending the
> Content-Disposition: attachment header. One way to get around that is the
> Bypass Forced Download extension [3]. Less commonly, they can also fail to
> correctly identify the file type by sending Content-Type:
> application/octet-stream. Extensions like Header Editor can override that
> [4].
>
>
> [1] Bug 218257
> [2] https://addons.mozilla.org/firefox/addon/open-in-browser/
> [3] https://addons.mozilla.org/firefox/addon/bypass-forced-download/
> [4] https://addons.mozilla.org/firefox/addon/header-editor/
Thanks! Somehow it seems to have fixed itself. PDFs now open correctly with the built-in viewer. I checked my settings and "Preview in Firefox" is now the selected option. Funny that it wasn't there at all when I tried to select it, but since everything is working now, I'll take it as it is.
Thanks also for those references, those will be useful if I ever run into further problems.
You need to log in
before you can comment on or make changes to this bug.
Description
•