Closed Bug 1438454 Opened 3 years ago Closed 3 years ago

Evaluating `inspect(window)` in the browser console with the new frontend throws in Reps

Categories

(DevTools :: Console, defect)

defect
Not set
normal

Tracking

(firefox60 affected)

RESOLVED WORKSFORME
Tracking Status
firefox60 --- affected

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

The error is in Reps.
Here's the error message: 
```
TypeError: can't convert undefined to object
Stack trace:
getProps@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:1170:26
propIterator@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:1101:20
safePropIterator@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:1058:12
GripRep@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:1022:20
wrappedFunction@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:332:14
Rep@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:579:10
renderGrip@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:5141:12
renderTreeItem@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:5094:21
render@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:5357:32
finishClassComponent@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:8415:22
updateClassComponent@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:8392:12
beginWork@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:8767:16
performUnitOfWork@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:10766:16
workLoop@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:10830:26
callCallback@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:580:9
invokeGuardedCallbackDev@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:619:7
invokeGuardedCallback@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:476:5
renderRoot@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:10908:7
performWorkOnRoot@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:11556:24
performWork@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:11509:7
requestWork@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:11420:7
scheduleWorkImpl@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:11274:11
scheduleWork@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:11231:12
enqueueSetState@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:6754:7
Component.prototype.setState@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dev.js:491:3
setExpanded@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:5036:9
Async*onExpand@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:5192:25
autoExpand@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:5662:7
_autoExpand@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:5676:9
componentDidMount@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/reps/reps.js:5633:5
commitLifeCycles@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:9312:15
commitAllLifeCycles@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:10488:9
EventListener.handleEvent*invokeGuardedCallbackDev@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:613:7
invokeGuardedCallback@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:476:5
commitRoot@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:10592:9
performWorkOnRoot@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:11559:42
performWork@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:11509:7
requestWork@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:11420:7
scheduleWorkImpl@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:11274:11
scheduleWork@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:11231:12
enqueueSetState@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dom-dev.js:6754:7
Component.prototype.setState@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-dev.js:491:3
onStateChange@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/react-redux.js:1308:11
dispatch@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/vendor/redux.js:336:8
thunk/</<@resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/redux/middleware/thunk.js:16:9
setTimeoutIfNeeded/this.throttledDispatchPromise</<@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/new-console-output/new-console-output-wrapper.js:331:9
setTimeout handler*setTimeoutIfNeeded/this.throttledDispatchPromise<@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/new-console-output/new-console-output-wrapper.js:328:7
setTimeoutIfNeeded@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/new-console-output/new-console-output-wrapper.js:327:37
batchedMessagesAdd@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/new-console-output/new-console-output-wrapper.js:309:5
dispatchMessageAdd@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/new-console-output/new-console-output-wrapper.js:253:5
dispatchMessageAdd@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/webconsole-connection-proxy.js:229:5
execute@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/jsterm.js:470:7
_keyPress@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/jsterm.js:1186:11
EventListener.handleEvent*init@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/jsterm.js:272:7
_initUI@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/new-webconsole.js:211:5
init@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/new-webconsole.js:81:5
async*init@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/hudservice.js:345:12
init@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/hudservice.js:624:20
openBrowserConsole@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/hudservice.js:111:12
toggleBrowserConsole/this._browserConsoleInitializing<@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/hudservice.js:215:15
async*toggleBrowserConsole@resource://devtools/shared/base-loader.js -> resource://devtools/client/webconsole/hudservice.js:210:41
async*handleConsoleFlag@file:///Users/nchevobbe/Projects/mozilla-central/objdir-frontend/dist/Nightly.app/Contents/Resources/browser/components/devtools-startup.js:664:7
handle@file:///Users/nchevobbe/Projects/mozilla-central/objdir-frontend/dist/Nightly.app/Contents/Resources/browser/components/devtools-startup.js:223:7
 reps.js:1060:5

```
Filed https://github.com/devtools-html/devtools-core/issues/933 to fix this on Reps side.
tldr;: we don't handle XULDocument object as we should.
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Depends on: 1430547
Priority: -- → P1
Whiteboard: [newconsole-mvp]
Summary: Evaluating `inspect(window)` in the browser console with the new frontend throws → Evaluating `inspect(window)` in the browser console with the new frontend throws in Reps
Fixed by Bug 1436670
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Priority: P1 → --
Whiteboard: [newconsole-mvp]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.