Bug: PDF downloads to UNC path on Windows fail to open and leave Firefox unusable
Status: RESOLVED
Priority: --
Resolution: INCOMPLETE
Created: 2022-09-08 19:28:42+00:00
Resolved: 2023-10-03 12:04:22+00:00

Steps to reproduce:

1. Use the non-ESR 64-bit Windows version of Firefox 103.0, 103.0.1, 103.0.2, 104.0, 104.0.1, 104.0.2, and 105.0b8.

2. Set download location to Windows UNC path (in this case, a user profile download folder redirected to a network share, like \\server\users$\username\Downloads). Enable “Always ask where to save downloaded files.” Make sure PDFs are set to open directly in Firefox.

3. Go to a website that links to a PDF in such a way as to trigger the download and open the PDF in a new tab. This is key. Sites that open the PDF inline in the current tab do not cause this issue. I’m not a Web developer, so I’m not clear on the mechanics here, but I can reproduce this on three separate sites, that unfortunately require login information, so I’m not including them here. From my untrained eye, they appear to not link directly to the PDF, but instead do an initial request that ends up redirecting to the download. I can’t find more information from within Firefox, because once the new tab is open, Firefox never lets me switch back to the originating tab, whether by clicking on the tab with my mouse or using CTRL+SHIFT+TAB or CTRL+TAB on my keyboard.

4. Click the link to the PDF.


Actual results:

1. A new _empty_ tab opens, with this URL
file://///server/users$/username/Downloads/000000.word_000000000000-0.pdf

I’ve redacted the URL, but I definitely confirm _6_ forward slashes after “file:”, and a single forward slash everywhere else, and the alphanumeric nomenclature of the file name is the same. 

2. The download shelf opens and the download completes correctly. One can open the PDF from File Explorer. Clicking the folder icon beside the file name in the download shelf opens the folder in File Explorer correctly.

3. Attempting to double-click on the file entry in the list of downloads still displayed on screen opens a second tab with the above URL. Every double-click opens a new tab with the above URL every time.

4. Right-clicking in any of these empty tabs shows an extremely lengthy context menu that seems to include every element for all the web page context menus in Firefox.

5. Attempt to change tabs: Firefox only highlights the tab when you mouse over it, but does not respond to clicks, and does not change tabs. With the favourite bar displayed, any attempt to click on any favourites does not visit the site. A right-click on a favourite selecting “Open in a new tab” opens a new tab in the background and appears to correctly load the site (based on activity in the tab header), but clicking on the new tab does not display it.

6. Closing tabs is mostly possible, while sometimes one of the empty tabs with the above URL refuses to close (I have not been able to systematically reproduce this specific issue).

7. Opening the Firefox hamburger menu is possible, but clicking on “Settings” does not open a new tab with the settings.

So Firefox is not “frozen,” but it has become unusable.

7. Quitting Firefox by closing the window, or selecting “Quit” in the hamburger menu is possible. After starting Firefox, it is once again usable.

----

I have a couple of screencasts of one of the sites where we hit the systematically reproducible problem, but it contains personally identifiable information. I won’t mind sharing it privately with a developer that is looking to confirm the issue, but I don’t want to post it publicly.  One screencast shows it working in 102.0.1 and 102.2.0, and one with it not working in 103.0 (at as noted above, all versions up to 105.0b8).


Expected results:

The same thing that happens in version 102.0.1 and ESR 102.2.0 : the PDF is downloaded and displayed in a new tab, with Firefox’s UI continuing to be fully responsive.