NetworkEventActor throws error message in Browser Toolbox | this._sessionContext is undefined
Categories
(DevTools :: Framework, defect, P3)
Tracking
(firefox-esr91 unaffected, firefox95 unaffected, firefox96 unaffected, firefox97 wontfix, firefox98 fixed)
| Tracking | Status | |
|---|---|---|
| firefox-esr91 | --- | unaffected |
| firefox95 | --- | unaffected |
| firefox96 | --- | unaffected |
| firefox97 | --- | wontfix |
| firefox98 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: ochameau)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
Here's the full message + stacktrace:
TypeError: can't access property "type", this._sessionContext is undefined network-event-actor.js:124:7
asResource resource://devtools/server/actors/network-monitor/network-event-actor.js:124
asResource self-hosted:1178
httpOnImageCacheResponse resource://devtools/server/actors/resources/network-events-content.js:149
httpOnImageCacheResponse self-hosted:1178
updateFxAPanel chrome://browser/content/browser-sync.js:905
updateAllUI chrome://browser/content/browser-sync.js:596
observe chrome://browser/content/browser-sync.js:574
notifyStateUpdated resource://services-sync/UIState.jsm:140
refreshState resource://services-sync/UIState.jsm:127
InterpretGeneratorResume self-hosted:1485
AsyncFunctionNext self-hosted:695
It looks like ParentProcessTargetActor is not initialized with a sessionContext
| Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Set release status flags based on info from the regressing bug 1745238
Comment 2•4 years ago
|
||
Setting NI based on assignee of the regressing bug in comment 1.
Alex, can you look into this? Thanks!
| Assignee | ||
Comment 3•4 years ago
|
||
I'm not able to reproduce the exception.
It is true that the ParentProcessTarget actor isn't receiving a session context as it is still instantiated from the parent process descriptor and not from the Watcher actor.
But it should not spawn the NetworkEventContentWatcher. Instead it should be spawn by the tabs's WindowGlobalTargets.
These ones will be spawn by the watcher actor and should receive a session context.
Given that I'm not able to reproduce this easily, I'm wondering if that's rather a race condition where we are using a destroyed target actor??
Comment 4•4 years ago
|
||
Nicolas, can you provide additional steps to reproduce, so Alexandre might be able to repro this? Thanks.
| Reporter | ||
Comment 5•4 years ago
|
||
I can reproduce easily with:
- On a Firefox where you're logged in with your Firefox account
- Open the browser toolbox
- On the main browser window, click on the Firefox account button so it opens the popup where you can synchronize, see your sunces tabs, …
-> The error is printed multiple times in the Browser Toolbox
Updated•4 years ago
|
| Reporter | ||
Comment 7•4 years ago
|
||
(In reply to Alexandre Poirot [:ochameau] from comment #3)
It is true that the ParentProcessTarget actor isn't receiving a session context as it is still instantiated from the parent process descriptor and not from the Watcher actor.
But it should not spawn theNetworkEventContentWatcher. Instead it should be spawn by the tabs's WindowGlobalTargets.
We do call spawn NetworkEventContentWatcher with a parent process target. Here's the stacktrace I get:
NetworkEventContentWatcher#watch - targetActor: server1.conn0.parentProcessTarget4
console.trace:
resource://devtools/server/actors/resources/network-events-content.js 44 watch
resource://devtools/server/actors/resources/index.js 242 watchResources
resource://devtools/server/actors/targets/target-actor-mixin.js 161 _watchTargetResources
resource://devtools/server/actors/targets/target-actor-mixin.js 53 addSessionDataEntry
resource://devtools/server/actors/watcher.js 573 watchResources
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 8•4 years ago
|
||
Thanks for the stracktrace, it helped me craft a mochitest to cover this and better understand this edgecase.
Because of this exception we are most likely missing cached image request and CSP blocked request done from the parent process (and only the one done from the parent process). So that it only impact the browser toolbox's netmonitor.
| Assignee | ||
Comment 9•4 years ago
|
||
We were missing cached image request and probably CSP blocked request
from the parent process because of this.
We are spawning a NetworkEventContentWatcher for the parent process target.
That's semi-intentional. This might better be done via a parent process resource type,
like NETWORK_EVENT. But the current Resource framework doesn't allow to do that easily.
So that we currently spawn the NetworkEventContentWatcher (and NetworkEventStackTraceWatcher)
against the parent process target actor as a "FRAME" resource type.
This is handy as we need at least one of these two watchers for the parent process.
Comment 10•4 years ago
|
||
The severity field is not set for this bug.
:ochameau, could you have a look please?
For more information, please visit auto_nag documentation.
| Assignee | ||
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
| bugherder | ||
Updated•4 years ago
|
Description
•