Open Bug 1898443 Opened 6 months ago Updated 6 months ago

Opening the browser toolbox should not ask the user to install updates (disable automatic updates by default)

Categories

(DevTools :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

(Blocks 1 open bug)

Details

When a Firefox update is available and it's not yet applied (or downloaded) opening the Browser Toolbox will present the software update dialog. This is irritating and could cause the browser to inspect no longer work if the user decides to run the update.

As such I feel that the Browser Toolbox profile should disable the software update mechanism.

We tried to fix this issue in Bug 1120863, so this might be a regression.

Henrik, which channel were you using when you had this issue? Nightly beta or release?

Depends on: 1120863
Flags: needinfo?(hskupin)

I was using Nightly when I observed the issue. Not sure which prefs the toolbox sets but I have customized update settings so it asks me to install updates and doesn't do it automatically. So maybe the wrong preference is set?

Flags: needinfo?(hskupin)
Summary: Opening the browser toolbox should not ask the user to install updates (disabe automatic updates by default) → Opening the browser toolbox should not ask the user to install updates (disable automatic updates by default)

(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from comment #2)

I was using Nightly when I observed the issue. Not sure which prefs the toolbox sets but I have customized update settings so it asks me to install updates and doesn't do it automatically. So maybe the wrong preference is set?

Maybe this bypasses our check, can you share which preference(s) you modified?

Flags: needinfo?(hskupin)

Settings I have are:

app.update.auto	false	
app.update.autodownload	disabled
Flags: needinfo?(hskupin)

I don't think this is a regression from Bug 1120863. That ticket made it so that launching Firefox as a Browser Toolbox didn't apply a pending update. This is asking a running Browser Toolbox instance to not behave like a regular Nightly Firefox, i.e., don't pump the update state machine. That's a reasonable request.

I can think of 3 ways to address this:

  1. Configure the Gecko profile used by the Browser Toolbox to avoid updates by setting Gecko preferences before we launch Firefox around https://searchfox.org/mozilla-central/rev/f60bb10a5fe6936f9e9f9e8a90d52c18a0ffd818/devtools/client/framework/browser-toolbox/Launcher.sys.mjs#180;
  2. Configure the Gecko profile used by the Browser Toolbox to avoid updates by setting Gecko preferences after startup, this time around https://searchfox.org/mozilla-central/rev/f60bb10a5fe6936f9e9f9e8a90d52c18a0ffd818/devtools/client/framework/browser-toolbox/window.js#128
  3. Modify the update service itself to not pump the update state machine when it's not a "regular" Firefox, probably by adding a clause around UpdateServiceStub.updateDisabled.

I think I prefer option 3. since disabling updates via Gecko preferences is fragile. (I'm assuming it's easy to determine if we're running as the Browser Toolbox at run time.)

bytesized: do you have a strong preference?

Julian: how do we determine at runtime whether we're a Browser Toolbox instance? Do we check the top-level chrome:// document in some way, like https://searchfox.org/mozilla-central/rev/f60bb10a5fe6936f9e9f9e8a90d52c18a0ffd818/toolkit/xre/nsAppRunner.cpp#4518?

Flags: needinfo?(jdescottes)
Flags: needinfo?(bytesized)

(In reply to Nick Alexander :nalexander [he/him] from comment #5)

I think I prefer option 3. since disabling updates via Gecko preferences is fragile. (I'm assuming it's easy to determine if we're running as the Browser Toolbox at run time.)

bytesized: do you have a strong preference?

If you are correct that it's reasonable to determine if we are currently running as the Browser Toolbox, then I think I agree.

Flags: needinfo?(bytesized)

(In reply to Nick Alexander :nalexander [he/him] from comment #5)

I don't think this is a regression from Bug 1120863. That ticket made it so that launching Firefox as a Browser Toolbox didn't apply a pending update. This is asking a running Browser Toolbox instance to not behave like a regular Nightly Firefox, i.e., don't pump the update state machine. That's a reasonable request.

Ah thanks for checking. So it was simply unnoticed because without those prefs the updates would just be downloaded but not applied.

Julian: how do we determine at runtime whether we're a Browser Toolbox instance? Do we check the top-level chrome:// document in some way, like https://searchfox.org/mozilla-central/rev/f60bb10a5fe6936f9e9f9e8a90d52c18a0ffd818/toolkit/xre/nsAppRunner.cpp#4518?

I think we can keep using that for now, or we could just set an environment variable when starting the Browser Toolbox? That might be easier to use and maintain.

Flags: needinfo?(jdescottes)
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.