storage.managed.get with non-existing manifest behaves differently on debug build
Categories
(WebExtensions :: Storage, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: JanH, Assigned: zombie)
References
Details
Starting from v1.18.0, uBlock Origin started using a persistent startup listener for webrequests.
On a normal release build, this doesn't cause any problems, however when using a debug build (either downloaded directly from Taskcluster, or else a local build built with ac_add_options --enable-debug), this causes all page loads [1] to hang indefinitely.
This is happening, with a fresh profile, both on Android and on desktop (Windows). As well as my local Android build, I've used debug builds from this revision.
[1] Except for those few privileged pages on which webextensions don't run by default.
Comment 1•6 years ago
|
||
I am seeing these errors in the console, which do not show up in the non-debug version of Nightly:
Type error for items value (Expected object instead of undefined) for storage.StorageArea.get.
makeError resource://gre/modules/Schemas.jsm:459
throwError resource://gre/modules/Schemas.jsm:2190
checkValue resource://gre/modules/Schemas.jsm:2316
checkCallback resource://gre/modules/Schemas.jsm:2323
callback resource://gre/modules/Schemas.jsm:2348
apply self-hosted:4634
applySafeWithoutClone resource://gre/modules/ExtensionCommon.jsm:539
wrapPromise resource://gre/modules/ExtensionCommon.jsm:752
withLastError resource://gre/modules/ExtensionCommon.jsm:676
wrapPromise resource://gre/modules/ExtensionCommon.jsm:744
Unchecked lastError value: Error: Managed storage manifest not found vapi-background.js:1208
getItem moz-extension://ed14e468-76e4-4f87-a0f4-55a93116a14b/js/vapi-background.js:1208
If I short-circuit the call to browser.storage.managed.get
in uBO[1], this seems to fix the issue on my side.
P.S.: Sorry, I didn't know I was responding to a Firefox dev. It makes a difference on whether I take on an issue or not. If an issue comes from the public I feel like it's more about a support issue (so many ways people can have configured their environment), otherwise if it's from a browser dev I feel like I am contributing a bit to the browser development, something I am happy to do.
Reporter | ||
Comment 2•6 years ago
|
||
No offence taken, and thanks for taking a closer look.
Assignee | ||
Comment 3•6 years ago
•
|
||
This looks like a callback schema validation error, we only check those in debug builds.
Comment 4•6 years ago
|
||
When an extension api throws an exception but the extension is using callbacks instead of promises, the callback is always called with no arguments:
https://searchfox.org/mozilla-central/rev/5c8ea961d04767db723a0a15e3a8f7fbca154129/toolkit/components/extensions/ExtensionCommon.jsm#752
I haven't looked closely at how callback validation is implemented but seems like we "just" need to avoid trying to validate in that case.
Assignee | ||
Updated•5 years ago
|
Updated•3 years ago
|
Description
•