Closed Bug 1609466 Opened 5 years ago Closed 5 years ago

[Windows] Download dialog for application/zip (and any other mimetypes not listed in the registry) doesn't offer to open with the default application anymore

Categories

(Firefox :: File Handling, defect)

72 Branch
defect
Not set
critical

Tracking

()

VERIFIED FIXED
Firefox 74
Tracking Status
firefox-esr68 --- unaffected
firefox72 --- wontfix
firefox73 + verified
firefox74 + verified

People

(Reporter: styb.styb, Assigned: Gijs)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(2 files)

Attached image Image_mtzip.jpg (deleted) —

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

Steps to reproduce:

I set "Always ask" for all types of downloaded files.
When I click a link to download a ZIP file, the download dialog show the Browse button instead of the drop-down menu. This does not happen in the previous version of Firefox 71.

Actual results:

  1. The Browser button is show for the following MIME type: application/zip.

  2. The drop-down menu is shown only for the following MIME type: application/x-zip-compressed.

See attached Image-1.jpg

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
20200107212822

This does not happen in the previous version of Firefox 71.

Could you possibly find the exact regression range?
https://mozilla.github.io/mozregression/quickstart.html

I can reproduce this in Firefox 72.0.1, but when I tried finding the regression range, the result points to bug 1574372 which is marked as fixed in Firefox 73. That doesn't add up.

Status: UNCONFIRMED → NEW
Has Regression Range: --- → no
Component: Untriaged → File Handling
Ever confirmed: true
Summary: mime type application/zip → Download dialog for application/zip doesn't offer to open with the default application anymore

[Tracking Requested - why for this release]: UI broken, default application is not showing in helper dialog

I can reproduce the issue on Nightly74.0a1, 73.0b5 as well as 72.0.1 Windows10, but I cannot reproduce on 71.0.1.

STR

  1. Open https://ftp.mozilla.org/pub/firefox/nightly/2004/02/2004-02-10-08-trunk/
  2. Click MozillaFirebird-win32.zip

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=bcbb45f7d4f1b22fc74d2ee96b92c6f2233495aa&tochange=ed5828f8c8ed5d263859379762a585770e59b78b

Has Regression Range: no → yes
Has STR: --- → yes
Flags: needinfo?(gijskruitbosch+bugs)

another STR

  1. Open https://www.fosshub.com/SMPlayer.html
  2. Click on "SMPlayer 64-bit Portable"

The problem here is that Windows claims that .zip has a mimetype of application/x-zip-compressed rather than application/zip, and this throws off our logic. Still digging to see how exactly this is breaking things and what our options are.

(In reply to Alice0775 White from comment #3)

another STR

  1. Open https://www.fosshub.com/SMPlayer.html
  2. Click on "SMPlayer 64-bit Portable"

The same for RAR file

  1. Open https://www.rarlab.com/themes.htm
  2. Click on any download link

I have encountered this issue for archive files such as zip, 7zip, rar, and not for other file types such as pdf, txt, jpg, mp3, mp4.

(In reply to :Gijs (he/him) from comment #4)

The problem here is that Windows claims that .zip has a mimetype of application/x-zip-compressed rather than application/zip, and this throws off our logic. Still digging to see how exactly this is breaking things and what our options are.

That and there's no mime entry in the registry for application/zip, so this call fails, so we enter this path and bail early from the function.

Previously, we would first check for an extension from the mimetype, use that if possible, and otherwise use the file extension as passed.

So the change from bug 1597985 will have caused this regression for any extension/mimetype combination where the Windows registry does not have extension information at all for the mimetype the server sends.

The problem is, that list is long and unknowable. The list of known mimetypes I'm seeing in my own Win10 registry is comparatively short. I count under 200 entries, whereas http://www.iana.org/assignments/media-types/media-types.xhtml has about 2500. Even obvious things like Microsoft's own Word/Powerpoint/Excel documents do not make an appearance (I don't have MS Office installed, but esp. for word docs, Wordpad/Write can open them -- and the extensions are in the registry, just not the mimetypes; unclear whether installing Office would add those mime types).

Assignee: nobody → gijskruitbosch+bugs
Severity: normal → critical
Status: NEW → ASSIGNED
Flags: needinfo?(gijskruitbosch+bugs)
Summary: Download dialog for application/zip doesn't offer to open with the default application anymore → [Windows] Download dialog for application/zip (and any other mimetypes not listed in the registry) doesn't offer to open with the default application anymore
Depends on: 1609678
No longer depends on: 1609678
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/4c34f33d529c offer 'open with' options even when Windows is clueless about the mimetype, r=bzbarsky
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74

Comment on attachment 9121289 [details]
Bug 1609466 - offer 'open with' options even when Windows is clueless about the mimetype, r?bzbarsky

Beta/Release Uplift Approval Request

  • User impact if declined: Broken downloads
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment 2
  • List of other uplifts needed: n/a
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): We're basically making the windows file handling code more relaxed about how it deals with gaps in the Windows Registry's list of file extensions and mimetypes.
  • String changes made/needed: Nope
Attachment #9121289 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Reproduced the initial issue on Firefox 72.0.1 and Firefox 73.0b5.

Verified fixed the issue on Windows 10 x64 and Windows 7 x64 using latest Nightly 74.0a1 (https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&selectedJob=285289873): the "Open with" options are correctly displayed for ZIP files (tested on https://www.nirsoft.net/utils/wirelessnetview.zip and https://ftp.mozilla.org/pub/firefox/nightly/2004/02/2004-02-10-08-trunk/), for png, jpg and pdf.
For .rar and .7z (https://www.rarlab.com/themes.htm / https://www.fosshub.com/SMPlayer.html), I still have "Browse" button instead of "Open with" options, but this is because my Windows Registry doesn't contain .rar and .7z.

Will verify it on 73 too when the fix is approved.

(In reply to Camelia Badau [:cbadau], Release Desktop QA from comment #12)

For .rar and .7z (https://www.rarlab.com/themes.htm / https://www.fosshub.com/SMPlayer.html), I still have "Browse" button instead of "Open with" options, but this is because my Windows Registry doesn't contain .rar and .7z.

Just to confirm, does this match what happens on 71, too?

Flags: needinfo?(camelia.badau)

(In reply to :Gijs (he/him) from comment #13)

(In reply to Camelia Badau [:cbadau], Release Desktop QA from comment #12)

For .rar and .7z (https://www.rarlab.com/themes.htm / https://www.fosshub.com/SMPlayer.html), I still have "Browse" button instead of "Open with" options, but this is because my Windows Registry doesn't contain .rar and .7z.

Just to confirm, does this match what happens on 71, too?

Yes, on Firefox 71.0 (20191202093317) it's the same behavior: "Browse" button is displayed instead of "Open with" options for .rar and .7z.

Flags: needinfo?(camelia.badau)

Comment on attachment 9121289 [details]
Bug 1609466 - offer 'open with' options even when Windows is clueless about the mimetype, r?bzbarsky

Fixes a downloading regression. Approved for 73.0b7.

Attachment #9121289 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified fixed on Windows 10 x64 and Windows 7 x64 using Firefox 73 Beta 7: the "Open with" options are correctly displayed for ZIP files (tested on https://www.nirsoft.net/utils/wirelessnetview.zip and https://ftp.mozilla.org/pub/firefox/nightly/2004/02/2004-02-10-08-trunk/), for png, jpg and pdf.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: