Closed Bug 1304752 Opened 3 years ago Closed 3 years ago

"Handler function threw an exception: TypeError: channel.loadInfo is null" spam


(DevTools :: Netmonitor, defect, P1)



(firefox53 fixed)

Firefox 53
Tracking Status
firefox53 --- fixed


(Reporter: nmaier, Assigned: jsnajdr)




(1 file)

The assumption that every channel has a |.loadInfo| is incorrect.
E.g. DownThemAll! created channels do not at the moment.

This causes the netmonitor backend to spam messages like this:
Handler function threw an exception: TypeError: channel.loadInfo is null
Stack: NetworkMonitor.prototype._createNetworkEvent@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:1003:9
NetworkMonitor.prototype._onRequestHeader@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:1080:5
NetworkMonitor.prototype.observeActivity<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:940:7
exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
Line: 1003, column: 9

- Install e.g. DownThemAll! and download some stuff with it (or otherwise create channels without a loadInfo)
- See the Browser Console accumulate messages like the above.

This can fill up the Console rather rapidly, making it somewhat unresponsive and less useful.

The culprit:
It should check for |.loadInfo| being not null before trying to access properties.

Looking at it now, this bug is might cause bug 1304744, as httpActivity.owner would be set up only after the loadInfo property access throws.
Assignee: nobody → jsnajdr
Priority: -- → P1
Added a check for channel.loadInfo to the NetworkMonitor code.

Nils, I can't reproduce the issue with the DownThemAll extension. I'm using version 3.0.8. Have you fixed something since reporting this bug? Can you help me with the exact steps to reproduce?

The fix is obvious even without reproducing the bug, but I'd like to understand better where the channels with null loadInfo come from. All instances I've seen have loadInfo set to something. Even when stepping through the DownThemAll code here:

the created channel has a loadInfo, even though it's not specified as the third arg to newProxiedChannel().
Flags: needinfo?(maierman)
QA Contact: jsnajdr
No longer blocks: 1304744
Duplicate of this bug: 1304744
Comment on attachment 8814365 [details]
Bug 1304752 - Check for null channel.loadInfo in NetworkMonitor

Thanks Jarda.
Attachment #8814365 - Flags: review?(poirot.alex) → review+
Pushed by
Check for null channel.loadInfo in NetworkMonitor r=ochameau
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Product: Firefox → DevTools
Flags: needinfo?(maierman)
You need to log in before you can comment on or make changes to this bug.