messenger.runtime.openOptionsPage() no longer works from extension
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(Not tracked)
People
(Reporter: 52qtuqm9, Unassigned)
Details
Attachments
(1 file)
854 bytes,
application/x-xpinstall
|
Details |
I get this in the console when I call messenger.runtime.openOptionsPage()
from my extension's background script:
15:28:04.649 tab.browser is undefined mailCore.js:662
openAddonsMgr chrome://messenger/content/mailCore.js:662
openAddonsMgr chrome://messenger/content/mailCore.js:632
openOptionsPage chrome://messenger/content/parent/ext-mail.js:157
openOptionsPage chrome://extensions/content/parent/ext-runtime.js:202
result resource://gre/modules/ExtensionParent.sys.mjs:1144
withCallContextData resource://gre/modules/ExtensionParent.sys.mjs:627
result resource://gre/modules/ExtensionParent.sys.mjs:1143
withPendingBrowser resource://gre/modules/ExtensionParent.sys.mjs:637
result resource://gre/modules/ExtensionParent.sys.mjs:1142
callAndLog resource://gre/modules/ExtensionParent.sys.mjs:1095
recvAPICall resource://gre/modules/ExtensionParent.sys.mjs:1141
AsyncFunctionNext self-hosted:852
It then opens the main add-ons page rather than the options for my extension.
Comment 1•1 year ago
|
||
Jonathan, I am not able to reproduce the problem with this simple test add-on. It works just fine on Arch Linux with Thunderbird 115.6.0.
In a new profile I also installed Send Later 10.3.3. Using the browser action to open the settings worked just fine as well. There are also no errors or warnings in the error console.
Reporter | ||
Comment 2•1 year ago
|
||
I am also unable to reproduce it in other profiles.
Doesn't change the fact that it is happening consistently in 115.6.0 in this particular profile, with the stack trace above every time.
That it's an intermittent or hard to reproduce bug doesn't mean that it isn't a bug.
Comment 3•1 year ago
|
||
@Jonathan: Is Alexanders test.xpi
reproducing the bug in your mentioned profile? If not, can you share which of your add-ons does? Attaching the specific version to this bug would be great.
Reporter | ||
Comment 4•1 year ago
|
||
(In reply to John Bieling (:TbSync) from comment #3)
@Jonathan: Is Alexanders
test.xpi
reproducing the bug in your mentioned profile?
Intermittently, yes.
Immediately after installing test.xpi the browser action button correctly opened its preferences.
However, after restarting Thunderbird with it installed, the action button no longer correctly opens its preferences.
I'm observing this problem with Send Later, both 10.3.5 and 10.3.6 (current beta release).
Comment 5•1 year ago
•
|
||
Hi Jonathan, I will not be able to fix this without your help. The standard call to open a content tab fails for you.
- Could you manually disable all other add-ons in that profile (besides test.xpi) and restart(!)? Does that make the error go away?
- If not, what is the tab situation after you restarted Thunderbird (which tabs are open), before you use text.xpi to open the options page and it fails?
- Could you open a console and manually execute
openContentTab("about:addons");
, what happens? Does it return a tab in the console and does it switch to the addon manager?
Comment 6•1 year ago
•
|
||
Hi Jonathan, I will not be able to fix this without your help. The standard call to open a content tab fails for you.
- Could you manually disable all other add-ons in that profile (besides test.xpi) and restart(!)? Does that make the error go away?
- If not, what is the tab situation after you restarted Thunderbird (which tabs are open), before you use text.xpi to open the options page and it fails?
- Could you open a console and manually execute
openContentTab("about:addons");
, what happens? Does it return a tab in the console and does it switch to the addon manager?
Reporter | ||
Comment 7•1 year ago
|
||
Tested with add-ons disabled and couldn't reproduce the issue. Started reenabling add-ons one by one and narrowed it down to https://github.com/opto/expression-search-NG .
Reporter | ||
Comment 8•1 year ago
|
||
Also: it's not just immediately after install vs. after restart. Immediately after install the button works properly the first time but then if I close the prefs tab and press the button again it fails.
Comment 9•1 year ago
|
||
Confirmed.
I am forwarding this unfortunate behavior to the developer of Expression Search NG.
Description
•