DevTools: indexeddb entries not showing in the developer tools when inspecting webextensions
Categories
(DevTools :: Storage Inspector, defect, P2)
Tracking
(firefox-esr91 unaffected, firefox96 wontfix, firefox97 wontfix, firefox98 wontfix, firefox99 verified)
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox96 | --- | wontfix |
firefox97 | --- | wontfix |
firefox98 | --- | wontfix |
firefox99 | --- | verified |
People
(Reporter: leafbebop, Assigned: jdescottes)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
+++ This bug was initially created as a clone of Bug #1291655 +++
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0
Steps to reproduce:
I am building a webExtension using indexedDB, but when I tried to view indexedDB when inspecting the extension (using debugging or the extension page itself), there are no entries shown there despise I can retrieve them.
I searched, and then comes to Bug #1291655. Though marked as fixed, the problem there is a good description of my problem and the attachment there can reproduce the bug in this version (version 96) of firefox in a fresh profile.
Thanks.
Assignee | ||
Comment 1•3 years ago
|
||
Thanks for filing! As you said, this reproduces with the following STRs:
- Download attachment 8779231 [details] and extract it.
- In Firefox: go to about:debugging
- Click on "This Nightly"/"This Firefox" > "Load temporary extension"
- Find the manifest.json for the extension you just extracted
- Click Inspect on the "IDB Test" target
- Select the Storage panel
- Expand indexed db > moz-extension > My Database > My Object Store
ER: Should see "moz-extension > My Database > My Object Store" under indexed DB in the storage panel
AR: There's only one category for the background page ("moz-extension://${uuid}/_generated_background_page.html") and it is empty.
This is a somewhat recent regression, it works with ESR 91.
Assignee | ||
Comment 2•3 years ago
|
||
Getting a regression window would help here.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
I did a regression window and here are the results:
DEBUG : Found commit message:
Bug 1675456 - [devtools] Support reloading the current document debugged for a WebExtension. r=nchevobbe
Without this, the webconsole fails to execute anything after reloading the add-on document.
Can reproduce by running location.reload()
in the console.
Differential Revision: https://phabricator.services.mozilla.com/D129009
Assignee | ||
Comment 4•3 years ago
|
||
Thanks for the regression window, Hani!
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
The regression became visible with Bug 1675456, but the faulty code actually landed in Bug 1666529.
After this bug, the parent process storage actor started resolving the "wrong" hostname for webextension targets, basically moz-extension://${uuid}/_generated_background_page.html
instead of just "moz-extension://${uuid}".
The problem lies in the following switch: https://searchfox.org/mozilla-central/rev/9bed2623831804ac086bbb80cb666e5c3b00416a/devtools/server/actors/resources/utils/parent-process-storage.js#361-374
switch (uri.scheme) {
case "about":
case "file":
case "javascript":
case "resource":
case "moz-extension":
return uri.displaySpec;
case "http":
case "https":
return uri.prePath;
default:
// chrome: and data: do not support storage
return null;
}
I imagine we should also use uri.prePath for "moz-extension"
Assignee | ||
Comment 6•3 years ago
|
||
Comment 8•3 years ago
|
||
bugherder |
Comment 9•3 years ago
|
||
Thank you Julian!
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Reproduced this bug using an affected Nightly build 2022-01-30, with STR from comment 0.
The bug is verified as fixed on latest Beta 99.0b8, under macOS 11. Win 11 and Ubuntu 18.04 x64.
Description
•