browser.commands.onCommand stops working after the auto-update of addon until browser reload
Categories
(WebExtensions :: General, defect, P2)
Tracking
(firefox-esr115 unaffected, firefox123 wontfix, firefox124 wontfix, firefox125 verified, firefox126 verified)
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox123 | --- | wontfix |
firefox124 | --- | wontfix |
firefox125 | --- | verified |
firefox126 | --- | verified |
People
(Reporter: maxbadryzlov, Assigned: dao)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1881820 - Tweak browser_ext_sidebarAction to cover the fix with a regression test. r?willdurand!
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
Steps to reproduce:
- Open Firefox in a new profile
- Install the last but one nightly build of Sidebery from here: https://github.com/mbnuqw/sidebery/releases/tag/v5.1.1
- Open a new window
- Check that shortcuts works ok: F1(win)/Ctrl+E to open/close sidebar, Alt+Up/Down to select tabs, Alt+Space to activate selection...etc
- In about:addons menu click on the "Check for Updates" option.
Actual results:
After update shortcuts stop working in one of the windows.
Output of Browser Console:
- On update:
20:38:46.946 WebExtension context not found! ExtensionParent.sys.mjs:1276:13
getContextById resource://gre/modules/ExtensionParent.sys.mjs:1276
recvRemoveListener resource://gre/modules/ExtensionParent.sys.mjs:1255
_recv resource://gre/modules/ConduitsChild.sys.mjs:77
receiveMessage resource://gre/modules/ConduitsParent.sys.mjs:469
- On pressing keybindings that should work: No messages
- On pressing "F1(win)/Ctrl+E" keybinding to trigger
_execute_sidebar_action
:
20:41:28.476 TypeError: can't access property "canAccessWindow", this.extension is null ext-sidebarAction.js:386:9
triggerAction chrome://browser/content/parent/ext-sidebarAction.js:386
buildKey resource://gre/modules/ExtensionShortcuts.sys.mjs:463
Expected results:
Shortcuts should work in all windows.
mozregression:
Last good revision: ecab7f04e7d616a69e1d213ac8e660ebae99926d
First bad revision: 214490a419fb2f60b4ea03f3bf17c3f0d5bb4d09
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=ecab7f04e7d616a69e1d213ac8e660ebae99926d&tochange=214490a419fb2f60b4ea03f3bf17c3f0d5bb4d09
API usage:
browser.commands.onCommand.addListener
called on sidebar initialization: https://github.com/mbnuqw/sidebery/blob/192493d11c2980837c1c23a2434f1384e2737931/src/services/keybindings.actions.ts#L1161, https://github.com/mbnuqw/sidebery/blob/192493d11c2980837c1c23a2434f1384e2737931/src/sidebar/sidebar.ts#L144
Repo issues:
https://github.com/mbnuqw/sidebery/issues/1477
https://github.com/mbnuqw/sidebery/issues/1470
https://github.com/mbnuqw/sidebery/issues/1242
Comment 1•1 year ago
|
||
Hello,
I reproduced the issue on the latest Nightly (125.0a1/20240225092952), Beta (124.0b3/20240223091706) and Release (123.0/20240213221259) under Windows 10 x64.
As per the steps to reproduce, once the extension is updated, the sidebar in the new opened window becomes blank and shortcuts do not work at all. I can click the toolbar button to close/re-open the sidebar, which will populate it with the tabs I have open, however, shortcuts still do not work.
Performing the shortcuts that should work do not log any messages in the browser console, apart from the “F1” keybind that produces the error message mentioned in Comment 0.
The only difference I see on my end is the lack of a warning/error when updating the extension as opposed to what is mentioned in the report.
Comment 2•1 year ago
|
||
Setting Regressed by
field after analyzing regression range found by mozregression in comment #0.
Comment 3•1 year ago
|
||
Set release status flags based on info from the regressing bug 1835890
:dao, since you are the author of the regressor, bug 1835890, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 4•1 year ago
|
||
Luca, can you please apply Priority/Severity settings to this report when you get a chance? It will help with release management's triage.
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 5•1 year ago
|
||
(In reply to Bob Hood [:bhood] from comment #4)
Luca, can you please apply Priority/Severity settings to this report when you get a chance? It will help with release management's triage.
I'd appreciate that too. I'm planning on setting aside some time to look into this, and would prioritize that based on this bug's categorization.
Comment 6•11 months ago
|
||
We shouldn't break shortcut functionality under these circumstances.
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Comment 7•11 months ago
|
||
Comment 8•11 months ago
|
||
Depends on D205440
Comment 9•11 months ago
|
||
Depends on D205753
Assignee | ||
Updated•11 months ago
|
Comment 10•11 months ago
|
||
Comment 11•11 months ago
|
||
Comment 12•11 months ago
|
||
bugherder |
Updated•11 months ago
|
Assignee | ||
Comment 13•11 months ago
|
||
Comment on attachment 9392744 [details]
Bug 1881820 - Handle SidebarUI not being initialized in updateShortcut. r=rpl
Beta/Release Uplift Approval Request
- User impact if declined: see comment 0
- 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 0
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This is a minimal fix. Luca's patch should make this more robust long-term, but I don't think we need to uplift that.
- String changes made/needed:
- Is Android affected?: No
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Comment 14•11 months ago
|
||
Comment on attachment 9393350 [details]
Bug 1881820 - Tweak browser_ext_sidebarAction to cover the fix with a regression test. r?willdurand!
Beta/Release Uplift Approval Request
- User impact if declined: n/a (this is the test complementing the fix)
- 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 0
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): this is just a test
- String changes made/needed:
- Is Android affected?: No
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Updated•11 months ago
|
Updated•11 months ago
|
Comment 15•11 months ago
|
||
Comment on attachment 9393350 [details]
Bug 1881820 - Tweak browser_ext_sidebarAction to cover the fix with a regression test. r?willdurand!
Approved for 125.0b6.
Updated•11 months ago
|
Updated•11 months ago
|
Comment 16•11 months ago
|
||
uplift |
Updated•11 months ago
|
Assignee | ||
Updated•11 months ago
|
Comment 17•11 months ago
|
||
I verified the fix on the latest Nightly (126.0a1/20240328213634) under Windows 10 and Ubuntu 22.04 LTS using the steps from Comment 0 and the shortcuts continue to work in the newly opened window after the extension has been updated. Additionally, no more errors are logged to the browser console.
For comparison I also performed the STR on the latest Beta 125.0b5 (125.0b5/20240327092250), which does not have the fix and the issue is of course still reproducible.
I’ll wait for the release of Beta 125.0b6 to verify the fix there as well, but in the meantime, I will close this issue as Verified-Fixed.
Updated•11 months ago
|
Comment 18•11 months ago
|
||
Verified as Fixed. Tested on the latest Beta (125.0b6/20240329091918) under Windows 10 and Ubuntu 22.04 LTS using the steps from Comment 0.
The shortcuts continue to work in the newly opened window after the extension has been updated. Additionally, no more errors are logged to the browser console.
Comment 19•11 months ago
|
||
Comment on attachment 9393353 [details]
Bug 1881820 - Wait for SidebarUI to be initialized before trying to update extension sidebar action shortcut. r?robwu!
Revision D205755 was moved to bug 1889096. Setting attachment 9393353 [details] to obsolete.
Updated•10 months ago
|
Description
•