Closed Bug 1477252 Opened Last year Closed Last year

After scrolling a few seconds in the request list with arrow keys the network's panel becomes blank


(DevTools :: Netmonitor, defect, P1, major)

60 Branch


(firefox-esr60 wontfix, firefox61 wontfix, firefox62 wontfix, firefox63 wontfix, firefox64 verified, firefox65 verified)

Firefox 65
Tracking Status
firefox-esr60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- wontfix
firefox64 --- verified
firefox65 --- verified


(Reporter: maria_berlinger, Assigned: Honza)



(Keywords: regression)


(2 files)

Attached image bug capture.gif
[Affected versions]:
Firefox 63.0a1 (BuildId:20180718100918).
Firefox 62.0b9 (BuildId:20180713213322).
Firefox 61.0.1 (BuildId:20180704003137).
Firefox 60.1.0 esr (BuildId:20180621121604).

[Affected platforms]:
Windows 10 64bit.
macOS 10.13.4
Ubuntu 16.04 64bit.

[Steps to reproduce]:
1. Launch Firefox.
2. Go to any website (e.g.
3. Right click on the page and choose "Inspect Element".
4. From the dev tools panel go to "Network".
5. Click a random request.
6. From "Details pane" choose "Response" tab.
7. Scroll up/down on requests with arrow keys for a while.

[Expected result]:
The requests are properly scrolled using the up/down arrow keys.  

[Actual result]:
After scrolling a few seconds in the request list the network's panel becomes blank.

[Regression range]:
This seems to be a regression:

Last good revision: 0c39c734b41929d2de8ed1f090b51bca95fefb9e
First bad revision: 3fb1f0afdc6decd6d53876304c0806cc6b7d39d0


[Additional information]:
For further information regarding this issue please observe the attached screencast.
Hi Patrick, could you help us here?
Flags: needinfo?(pbrosset)
I reproduced it on Windows 10/Nightly 63.
This is a P1 for sure since the entire panel disappears, and this is likely to happen to users primarily using the keyboard.

My hunch is that as you navigate through the list with the keyboard, the response sidebar tries to refresh as you go. But navigation is so fast that the content of that sidebar sometimes does not have time to load (it does it async). So it may sometimes be that the refresh starts, but by the time it ends, it's too late, the user has already selected another item from the list.

I think that our code here doesn't expect that to happen, and just fails.

It's a bit sad that the entire panel becomes blank. It would be better if the error occurred but didn't crash the entire panel.
Having said that, we do need to fix it anyway.

Here's the JS error in the browser console:

TypeError: this.config is null

TypeError: "cm is undefined"
Severity: normal → major
Flags: needinfo?(pbrosset)
Priority: -- → P1
Looks like it's a case where the codemirror editor (which we use to display the request's response) is being destroyed before we try to access some of its internals.

In devtools\client\sourceeditor\editor.js in many places we access the codemirror instance by doing:
const cm = editors.get(this);
and this can return undefined (presumably if the editor was already destroyed, or not created yet).
So in theory, everywhere we do this, we should guard against it being undefined, and bail out.
Too late for a fix for 63 but we can still take a patch for 65/64. 
Honza, can you help find an owner for this bug?
Flags: needinfo?(odvarko)
Ah, sorry, this slipped off my radar, working on it now.

Assignee: nobody → odvarko
Flags: needinfo?(odvarko)
Pushed by
Check whether editor is destroyed before using it; review=nchevobbe r=nchevobbe
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Verified as fixed on Firefox Nightly 65.0a1 (2018-11-01)(64-bit) on Windows 10(x64), Mac OS X 10.13 and on Ubuntu 16.04(x64).
Flags: qe-verify+
Please nominate this for Beta approval when you get a chance. It grafts cleanly as-landed.
Flags: needinfo?(odvarko)
Comment on attachment 9018603 [details]
Bug 1477252 - Check whether editor is destroyed before using it; review=nchevobbe

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: None

User impact if declined: The Network panel (DevTools) breaks when the user navigates in it using the keyboard.

Is this code covered by automated tests?: Yes

Has the fix been verified in Nightly?: Yes

Needs manual test from QE?: No

If yes, steps to reproduce: 

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): The patch is rather smaller, tested and affects only Web developers.

String changes made/needed:
Flags: needinfo?(odvarko)
Attachment #9018603 - Flags: approval-mozilla-beta?
Comment on attachment 9018603 [details]
Bug 1477252 - Check whether editor is destroyed before using it; review=nchevobbe

netmonitor fix for 64.0b7
Attachment #9018603 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
This issue is verified fixed using Firefox 64.0b7 on the following OSes: Windows 10 x64, mac 10.13.6, Ubuntu 16.04 x64.
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.