Open Bug 1405096 Opened 8 years ago Updated 3 years ago

TypeError: webconsolePanel is null

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(firefox57 fix-optional)

Tracking Status
firefox57 --- fix-optional

People

(Reporter: Oriol, Unassigned)

Details

1. Create this PHP script in a local server: <?php header('Content-type: application/json'); set_time_limit(0); $i = 0; echo "[\n"; while(true) { ++$i; echo " ", $i, ",\n"; ob_end_flush(); flush(); ob_start(); sleep(1); } ?> 2. Load it. 3. Open web console (Ctrl+Shift+K) 4. Switch to Inspector panel. 5. Close Developer Tools (it won't fully close until the page loads completely, which is not going to happen). 6. Open web console (Ctrl+Shift+K) Result: Web console does not load and browser console shows this error: A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'? See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise Date: Mon Oct 02 2017 21:25:54 GMT+0200 (Romance Standard Time) Full Message: TypeError: webconsolePanel is null Full Stack: _refreshConsoleDisplay@resource://devtools/shared/base-loader.js -> resource://devtools/client/framework/toolbox.js:936:7 selectTool@resource://devtools/shared/base-loader.js -> resource://devtools/client/framework/toolbox.js:1806:5 DevTools.prototype.showToolbox<@resource://devtools/shared/base-loader.js -> resource://devtools/client/framework/devtools.js:456:15 _run@resource://devtools/shared/base-loader.js -> resource://devtools/shared/task.js:310:39 TaskImpl@resource://devtools/shared/base-loader.js -> resource://devtools/shared/task.js:272:3 asyncFunction@resource://devtools/shared/base-loader.js -> resource://devtools/shared/task.js:246:14 selectToolCommand@resource://devtools/shared/base-loader.js -> resource://devtools/client/framework/devtools-browser.js:237:7 onKeyShortcut@resource://devtools/shared/base-loader.js -> resource://devtools/client/framework/devtools-browser.js:260:7 onKey@jar:file:///C:/Program%20Files/Mozilla%20Firefox/Nightly/browser/omni.ja!/components/devtools-startup.js:364:5 hookKeyShortcuts/xulKey<@jar:file:///C:/Program%20Files/Mozilla%20Firefox/Nightly/browser/omni.ja!/components/devtools-startup.js:350:51 EventListener.handleEvent*createKey@jar:file:///C:/Program%20Files/Mozilla%20Firefox/Nightly/browser/omni.ja!/components/devtools-startup.js:384:5 hookKeyShortcuts@jar:file:///C:/Program%20Files/Mozilla%20Firefox/Nightly/browser/omni.ja!/components/devtools-startup.js:350:20 hookWindow@jar:file:///C:/Program%20Files/Mozilla%20Firefox/Nightly/browser/omni.ja!/components/devtools-startup.js:239:5 onWindowReady@jar:file:///C:/Program%20Files/Mozilla%20Firefox/Nightly/browser/omni.ja!/components/devtools-startup.js:212:7 _delayedStartup@chrome://browser/content/browser.js:1597:5 EventListener.handleEvent*onLoad@chrome://browser/content/browser.js:1396:5 onload@chrome://browser/content/browser.xul:1:1
I wonder if the toolbox, inspector, or console is waiting for an event that never fires in this case. A hosted web page to triggers the issue would be very helpful for debugging.
Priority: -- → P3
OK, steps without PHP: 1. Load about:blank 2. Open the web console (Ctrl+Shift+K) 3. Enter this code: document.open(); 4. Switch to Inspector panel. 5. Close Developer Tools (it won't fully close). 6. Open web console (Ctrl+Shift+K)
Product: Firefox → DevTools
Issue in comment 2 was fixed by bug 1414597. But I can still reproduce the issue in comment 0. Brad, do you want to investigate this too?
Flags: needinfo?(bwerth)
I can't reproduce this with the same outcome as comment 0, but I can get the inspector to fail to close and fail to re-open. The only message I get in the Browser Console (when attempting to re-open the Web Console) is: TelemetryStopwatch: requesting elapsed time for nonexisting stopwatch. Histogram: "DEVTOOLS_INSPECTOR_TIME_ACTIVE_SECONDS", key: "null" TelemetryStopwatch.jsm:388 I'll see if I can figure out what to do to make the tools close and re-open properly.
Assignee: nobody → bwerth
Flags: needinfo?(bwerth)
Assignee: bwerth → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.