Closed Bug 1624503 Opened 5 years ago Closed 5 years ago

"Unexpected invalid url: debugger eager eval code" when typing anything in the console of an extension page

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: robwu, Assigned: rpl)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

When I type anything in the console of the devtools in a moz-extension:-page, then I see "Unexpected invalid url: debugger eager eval code" being spammed to the global JS console.

STR:

  1. Install an extension (e.g. uBlock Origin) if you don't have any extension installed.
  2. Visit about:debugging and use the "Inspect" button of any extension to launch the developer tools for a moz-extension:-page (the background page in this case, but any other page would have worked).
  3. Type anything, e.g. the letter b in the devtools console.
  4. Look at the console. If it is empty, look at the global JS console (Ctrl-Shift-J).

Expected:

  • No errors

Actual:

  • The following error is repeatedly shown for every keystroke:
Unexpected invalid url: debugger eager eval code webextension.js:351
    _allowSource resource://devtools/server/actors/targets/webextension.js:351
    <anonymous> self-hosted:875
    allowSource resource://devtools/server/actors/utils/TabSources.js:37
    _addSource resource://devtools/server/actors/thread.js:1888
    onNewScript resource://devtools/server/actors/thread.js:1859
    onNewScript self-hosted:875
    getEvalResult resource://devtools/server/actors/webconsole/eval-with-debugger.js:204
    evalWithDebugger resource://devtools/server/actors/webconsole/eval-with-debugger.js:164
    evaluateJS resource://devtools/server/actors/webconsole.js:1182
    evaluateJSAsync resource://devtools/server/actors/webconsole.js:1077
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:111

Tested with Firefox Nightly 75.0a1 buildID 20200309091841 and Firefox Nightly 76.0a1 buildID 20200323092419

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Console

As for sources with url "debugger eval code", webExtensionTargetPrototype._allowSource should also filter out
sources with url "debugger eager eval code" without logging any error (as it is an source.url value that we
expect and that we already know that it isn't a valid URI, and we know that those sources shouldn't be listed
in the debugger panel).

Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Priority: -- → P2
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/63b614ea4a28 webExtensionTargetPrototype._allowSource should filter out sources related to eager eval code. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/c3954ec53694 Added a new test case for eager eval on a WebExtension target. r=nchevobbe

The test case was failing because it was pushed on autoland and ended to be applied on top of Bug 1625495's patch which has renamed "devtools/client/shared/devtools-client" to "devtools/client/devtools-client".

I'm actually glad that this didn't happen the other way around (and risk Bug 1625495 to be backed out because of the unexpected failure on the new test case added in second patch attached to this issue).

I've just updated the patch and I'll push it to autoland again asap.

Flags: needinfo?(lgreco)
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/21e6f132abfb webExtensionTargetPrototype._allowSource should filter out sources related to eager eval code. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/c8fc3d9a00bb Added a new test case for eager eval on a WebExtension target. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
QA Whiteboard: [qa-76b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: