Closed Bug 1614383 Opened 4 years ago Closed 4 years ago

Error: "Encountered error while waiting for Helper Result: Error: Debugger has hook installed"

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: Honza, Unassigned)

References

(Blocks 1 open bug)

Details

I don't have specific STR but, hit happens to me quite often. After some time testing eager evaluation I am seeing the following error in the Browser Console

Error: "Encountered error while waiting for Helper Result: Error: Debugger has hook installed"

evaluateJSAsync resource://devtools/server/actors/webconsole.js:1089
    executeSoon resource://devtools/shared/DevToolsUtils.js:62
    evaluateJSAsync resource://devtools/server/actors/webconsole.js:1074
    handler resource://devtools/shared/protocol/Actor.js:154
    onPacket resource://devtools/server/debugger-server-connection.js:380
    receiveMessage resource://devtools/shared/transport/child-transport.js:66
    enter resource://devtools/server/actors/utils/event-loop.js:79
    _pushThreadPause resource://devtools/server/actors/thread.js:259
    _pauseAndRespond resource://devtools/server/actors/thread.js:854
    onDebuggerStatement resource://devtools/server/actors/thread.js:1933
    <anonymous> debugger eval code:1
    getEvalResult resource://devtools/server/actors/webconsole/eval-with-debugger.js:191
    evalWithDebugger resource://devtools/server/actors/webconsole/eval-with-debugger.js:151
    evaluateJS resource://devtools/server/actors/webconsole.js:1182
    evaluateJSAsync resource://devtools/server/actors/webconsole.js:1077
    executeSoon resource://devtools/shared/DevToolsUtils.js:62
    evaluateJSAsync resource://devtools/server/actors/webconsole.js:1074
    handler resource://devtools/shared/protocol/Actor.js:154
    onPacket resource://devtools/server/debugger-server-connection.js:380
    receiveMessage resource://devtools/shared/transport/child-transport.js:66
    _addListener resource://devtools/shared/transport/child-transport.js:40
    ready resource://devtools/shared/transport/child-transport.js:57
    _onConnection resource://devtools/server/debugger-server.js:463
    connectToParent resource://devtools/server/debugger-server.js:337
    onConnect resource://devtools/server/startup/frame.js:62
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:111
    MessageListener.receiveMessage* resource://devtools/server/startup/frame.js:95
    <anonymous> resource://devtools/server/startup/frame.js:177

As soon as the error appears for the first time - it's consequently generated for every key press.

Honza

Can you retest this with https://bugzilla.mozilla.org/show_bug.cgi?id=1611905 fixed? From the stack trace's onDebuggerStatement, I'm wondering if this is reachable anymore.

Flags: needinfo?(odvarko)

That bug has landed before I filed this one but, perhaps I had old m-c.

In any case, I can't reproduce that anymore, closing.
(I'll reopen if needed)
Honza

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(odvarko)
Resolution: --- → WORKSFORME

Repro steps:

  1. Open the normal console
  2. Open the browser toolbox
  3. Type "d" into the normal console

Expected:
No reaction

Actual:

  1. "normal" browsing-context server receives "d" and does nothing
  2. autocomplete runs and decides on "debugger"
  3. "normal" browsing-context server receives "debugger" and evals it but does not pause because we explicitly don't pause inside its own server code
  4. toolbox content-process server runs "onDebuggerStatement" and does pause, because it has no way to know the code was run inside of an eager evaluation", and we enter a nested event loop
  5. The toolbox is thoroughly confused because it is now inside a context where eager-eval is still active and tracking everything and trying to abort execution
  6. Any further attempts to type into the "normal" debugger fills the console with "Debugger has hook installed" exceptions

So the core issue here, which is also causing https://bugzilla.mozilla.org/show_bug.cgi?id=1621572, is that eager eval does in fact have some side-effects, like running debugger hooks.

I'm going to leave this closed for now and we can try to address it all in https://bugzilla.mozilla.org/show_bug.cgi?id=1621572

Thanks for the analysis Logan, it makes sense and I can easily repro your steps in comment #3.

Honza

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