Closed Bug 1824375 Opened 2 years ago Closed 2 years ago

Error when clicking on an item in the source tree

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(firefox-esr102 unaffected, firefox111 unaffected, firefox112 unaffected, firefox113 verified, firefox114 verified)

VERIFIED FIXED
114 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox111 --- unaffected
firefox112 --- unaffected
firefox113 --- verified
firefox114 --- verified

People

(Reporter: nchevobbe, Assigned: ochameau)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

  1. Go to https://nchevobbe.github.io/demo/console-test-app.html
  2. Open the debugger
  3. In the source tree, select webpack:///node_modules/react-dom/cjs/react-dom.development.js

-> I get an error in the browser console:

JavaScript error: resource://devtools/client/shared/prefs.js, line 90: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIPrefBranch.setStringPref]

The value we are trying to set is huge (1073868 chars), bigger than the max one (https://searchfox.org/mozilla-central/rev/6fc2f6d5335fb6f70f780b5fea5ed77b0719c3b5/modules/libpref/Preferences.cpp#162)

The pref is debugger.pending-selected-location and seems to hold a whole sourceMap file, which is defined as dataURL, probably explaining the exception

Looks like a recent regression.

Set release status flags based on info from the regressing bug 1818495

:ochameau, since you are the author of the regressor, bug 1818495, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Set release status flags based on info from the regressing bug 1818495

It was regressed by bug 1815500, which introduced the source attribute in all location objects, which we ended trying to save in a pref over there:
https://searchfox.org/mozilla-central/rev/31f5847a4494b3646edabbdd7ea39cb88509afe2/devtools/client/debugger/src/reducers/sources.js#95-101

      location = {
        ...action.location,
        url: action.source.url,
      };

      if (action.source.url) {
        prefs.pendingSelectedLocation = location;
      }

action.location is a regular location object.

Assignee: nobody → poirot.alex
Flags: needinfo?(poirot.alex)
Regressed by: 1815500
No longer regressed by: 1818495

location and pending location are different types of objects.
Pending location is having only three attributes: url, line and column.
Where location rather expose source, sourceActor and line and column.

The source object was problematic here as it is large and couldn't be saved into a pref.

Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/38967ad7e8f2 [devtools] Avoid saving locations as pending locations. r=devtools-reviewers,bomsy
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch

The patch landed in nightly and beta is affected.
:ochameau, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox113 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(poirot.alex)

Comment on attachment 9329545 [details]
Bug 1824375 - [devtools] Avoid saving locations as pending locations.

Beta/Release Uplift Approval Request

  • User impact if declined: Some sources with some particular usages of SourceMaps can't be selected. When selecting them, a new tab is opened but you can't focus it.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: * Go to https://nchevobbe.github.io/demo/console-test-app.html
  • Open the debugger
  • In the source tree, select webpack:///node_modules/react-dom/cjs/react-dom.development.js

AR: a new tab is opened for reac-dom-development.js, but it is empty or not focusable. In any case, you can't see the sources for this file.

ER: The source displays fine.

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Only impacts the debugger. Has been written conservatively.
  • String changes made/needed: no
  • Is Android affected?: No
Flags: needinfo?(poirot.alex)
Attachment #9329545 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9329545 [details]
Bug 1824375 - [devtools] Avoid saving locations as pending locations.

Approved for 113.0b8.

Attachment #9329545 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Verified as fixed on Window 10 x64, macOS 11.6 and on Ubuntu 20.04 x64.

Verified as fixed on Window 10 x64, macOS 11.6 and on Ubuntu 20.04 x64 on Firefox 113.0b8.

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

Attachment

General

Created:
Updated:
Size: