TypeError: can't access property "spec", topFrame.currentURI is null: _onRequest@chrome://remote/content/domains/parent/Network.jsm:383:20
Categories
(Remote Protocol :: CDP, defect, P1)
Tracking
(firefox76 fixed)
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
Details
Attachments
(1 file)
This fails a lot in Puppeteer unit tests, and I wonder how many test failures it actually produces. Here the exact failure:
[task 2020-04-01T05:21:34.524Z] PID 91 | TypeError: can't access property "spec", topFrame.currentURI is null: _onRequest@chrome://remote/content/domains/parent/Network.jsm:383:20
[task 2020-04-01T05:21:34.524Z] PID 91 | emit@resource://gre/modules/EventEmitter.jsm:160:20
[task 2020-04-01T05:21:34.525Z] PID 91 | _onRequest@chrome://remote/content/domains/parent/network/NetworkObserver.jsm:281:10
The appropriate source is here:
As it looks like the object as returned by getLoadContext(httpChannel)
doesn't have a topFrameElement
property. Note that this method also has a duplicate in NetworkObserver.jsm
.
Assignee | ||
Comment 1•4 years ago
|
||
This is actually not causing test failures, but is all related to network requests not initiated by the target, but the browser itself. And for all the cases I have seen so far this is for the favicon.ico
file.
So _onRequest
in NetworkObserver.jsm has to return early if there is no valid URI for the topFrameElement
. Also we should not send Network.requestWillBeSent
events for these kind of network requests given that Chrome is also not doing that.
Assignee | ||
Comment 2•4 years ago
|
||
The latter proposal seems to be harder to manage and would need a bit of refactoring of the network event code. I would propose to just get rid of the failure for now so that we have cleaner Puppeteer logs.
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f554112cb7bd [remote] Don't emit internal network request events for invalid top frame elements. r=remote-protocol-reviewers,maja_zf
Comment 6•4 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•