Closed Bug 1713297 Opened 3 years ago Closed 3 years ago

The Network panel shows broken request with target-switching enabled

Categories

(DevTools :: Netmonitor, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: Honza, Unassigned)

References

Details

STRs (it's very easy to repro on other pages as well):

  1. Enable these prefs:
  • fission.autostart
  • devtools.target-switching.server.enabled
  1. Load http://janodvarko.cz/tests/fission/case1/index.html
  2. Open DevTools and switch to the Network panel
  3. Reload the page to see entries in the Network panel

AR
The HTTP request for index.js isn't incomplete - there are no data for it when I inspect it using the side panel (you can also see that most of the columns are empty).

ER
I want to see all the data


It works well if devtools.target-switching.server.enabled is false

Honza

There are some errors in the Browser Console:

DOMException: JSWindowActorChild.sendAsyncMessage: JSWindowActorChild cannot send at the moment event-emitter.js:241:21
TypeError: can't access property "document", this.window is null
get resource://devtools/server/actors/targets/frame.js:36
onDocumentEvent resource://devtools/server/actors/resources/document-event.js:51
_emit resource://devtools/shared/event-emitter.js:226
emit resource://devtools/shared/event-emitter.js:172
_emit resource://devtools/shared/event-emitter.js:255
emit resource://devtools/shared/event-emitter.js:172
emit resource://devtools/shared/event-emitter.js:324
onContentLoaded resource://devtools/server/actors/webconsole/listeners/document-events.js:105
onWindowReady resource://devtools/server/actors/webconsole/listeners/document-events.js:82
onWindowReady resource://devtools/server/actors/webconsole/listeners/document-events.js:80
_emit resource://devtools/shared/event-emitter.js:226
emit resource://devtools/shared/event-emitter.js:172
emit resource://devtools/shared/event-emitter.js:324
_windowReady resource://devtools/server/actors/targets/browsing-context.js:1418
onWindowCreated resource://devtools/server/actors/targets/browsing-context.js:1757
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
watch resource://devtools/server/actors/targets/browsing-context.js:1656
_watchDocshells resource://devtools/server/actors/targets/browsing-context.js:677
_attach resource://devtools/server/actors/targets/browsing-context.js:659
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
event-emitter.js:241:21
TypeError: can't access property "targetType", targetFront is undefined
_onTargetDestroyed resource://devtools/shared/commands/target/target-command.js:272
_emit resource://devtools/shared/event-emitter.js:226
emit resource://devtools/shared/event-emitter.js:172
emit resource://devtools/shared/event-emitter.js:324
_onTargetDestroyed resource://devtools/client/fronts/watcher.js:70
_emit resource://devtools/shared/event-emitter.js:226
emit resource://devtools/shared/event-emitter.js:172
emit resource://devtools/shared/event-emitter.js:324
onPacket resource://devtools/shared/protocol/Front.js:336
onPacket resource://devtools/client/devtools-client.js:482
send resource://devtools/shared/transport/local-transport.js:68
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
event-emitter.js:241:21
Task cancelled
debuggee 'resource://devtools/shared/base-loader.js:289' would run 2 builtin-modules.js:198:11

Whiteboard: dt-fission-m3-triage
Has STR: --- → yes
Fission Milestone: --- → M8
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp

Tried taking a look into this a little bit. This issue seems to relate to this places in the code https://searchfox.org/mozilla-central/rev/74f3c420ee54001059e1850bef3be876749ff873/devtools/shared/commands/resource/resource-command.js#306,710-711. The cache gets cleared by _onWillNavigate which is called on target available where there is a target switch. When the update is triggered later, the resource no longer exists in the cache https://searchfox.org/mozilla-central/rev/74f3c420ee54001059e1850bef3be876749ff873/devtools/shared/commands/resource/resource-command.js#558-564

Alex seems to have some WIP around fixing this issue in Bug 1713643

Blocks: 1713643
Severity: -- → S3
Priority: -- → P2

Retesting again and it's fixed now.

The following two bugs are both likely fixing this bug

  • Bug 1713643 - Use DOCUMENT_EVENT's will-navigate event to clear ResourceCommand internal cache
  • Bug 1705380 - The Network panel should be properly cleared when doing a server side top level target switch

Honza

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Fission Milestone: M8 → ---
Whiteboard: dt-fission-m3-mvp
You need to log in before you can comment on or make changes to this bug.