"undefined: undefined" error in console when content script does not exist
Categories
(WebExtensions :: General, defect)
Tracking
(firefox127 fixed)
| Tracking | Status | |
|---|---|---|
| firefox127 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 file)
While looking into bug 1884298, I found that when a content script does not exist, that undefined: undefined is printed at https://searchfox.org/mozilla-central/rev/d23849dd6d83edbe681d3b4828700256ea34a654/toolkit/components/extensions/ExtensionContent.sys.mjs#626.
This happens because the error is unexpectedly a string instead of an object.
| Assignee | ||
Comment 1•2 years ago
|
||
Although the issue could be solved (along with bug 1824896) by making sure that an error object is emitted from https://searchfox.org/mozilla-central/rev/d23849dd6d83edbe681d3b4828700256ea34a654/js/xpconnect/loader/ChromeScriptLoader.cpp#453,460, I'm going to fix this bug specifically by replacing the manual ${error.name}: ${error.message} serialization with error.toString(), since that would also address other cases where a string is encountered instead of an object.
| Assignee | ||
Comment 2•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
| bugherder | ||
Description
•