Closed Bug 1674723 Opened 4 years ago Closed 4 years ago

Error when attaching target

Categories

(DevTools :: Netmonitor, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: Honza, Unassigned)

References

(Blocks 1 open bug)

Details

STR

  1. Modify Requests reducer to cause an exception in the Network panel (see diff below)
  2. Load any page (e.g. google.com), open DevTools Toolbox and select the Network panel
  3. Click the Reload panel
  4. You should see Error report in the Network panel
  5. Click the File Bug Report button
  6. Check the Browser Console, there is an exception, see below.

I am only seeing this with Fission enabled (devtools.testing.enableServerWatcherSupport doesn't seem to have an impact)

Error when attaching target: Error: Connection closed, pending request to server1.conn0.windowGlobal45/frameTarget1, type attach failed

Request stack:
request@resource://devtools/shared/protocol/Front.js:280:14
generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:46:19
attach/this._attach<@resource://devtools/client/fronts/targets/browsing-context.js:91:36
attach@resource://devtools/client/fronts/targets/browsing-context.js:102:7
_attachAndInitThread@resource://devtools/client/fronts/targets/target-mixin.js:545:20
attachAndInitThread@resource://devtools/client/fronts/targets/target-mixin.js:524:40
_onTargetAvailable@resource://devtools/shared/resources/target-list.js:186:25
_emit@resource://devtools/shared/event-emitter.js:226:34
emit@resource://devtools/shared/event-emitter.js:172:18
emit@resource://devtools/shared/event-emitter.js:324:18
_onTargetAvailable@resource://devtools/client/fronts/watcher.js:60:10
_emit@resource://devtools/shared/event-emitter.js:226:34
emit@resource://devtools/shared/event-emitter.js:172:18
emit@resource://devtools/shared/event-emitter.js:324:18
onPacket@resource://devtools/shared/protocol/Front.js:324:13
onPacket@resource://devtools/client/devtools-client.js:492:13
send/<@resource://devtools/shared/transport/local-transport.js:68:25
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22
DevToolsUtils.executeSoon*exports.executeSoon@resource://devtools/shared/DevToolsUtils.js:54:21
send@resource://devtools/shared/transport/local-transport.js:56:21
send@resource://devtools/server/devtools-server-connection.js:99:20
_sendEvent@resource://devtools/shared/protocol/Actor.js:72:15
initialize/<@resource://devtools/shared/protocol/Actor.js:46:16
_emit@resource://devtools/shared/event-emitter.js:226:34
emit@resource://devtools/shared/event-emitter.js:172:18
emit@resource://devtools/shared/event-emitter.js:324:18
notifyTargetAvailable@resource://devtools/server/actors/watcher.js:196:10
connectFromContent@resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:137:13
receiveMessage@resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:213:21
JSActor query*_createTargetActor@resource://devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm:200:10
instantiate@resource://devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm:138:14
handleEvent@resource://devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm:422:12
@chrome://browser/content/tab-content.js:77:1
construct@chrome://global/content/elements/browser-custom-element.js:1030:13
connectedCallback@chrome://global/content/elements/browser-custom-element.js:291:12
_insertBrowser@chrome://browser/content/tabbrowser.js:2237:24
addTab@chrome://browser/content/tabbrowser.js:2698:16
loadOneTab@chrome://browser/content/tabbrowser.js:1616:22
_openURIInNewTab@chrome://browser/content/browser.js:6084:28
getContentWindowOrOpenURI@chrome://browser/content/browser.js:6253:28
createContentWindow@chrome://browser/content/browser.js:6114:17
onClick@resource://devtools/client/netmonitor/src/components/AppErrorBoundary.js:104:22
callCallback@resource://devtools/client/shared/vendor/react-dom-dev.js:143:14
invokeGuardedCallbackDev@resource://devtools/client/shared/vendor/react-dom-dev.js:193:16
invokeGuardedCallback@resource://devtools/client/shared/vendor/react-dom-dev.js:250:31
invokeGuardedCallbackAndCatchFirstError@resource://devtools/client/shared/vendor/react-dom-dev.js:264:25
executeDispatch@resource://devtools/client/shared/vendor/react-dom-dev.js:555:42
executeDispatchesInOrder@resource://devtools/client/shared/vendor/react-dom-dev.js:577:20
executeDispatchesAndRelease@resource://devtools/client/shared/vendor/react-dom-dev.js:674:29
executeDispatchesAndReleaseTopLevel@resource://devtools/client/shared/vendor/react-dom-dev.js:682:10
forEachAccumulated@resource://devtools/client/shared/vendor/react-dom-dev.js:656:8
runEventsInBatch@resource://devtools/client/shared/vendor/react-dom-dev.js:810:21
runExtractedEventsInBatch@resource://devtools/client/shared/vendor/react-dom-dev.js:818:19
handleTopLevel@resource://devtools/client/shared/vendor/react-dom-dev.js:4929:30
batchedUpdates$1@resource://devtools/client/shared/vendor/react-dom-dev.js:20574:12
batchedUpdates@resource://devtools/client/shared/vendor/react-dom-dev.js:2149:12
dispatchEvent@resource://devtools/client/shared/vendor/react-dom-dev.js:5008:19
interactiveUpdates$1/<@resource://devtools/client/shared/vendor/react-dom-dev.js:20625:14
unstable_runWithPriority@resource://devtools/client/shared/vendor/react-dev.js:735:12
interactiveUpdates$1@resource://devtools/client/shared/vendor/react-dom-dev.js:20624:12
interactiveUpdates@resource://devtools/client/shared/vendor/react-dom-dev.js:2168:10
dispatchInteractiveEvent@resource://devtools/client/shared/vendor/react-dom-dev.js:4985:21
EventListener.handleEvent*addEventBubbleListener@resource://devtools/client/shared/vendor/react-dom-dev.js:4404:11
trapBubbledEvent@resource://devtools/client/shared/vendor/react-dom-dev.js:4959:25
listenTo@resource://devtools/client/shared/vendor/react-dom-dev.js:5146:29
ensureListeningTo@resource://devtools/client/shared/vendor/react-dom-dev.js:7622:11
setInitialDOMProperties@resource://devtools/client/shared/vendor/react-dom-dev.js:7690:26
setInitialProperties@resource://devtools/client/shared/vendor/react-dom-dev.js:7871:26
finalizeInitialChildren@resource://devtools/client/shared/vendor/react-dom-dev.js:8877:23
completeWork@resource://devtools/client/shared/vendor/react-dom-dev.js:17042:40
completeUnitOfWork@resource://devtools/client/shared/vendor/react-dom-dev.js:19277:26
performUnitOfWork@resource://devtools/client/shared/vendor/react-dom-dev.js:19475:12
workLoop@resource://devtools/client/shared/vendor/react-dom-dev.js:19487:24
renderRoot@resource://devtools/client/shared/vendor/react-dom-dev.js:19570:15
performWorkOnRoot@resource://devtools/client/shared/vendor/react-dom-dev.js:20477:17
performWork@resource://devtools/client/shared/vendor/react-dom-dev.js:20389:24
performSyncWork@resource://devtools/client/shared/vendor/react-dom-dev.js:20363:14
requestWork@resource://devtools/client/shared/vendor/react-dom-dev.js:20232:5
scheduleWork@resource://devtools/client/shared/vendor/react-dom-dev.js:20046:16
scheduleRootUpdate@resource://devtools/client/shared/vendor/react-dom-dev.js:20707:15
updateContainerAtExpirationTime@resource://devtools/client/shared/vendor/react-dom-dev.js:20735:10
updateContainer@resource://devtools/client/shared/vendor/react-dom-dev.js:20792:10
ReactRoot.prototype.render@resource://devtools/client/shared/vendor/react-dom-dev.js:21088:18
legacyRenderSubtreeIntoContainer/<@resource://devtools/client/shared/vendor/react-dom-dev.js:21225:14
unbatchedUpdates@resource://devtools/client/shared/vendor/react-dom-dev.js:20594:10
legacyRenderSubtreeIntoContainer@resource://devtools/client/shared/vendor/react-dom-dev.js:21221:21
render@resource://devtools/client/shared/vendor/react-dom-dev.js:21290:12
bootstrap@resource://devtools/client/netmonitor/src/app.js:77:11
open@resource://devtools/client/netmonitor/panel.js:20:15
async*onLoad@resource://devtools/client/framework/toolbox.js:2453:27
    purgeRequestsForDestroy resource://devtools/shared/protocol/Front.js:101
    purgeRequests resource://devtools/client/devtools-client.js:693
    onPacket resource://devtools/client/devtools-client.js:484
    send resource://devtools/shared/transport/local-transport.js:68
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
    executeSoon resource://devtools/shared/DevToolsUtils.js:54
    send resource://devtools/shared/transport/local-transport.js:56
    send resource://devtools/server/devtools-server-connection.js:99
    cancelForwarding resource://devtools/server/devtools-server-connection.js:321
    _cleanupConnection resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:159
    _destroy resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:183
    didDestroy resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:224
target-list.js:188:15

Patch

--- a/devtools/client/netmonitor/src/reducers/requests.js
+++ b/devtools/client/netmonitor/src/reducers/requests.js
@@ -65,16 +65,17 @@ function requestsReducer(state = Request
     }

     // Remove all requests in the list. Create fresh new state
     // object, but keep value of the `recording` field.
     case CLEAR_REQUESTS: {
       return {
         ...Requests(),
         recording: state.recording,
+        requests: null,
       };
     }

     // Select specific request.
     case SELECT_REQUEST: {
       // Selected request represents the last request that was clicked
       // before the context menu is shown
       const clickedRequest = state.requests.find(

Alex, can you please look at this?
Should we add this to MVP?

Honza

Flags: needinfo?(poirot.alex)

I'm not reproducing. Has this been fixed in the meantime?

Flags: needinfo?(poirot.alex) → needinfo?(odvarko)

I can't reproduce either, looks like fixed, closing

Honza

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(odvarko)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.