Command line interpreter unresponsive

NEW
Unassigned

Status

DevTools
Console
4 years ago
a month ago

People

(Reporter: Eric, Unassigned)

Tracking

36 Branch
x86_64
Windows 7

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Created attachment 8548298 [details]
CommandLine.png

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141126041045

Steps to reproduce:

This is for Firefox Developer Edition 36.0a2.

Not sure of the first steps, but after debugging for a while, typing anything into the command line interpreter results in nothing.  Type "4+4" or "alert('hi')".  I have been experiencing this issue intermittently for the past month.  Restarting Firefox resolves the issue for a while.


Actual results:

The typed in command is echoed above the input double-right-carrat with a left-pointing triangle to the left of it.  This is normal.  The result is not printed below the command as usual.  The command is not executed.


Expected results:

The result should have been printed below the echoed command.  There should have been some response by the browser.  "4+4" should have printed "8".  "alert('hi')" should have displayed an alert box.

Updated

4 years ago
Component: Untriaged → Developer Tools: Console

Comment 1

3 years ago
Can confirm, this is a highly annoying, major bug in Devtools.

(Aurora 40/OS X)

Comment 2

3 years ago
Patrick, are there diagnostic steps people can take to figure out why this has broken, seeing as it's intermittent?
Flags: needinfo?(pbrosset)
(In reply to :Gijs Kruitbosch from comment #2)
> Patrick, are there diagnostic steps people can take to figure out why this
> has broken, seeing as it's intermittent?
Yes, the one most important thing people can do to help figure out what's broken here is open the "browser console" (cmd+shift+J on Mac, ctrl+shift+J on Win/Linux), and see whether there are js errors there. Especially, trying to evaluate 4+4 again (or whatever other expression) and seeing if a new js error appears in the browser console at the same time.

I have seen this happen a very long time ago, only a few times, and couldn't reproduce, so I'm surprised about comment 1 reporting this happening on FF40.

It'd really help if we could have more precise "steps to reproduce" to really understand the conditions that lead this to happen. The console is one of the most used tools, we really need to make sure it just always works.
Flags: needinfo?(pbrosset)

Comment 4

3 years ago
```
error occurred while processing 'evaluateJSAsync: TypeError: Debugger.Object belongs to a different Debugger
Stack: WCA_evalWithDebugger@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:1182:16
WCA_onEvaluateJS@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:797:20
WCA_onEvaluateJSAsync@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:768:20
DSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1456:15
LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:561:11
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
EventLoop.prototype.enter@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:372:5
ThreadActor.prototype._pushThreadPause@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:577:5
ThreadActor.prototype._pauseAndRespond@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:782:7
BreakpointActor.prototype.hit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:4876:12
window.Filer._next/</<@http://0.0.0.0:3000/assets/filer.self.js?body=1:37:11
.Deferred/promise.then/</</<@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:3257:30
jQuery.Callbacks/fire@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:3100:10
jQuery.Callbacks/self.fireWith@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:3212:7
done@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:8265:5
.send/callback/<@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:8606:1
Line: 1182, column: 15

onPacket threw an exception: Error: Server did not specify an actor, dropping packet: {"error":"unknownError","message":"error occurred while processing 'evaluateJSAsync: TypeError: Debugger.Object belongs to a different Debugger\nStack: WCA_evalWithDebugger@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:1182:16\nWCA_onEvaluateJS@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:797:20\nWCA_onEvaluateJSAsync@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:768:20\nDSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1456:15\nLocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:561:11\nmakeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14\nmakeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14\nEventLoop.prototype.enter@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:372:5\nThreadActor.prototype._pushThreadPause@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:577:5\nThreadActor.prototype._pauseAndRespond@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:782:7\nBreakpointActor.prototype.hit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:4876:12\nwindow.Filer._next/</<@http://0.0.0.0:3000/assets/filer.self.js?body=1:37:11\n.Deferred/promise.then/</</<@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:3257:30\njQuery.Callbacks/fire@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:3100:10\njQuery.Callbacks/self.fireWith@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:3212:7\ndone@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:8265:5\n.send/callback/<@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:8606:1\nLine: 1182, column: 15"}
Stack: DebuggerClient.prototype.onPacket@resource://gre/modules/devtools/dbg-client.jsm:944:1
LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:561:11
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
EventLoop.prototype.enter@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:372:5
ThreadActor.prototype._pushThreadPause@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:577:5
ThreadActor.prototype._pauseAndRespond@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:782:7
BreakpointActor.prototype.hit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:4876:12
window.Filer._next/</<@http://0.0.0.0:3000/assets/filer.self.js?body=1:37:11
.Deferred/promise.then/</</<@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:3257:30
jQuery.Callbacks/fire@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:3100:10
jQuery.Callbacks/self.fireWith@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:3212:7
done@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:8265:5
.send/callback/<@http://0.0.0.0:3000/assets/jquery/dist/jquery.self.js?body=1:8606:1
Line: 944, column: 0
```

Comment 5

3 years ago
I can usually get it to reproduce pretty reliably by:
- Exception thrown in code triggered
- Put breakpoint on/after excepting code
- Re-trigger piece of code

YMMV.
Thanks for the error log, that helps. James, does that ring a bell, know anyone who would know?
This looks more related to the debugger than the webconsole.
Flags: needinfo?(jlong)
The interaction with the console and the debugger is a little weird sometimes, and I'd like to clean it up at some point. Not sure off the top of my head what this might be. `evaluateJSAsync` is what the console uses to eval stuff, the debugger doesn't use that call. I know we fixed a bug before that could make the split console unresponsive because of a packet ordering issue (it was waiting on a packet to come back, but I think it never got it). I can't remember the bug #.

That error looks a little different though. I'll bookmark this bug and look at it soon.
Flags: needinfo?(jlong)

Comment 8

3 years ago
Ping :jlongster any news?
I have not been able to reproduce this, sorry. It sounds likely that somehow the console is getting a Debugger.Object from the debugger but I'm not sure what the right fix is. I'm quite busy at the moment so without clear steps to reproduce I don't think I have time to look much deeper into it.
Jonathan, do you have e10s enabled when this happens?  Also, if you are able to can you please put together a small test page / script that allows you to hit this as described in Comment 5?  I've tried:

<script>
function foo() {
  1+1;
  throw "error";
}
</script>

Then setting a breakpoint on the throw line and calling foo() from console a few times but haven't been able to reproduce yet.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jonathan)
See Also: → bug 1240881

Comment 11

2 years ago
Thanks for following up on this, it's a very annoying bug.

The bug was experienced with e10s on, yes. (I'm not sure if I've ever had it with e10s off, probably; I've always used the default e10s setting, so that answers for Aurora 40 also)

I've been playing with different scripts/iframe combinations, trying to find a more reliable STR, alas. It seems to happen the most in my local dev environment, but as even there the reproduction is not 100%, it often comes when I'm deep into fixing some JS, and not the right time to do a binary search on a repro.

If I find one, I'll certainly report back.
Flags: needinfo?(jonathan)

Comment 12

2 years ago
However, I need to point out that I'm reporting this from dev environment, which also more importantly suffers from 1237043 at the moment, preventing much of any debugging. Being able to come up with STR most likely depends on a resolution on 1237043.

Updated

a month ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.