Open Bug 1714848 Opened 5 years ago Updated 4 years ago

PDF is opened on another application rather than on Firefox

Categories

(Firefox :: File Handling, defect, P2)

Firefox 89
x86_64
Windows 10
defect

Tracking

()

Tracking Status
firefox89 --- wontfix
firefox90 --- wontfix
firefox91 --- wontfix
firefox92 --- fix-optional

People

(Reporter: mario.romandono, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

Attached video PDF_bug.mp4 (obsolete) —

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

Steps to reproduce:

  1. In 'Settings', change PDF action to 'Always ask'
  2. Download from Internet two PDFs
  3. First, select 'Open with application' (in my case, Adobe Acrobat Reader DC), and in the other dialog, 'Open with Firefox'

The problem can be reproduced on the latest Nightly (Build ID: 20210605211222) and in a new profile. But, as you can see in the video, its appearance may be a little bit random (at first, it worked as expected, but when I tried again, it failed). Also, I'm not sure if it happens because Adobe is my default PDF reader, I tried a couple of types selecting another application like Chrome and I could not reproduce the bug.

I don't know if this bug is somehow related to this one: https://bugzilla.mozilla.org/show_bug.cgi?id=1680147

Actual results:

Both of the PDFs were opened on Adobe Acrobat Reader DC.

Expected results:

One PDF should be opened on Adobe Acrobat Reader DC and the other one on Firefox.

OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64

The User Agent specified in the comment is wrong, Bugzilla got it from my usual Firefox installation but the bug happens too in the latest Nightly build, whose User Agent is "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0". (I don't know how to edit my comment, sorry if it's possible and I just didn't see the option)

The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → PDF Viewer

Hi mario.romandono!
I've followed the steps mentioned in the description but unfortunately, I was unable to reproduce this issue on latest Nightly version 91.0a1 (2021-06-07)(64-bit) on Windows 10 with a new profile.
Please could you try to update to the latest Nightly and try it again? In case you can reproduce it, please could you add Browser Console screen (Hamburger > More Tools > Browser Console)?
Thanks!

Flags: needinfo?(mario.romandono)

Hi Marcela!

I tried it again with the latest Nightly and I was able to reproduce it. I've attached another video that shows the steps I've followed in order to reproduce it along with the Browser Console screen. I've attached a screenshot of the Browser Console, too.

If you need more info, just ask and I'll try to provide it :)

Flags: needinfo?(mario.romandono)
Attachment #9225449 - Attachment is obsolete: true
Attached image Browser Console.png

Thanks for your reply.
I was able to reproduce it in the latest version of Nightly 91.0a1 (2021-06-08), Beta 90.0b4, and release 88.0 on Windows 10, following the steps below:

  1. Set Adobe Acrobat Reader DC application as default in Windows (Settings - Application - Default applications)
  2. Open the latest Nightly
  3. Under "Settings", change the PDF action to "Always ask".
  4. Download two PDF files from the Internet
  5. Select 'Open with application' (Adobe Acrobat Reader DC), and in the other dialog box, 'Open with Nightly'
  6. Close the open tab and close the Adobe Acrobat Reader DC app
  7. Repeat steps 4 and 5.

Actual result:
The second pdf file was opened by Adobe Acrobat Reader DC app instead of doing with Nightly Browser.

Note: If the Adobe Acrobat Reader DC application is not set as the default in Windows, the problem cannot be reproduced.

I've found this Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=97e55e64d159e0186b4630567f1b4d7cd8a9b98d&tochange=2420dc816657755690aa835e081e33c431d883e

I will attach a file with evidence and I'll change the flags accordingly.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Ever confirmed: true
Component: PDF Viewer → File Handling
Regressed by: 1657796
Priority: -- → P2

Sam, any idea how your patch may have affected this behavior?

Flags: needinfo?(sfoster)

(In reply to Marco Bonardo [:mak] from comment #9)

Sam, any idea how your patch may have affected this behavior?

Its certainly plausible that patch changed this behavior. When you answer the "how would you like to open this file..." dialog, that updates the setting for all files of that type, not just that specific download. And the patch on 1657796 changed up that logic. Let me dig some more though.

The preferedAction is associated with the mime-info for each mime-type, not the individual download. That said, I'm not yet clear exactly why the patch regressed this behavior - or how it worked originally for this case.

So this seems to be a race condition and will depend on if one download takes longer than another. If you selected "Use Firefox" when asked on the first download and "Use system default" on the second download, when the first download completes we ask the MIME service for how to handle PDF files and use the most recent value which in this case is the system default (Acrobat.)

Flags: needinfo?(sfoster)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: