Closed Bug 1803646 Opened 3 years ago Closed 3 years ago

No data shows in local storage when USB debugging

Categories

(DevTools :: Storage Inspector, defect, P2)

Firefox 107
All
Android
defect

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: bugzilla.mozilla.org, Assigned: nchevobbe)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0

Steps to reproduce:

  1. Enable USB debugging in Fenix (using 107.1.0 build #2015915067)
  2. Connect to desktop, visit about:debugging, and connect to the Fenix instance
  3. Select the tab to debug
  4. Visit the "storage" tab to view/interact with site data
  5. Select a storage type (ex cookie) and host (ex duckduckgo.com)

Actual results:

While some structure shows in the left pane (you can see which domains have stored data in that tab and index db shows some structure), the large area on the right just shows "No data present for selected host". This is true for Cookies, Index DB, Local Storage, and Session Storage. The javascript console works, as do breakpoints on the debugger tab.
(See screenshot example of duckduckgo.com's cookie; the cookie data is accessible from the console, but not from the storage tab's interface.)

Expected results:

Stored data should be shown, just as it is when using Developer Tools on desktop firefox.

Status: UNCONFIRMED → NEW
Component: General → Storage Inspector
Ever confirmed: true
Product: Fenix → DevTools

I can reproduce.
I'm seeing the following error in the terminal:

can't access property \"toLowerCase\", standardSessionString is null from: server0.conn0.windowGlobal2147483674/localStorage510 (resource://devtools/shared/natural-sort.js:56:5)", "resource://devtools/shared/protocol/Front.js", 383))
Severity: -- → S3
Flags: needinfo?(nchevobbe)
Priority: -- → P2

So, this is the line that causes the issue, from the naturalSort function

https://searchfox.org/mozilla-central/rev/196b6aa0427f38058fd43ac90ee94fcf2f436fb6/devtools/shared/natural-sort.js#56

sessionString = standardSessionString.toLowerCase();

standardSessionString is defined in

https://searchfox.org/mozilla-central/rev/196b6aa0427f38058fd43ac90ee94fcf2f436fb6/devtools/shared/natural-sort.js#24-27

loader.lazyGetter(this, "standardSessionString", () => {
  const l10n = new Localization(["devtools/client/storage.ftl"], true);
  return l10n.formatValueSync("storage-expires-session");
});

naturalSort is called by naturalSortCaseInsensitive, which is called from https://searchfox.org/mozilla-central/rev/196b6aa0427f38058fd43ac90ee94fcf2f436fb6/devtools/server/actors/storage.js#480

When debugging Fenix, devtools/client/storage.ftl is not included on the server, so standardSessionString is null, and that causes the Storage Inspector to fail loading.

In order to fix this, we should create/use a ftl file that will be available in Fenix (i.e. in https://searchfox.org/mozilla-central/source/devtools/shared/locales/en-US)

Flags: needinfo?(nchevobbe)
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

The string is used in devtools/shared naturalOrder, which can
be called from devtools/server.
When debugging Fenix, devtools/client files are not included,
so it was causing issues in the Storage panel.
To fix this, we create a storage.ftl file in devtools/shared
so the string is available in devtools/server.

Attachment #9307575 - Attachment description: Bug 1803646 - [devtools] Make storage-expires-session l10n string available in devtools/shared. r=jdescottes. → Bug 1803646 - [devtools] Pass storage-expires-session localized value to getStoreObjects. r=jdescottes.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/517bd1ba16bf [devtools] Pass storage-expires-session localized value to getStoreObjects. r=jdescottes,fluent-reviewers,flod.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch

I can confirm this is fixed with Firefox 110b4 on desktop and Fenix nightly 111a1 on Android. It's still broken if I use Fenix 109.1.1 on Android; is that expected? Both Android and Desktop need to be v110 for the fix?

(In reply to bobpaul from comment #6)

I can confirm this is fixed with Firefox 110b4 on desktop and Fenix nightly 111a1 on Android. It's still broken if I use Fenix 109.1.1 on Android; is that expected? Both Android and Desktop need to be v110 for the fix?

Correct, the fix needs to be applied to both the client and the server of the debugging session.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: