Closed Bug 1983032 Opened 9 months ago Closed 1 month ago

DisableBuiltInPDFViewer set to false causes handler.json preferences for PDF handling to be overridden at startup

Categories

(Firefox :: File Handling, defect, P3)

Firefox 140
x86_64
Windows 11
defect

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox-esr140 --- fixed
firefox152 --- fixed

People

(Reporter: peter.bos, Assigned: mkaply)

References

Details

Attachments

(4 files)

Steps to reproduce:

  • enable pdfjs through policy
  • start firefox.
  • change PDF-Handler to windows default app (Edge or Acrobat, doesn't matter)
  • close firefox
  • start firefox again

Actual results:

As I controlled in the handler.json the action is changed back from 4 to 3 at startup of firefox.

Expected results:

The setting should not be changed without user interaction

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

Component: Untriaged → PDF Viewer

(In reply to BugBot [:suhaib / :marco/ :calixte] from comment #1)

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

I believe this is a bug from the application itself, because the handler.json is changed during startup.

Component: PDF Viewer → General
OS: Unspecified → Windows 11
Hardware: Unspecified → x86_64
Component: General → Session Restore

File Handling looks to be a better component.

Component: Session Restore → File Handling

(In reply to Peter Bos from comment #0)

Steps to reproduce:

  • enable pdfjs through policy

What do you mean specifically by this? If you omit the policy configuration in question, does the problem go away?

Flags: needinfo?(peter.bos)

I need to know the exact policy being used, but we did change the behavior of DisableBuiltinPDFViewer in bug 1955934.

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

(In reply to Peter Bos from comment #0)

Steps to reproduce:

  • enable pdfjs through policy

What do you mean specifically by this? If you omit the policy configuration in question, does the problem go away?

We are using domain joined computers and there is a group policy defined.
The entry
Mozilla/Firefox/PDF.js/activate PDF.js (integrated PDF viewer)
is enabled.
I have no chance to omit the whole policy.
If you can tell me where this information is stored in the registry, I can try to manually disable this entry for testing.

Flags: needinfo?(peter.bos)

All that policy does is flip the preference pdfjs.disabled. It has no effect on handlers (and that behavior hasn't changed in a long time)

The registry value is

Software\Policies\Mozilla\Firefox\PDFjs\Enabled

Can you please share about:support information (Help > More troubleshooting information, "copy raw data", attach to this bug by pasting in the file attachment box at the top) ? I'm pretty confused as to why anything would be modifying handlers.json - as Mike says, the policy in question shouldn't do this, nor should anything else, AFAIK.

Does the behaviour also happen on a clean Firefox profile on the same machine (with the same group policy applied)?

Flags: needinfo?(peter.bos)
Flags: needinfo?(peter.bos)

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

Can you please share about:support information (Help > More troubleshooting information, "copy raw data", attach to this bug by pasting in the file attachment box at the top) ? I'm pretty confused as to why anything would be modifying handlers.json - as Mike says, the policy in question shouldn't do this, nor should anything else, AFAIK.

Does the behaviour also happen on a clean Firefox profile on the same machine (with the same group policy applied)?

Yes, the behavior is the same.

(In reply to Mike Kaply [:mkaply] from comment #7)

All that policy does is flip the preference pdfjs.disabled. It has no effect on handlers (and that behavior hasn't changed in a long time)

The registry value is

Software\Policies\Mozilla\Firefox\PDFjs\Enabled

I have manually changed this setting in the registry.

But the handlers.json is changed during program start to action:3.

I've changed it in Firefox to Acrobat Reader and the action:2 was set with the path to AcroRd32.exe.
But after restart of Firefox the action:3 has been set automatically but still leave the path to AcroRd32.exe in the json.

Can you post about:policies as well?

I know what's going on here.

DisableBuiltInPDFViewer set to false is not working properly.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Workaround is to remove DisableBuiltInPDFViewer from your policy (you don't need it) but I will fix.

Assignee: nobody → mozilla
Status: NEW → ASSIGNED

The severity field is not set for this bug.
:Gijs, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gijskruitbosch+bugs)
Severity: -- → S3
Flags: needinfo?(gijskruitbosch+bugs)
Priority: -- → P3
Summary: handler.json is overridden at startup → DisableBuiltInPDFViewer set to false causes handler.json preferences for PDF handling to be overridden at startup
Attachment #9511183 - Attachment description: Bug 1983032 - Only revert PDF handler to built-in if policy originally set it. r?Gijs → Bug 1983032 - Don't revert PDF handler at every startup r?Gijs
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
Duplicate of this bug: 2024569

Given the dupes, and the enterprise impact, how would you feel about requesting 140 ESR uplift? (Does that support the "runonce" primitives?)

Flags: needinfo?(mozilla)

Yep, it will work there. I'll request.

Flags: needinfo?(mozilla)

(In reply to Mike Kaply [:mkaply] from comment #22)

Yep, it will work there. I'll request.

Is there a plan to implement it to Firefox ESR?
In 140.11.0esr (64-Bit) it is still not working.

(In reply to Peter Bos from comment #23)

(In reply to Mike Kaply [:mkaply] from comment #22)

Yep, it will work there. I'll request.

Is there a plan to implement it to Firefox ESR?
In 140.11.0esr (64-Bit) it is still not working.

Adding needinfo for this.

Flags: needinfo?(mozilla)

Yeah that was my miss. I'll request

Flags: needinfo?(mozilla)
QA Whiteboard: [qa-triage-done-c153/b152] [qa-ver-needed-c153/b152]
Flags: qe-verify+
Attachment #9589789 - Flags: approval-mozilla-esr140?

firefox-esr140 Uplift Approval Request

  • User impact if declined/Reason for urgency: PDF Handler gets reset at every startup if set a certain way by policy.

This is a policy only change, for 152 parity.

  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Policy only.
  • String changes made/needed?: N/a
  • Is Android affected?: no
Flags: in-testsuite+
Attachment #9589789 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+
QA Whiteboard: [qa-triage-done-c153/b152] [qa-ver-needed-c153/b152] → [qa-triage-done-c153/b152] [qa-ver-needed-c153/b152][uplift]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: