Notification bar created by RelaunchRequired enterprise policy is not replicated to Firefox windows created subsequently
Categories
(Firefox :: Messaging System, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr153 | --- | fixed |
| firefox159 | --- | wontfix |
| firefox160 | --- | wontfix |
| firefox161 | --- | fixed |
People
(Reporter: bugzilla, Assigned: mkaply)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 external files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:159.0) Gecko/20100101 Firefox/159.0
Steps to reproduce
- Implemented the new RelaunchRequired enterprise policy
- The 159b4 update was automatically applied in the background
- Waited until the notification bar spawned due to the policy was shown: "A new version of Firefox is available. Your administrator will restart your browser at…"
- Ignored the prompt to Update now and instead created a new window using File > New Window
Actual results
The notification bar is not shown on the new window.
Expected results
The notification bar should be shown on the new window so that the user continues to be prompted to Update now
| Reporter | ||
Updated•26 days ago
|
| Assignee | ||
Comment 2•19 days ago
|
||
This isn't specific to RelaunchRequired: no universal infobar shows up in a window opened after the bar first appears.
When a new window opens, InfoBar gets a domwindowopened notification and calls _showWhenLoaded. That function shows the bar right away if the window's readyState is "complete", and otherwise waits for load. At domwindowopened the window still has its initial about:blank document, which already reports "complete". So _showWhenLoaded doesn't wait: it finds no tabbrowser yet and gives up without showing anything.
The other caller, showNotificationAllWindows, only calls _showWhenLoaded for windows that are still loading. So neither caller can reach the "show right away" branch with a window that is actually ready. Only tests reached it, by passing windows that were already loaded or faked as complete, which is why this wasn't caught.
The fix removes that branch so _showWhenLoaded always waits for load. It updates those two tests and adds a test that opens a real window and checks that the bar appears in it.
| Assignee | ||
Comment 3•19 days ago
|
||
Updated•19 days ago
|
| Assignee | ||
Comment 4•13 days ago
|
||
This also affects the Terms of Use infobar. The tou-experience-0 rollouts (US and non-US) ship tou-experience-0-white-infobar and tou-experience-0-blue-infobar as universal infobars, so they never appear in windows opened after the bar first shows. I confirmed it locally with the real tou-experience-0-white-infobar message: without this patch it shows in the original window but not in a new one; with the patch it shows in both.
Universal infobars have missed new windows since they were introduced in bug 1960078. At domwindowopened the window still has its initial about:blank document, which already reports readyState "complete", so the show-immediately branch ran before the browser document loaded. Originally that threw; later it returned silently.
thanks for catching this and for the fix. One small correction, Universal infobars did trigger in new windows, running mozregression it looks like it's been broken since 147:
6:41.38 INFO: Last good revision: 37f1c536fdb89cd69039774a87f3ad8a94b95328
6:41.38 INFO: First bad revision: 86c4f03a43058ea62f76021ad5a50e6199c34567
6:41.38 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=37f1c536fdb89cd69039774a87f3ad8a94b95328&tochange=86c4f03a43058ea62f76021ad5a50e6199c34567
however, the "regressor" highlighted that the infobar code wasn't right about what complete meant
| Assignee | ||
Updated•13 days ago
|
Updated•13 days ago
|
Comment 6•13 days ago
|
||
Set release status flags based on info from the regressing bug 543435
Updated•12 days ago
|
Comment 8•12 days ago
|
||
| bugherder | ||
Comment 9•12 days ago
|
||
The patch landed in nightly and ESR is affected.
:mkaply, please make an uplift decision for ESR:
- For ESR, nominate the patch for the appropriate ESR uplift approval if the fix should be included in ESR, or set the ESR status flag(s) to
wontfixif an uplift isn't needed. Each affected ESR release needs a decision.
Uplift requests can be submitted from Lando: D336938.
See Requesting an Uplift for documentation on how to request an uplift.
For more information, please visit BugBot documentation.
Comment 10•11 days ago
|
||
firefox-esr153 Uplift Approval Request
- User impact if declined/Reason for urgency: Infobar for TOS and forced update doesn't show in all windows.
Regression
- 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: Actually makes the code more reliable
- String changes made/needed?: None
- Is Android affected?: no
| Assignee | ||
Comment 11•11 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D336938
| Assignee | ||
Updated•11 days ago
|
Updated•2 days ago
|
Updated•2 days ago
|
Comment 12•2 days ago
|
||
| uplift | ||
Description
•