runtime.sendMessage(badid, msg) = Error: can't access property "wakeupBackground", extension is undefined
Categories
(WebExtensions :: General, defect, P3)
Tracking
(firefox-esr68 unaffected, firefox-esr78 unaffected, firefox77 unaffected, firefox78 unaffected, firefox79 wontfix, firefox86 wontfix, firefox87 wontfix, firefox88 wontfix, firefox89 fixed)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox-esr78 | --- | unaffected |
firefox77 | --- | unaffected |
firefox78 | --- | unaffected |
firefox79 | --- | wontfix |
firefox86 | --- | wontfix |
firefox87 | --- | wontfix |
firefox88 | --- | wontfix |
firefox89 | --- | fixed |
People
(Reporter: robwu, Assigned: rpl, Mentored)
References
(Regression)
Details
(Keywords: good-first-bug, regression)
Attachments
(2 files)
STR:
- Load the attached extension.
- Open the global JS console or inspect the extension's background page at
about:debugging
. - Click the extension button.
- Look at the console.
Expected:
- Firefox 78:
Error : Could not establish connection. Receiving end does not exist.
- Chrome 83:
Error in event handler: TypeError: Error in invocation of runtime.sendMessage(optional string extensionId, any message, optional object options, optional function responseCallback): Invalid extension id: 'SOME_BAD_ID'
Actual:
- Firefox 79:
Error : can't access property "wakeupBackground", extension is undefined
There are two unexpected results here:
- The error message changed to something non-sensical (to extension devs).
- The internal error message from the browser process is leaked to extensions. At the very least it should have been "An unexpected error occurred", together with the actual error dumped to the global JS console, to be consistent with how we handle other unexpected errors in our extension API handlers.
To get a sensible error message, the error should be handled here: toolkit/components/extensions/ExtensionParent.jsm #321
plus a regression test at xpcshell/test_ext_runtime_sendMessage_args.js.
Comment 1•4 years ago
|
||
Set release status flags based on info from the regressing bug 1583484
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Comment 2•4 years ago
|
||
This bug is similar to bug 1665568, to fix this bug a !extension
check needs to be added as explained in the report above.
The leakage of the internal error message had been fixed in bug 1655624, now it's just "An unexpected error has occurred".
Assignee | ||
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Comment 5•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Comment 6•4 years ago
|
||
The patch landed in nightly and beta is affected.
:rpl, is this bug important enough to require an uplift?
If not please set status_beta
to wontfix
.
For more information, please visit auto_nag documentation.
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Description
•