messenger.tabs.query fails with an exception when a compose window is open
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(Not tracked)
People
(Reporter: florian.unger, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36
Steps to reproduce:
From a addon background page I call messenger.tabs.query to check if the tab of the addon is already opened.
Actual results:
When a compose window is open the call of messenger.tabs.query fails with an exception Error: "An unexpected error occurred"
the details from the debug console are:
tabmail is null ext-mail.js:184
window.controllers/Controllers is deprecated. Do not use it for UA detection. blank
this.browser is null ext-tabs-base.js:231
get uri chrome://extensions/content/parent/ext-tabs-base.js:231
matches chrome://extensions/content/parent/ext-tabs-base.js:606
matches chrome://messenger/content/parent/ext-mail.js:620
query chrome://extensions/content/parent/ext-tabs-base.js:1989
InterpretGeneratorResume self-hosted:1284
next self-hosted:1239
from self-hosted:598
query chrome://messenger/content/parent/ext-tabs.js:538
query self-hosted:1003
result resource://gre/modules/ExtensionParent.jsm:1139
withPendingBrowser resource://gre/modules/ExtensionParent.jsm:770
result resource://gre/modules/ExtensionParent.jsm:1139
withTiming resource://gre/modules/ExtensionParent.jsm:1100
call resource://gre/modules/ExtensionParent.jsm:1138
AsyncFunctionNext self-hosted:839
Expected results:
it should not throw an exception but return the Tabs promise correctly
I found out that the exception does not occur when I limit the query by setting queryInfo
currentWindow: true
or
windowType: "normal"
I guess the exception occurs when the query for tabs tries to find tabs in the compose window.
The above parameters limit the scope of the search to the main Thunderbird windows and exclude the compose windows from the query.
Comment 2•5 years ago
|
||
Is this still happening for you in TB78?
Comment 3•5 years ago
|
||
Probably fixed by bug 1674407.
Description
•