Closed Bug 1752770 Opened 2 years ago Closed 2 years ago

DevTools: indexeddb entries not showing in the developer tools when inspecting webextensions

Categories

(DevTools :: Storage Inspector, defect, P2)

Firefox 96
defect

Tracking

(firefox-esr91 unaffected, firefox96 wontfix, firefox97 wontfix, firefox98 wontfix, firefox99 verified)

VERIFIED FIXED
99 Branch
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)

+++ 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.

Summary: DevTools: indexeddb entries not showing in the developer tools when debugging background scripts → DevTools: indexeddb entries not showing in the developer tools when inspecting webextensions

Thanks for filing! As you said, this reproduces with the following STRs:

  1. Download attachment 8779231 [details] and extract it.
  2. In Firefox: go to about:debugging
  3. Click on "This Nightly"/"This Firefox" > "Load temporary extension"
  4. Find the manifest.json for the extension you just extracted
  5. Click Inspect on the "IDB Test" target
  6. Select the Storage panel
  7. 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.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Getting a regression window would help here.

QA Whiteboard: [qa-regression-triage]

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

QA Whiteboard: [qa-regression-triage]
Regressed by: 1675456

Thanks for the regression window, Hani!

Has Regression Range: --- → yes

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: nobody → jdescottes
Status: NEW → ASSIGNED
Regressed by: 1666529
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/61353e0c3d72
[devtools] Do not return full displaySpec as the hostname for webextension storage resources r=nchevobbe
Regressions: 1756196
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Flags: qe-verify+

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.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: