Stack trace pane becomes empty when switching between requests in the network monitor
Categories
(DevTools :: Netmonitor, defect, P1)
Tracking
(firefox-esr68 unaffected, firefox72 wontfix, firefox73 fixed, firefox74 fixed)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox72 | --- | wontfix |
firefox73 | --- | fixed |
firefox74 | --- | fixed |
People
(Reporter: transfusion, Assigned: nchevobbe)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
3.39 MB,
video/mp4
|
Details | |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-release+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
Open the network monitor, open any website with more than one (JavaScript-initiated) request. Find two requests which have a stack trace available in the right pane.
Choose one of them, click on the stack trace so that it is visible, then click on the other request which is known to also have a stack trace.
Actual results:
The stack trace panel becomes blank. I have to deselect the stack trace panel (e.g. by selecting the Headers or Cookies tab) and reselect it for the stack trace to show up properly.
A video is attached.
Expected results:
I should be able to keep the stack trace tab open, switch between requests and have the correct stack trace shown automatically.
This appears to be a regression because release versions of FF, e.g. 70.0.1+build1-0ubuntu0.18.04.1 , do not seem to have this issue.
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Quickly investigating, it looks like the stacktrace
property from the request (devtools/client/netmonitor/src/components/StackTracePanel.js#63 ) is empty when switching to the second network call.
We are fetching the stacktrace for a request in componentWillReceiveProps
, but first we check if we're rendering for a new request.
In order to do that, we are checking request.actor
, which is always undefined, so we never fetch the stacktrace from here (we do from componentDidMount though).
The following diff fixes the issue:
diff --git a/devtools/client/netmonitor/src/components/StackTracePanel.js b/devtools/client/netmonitor/src/components/StackTracePanel.js
--- a/devtools/client/netmonitor/src/components/StackTracePanel.js
+++ b/devtools/client/netmonitor/src/components/StackTracePanel.js
@@ -51,7 +51,7 @@ class StackTracePanel extends Component
componentWillReceiveProps(nextProps) {
const { request, connector } = nextProps;
// If we're not dealing with a new request, bail out.
- if (this.props.request && this.props.request.actor === request.actor) {
+ if (this.props.request && this.props.request.id === request.id) {
return;
}
fetchNetworkUpdatePacket(connector.requestData, request, ["stackTrace"]);
Assignee | ||
Comment 2•4 years ago
|
||
Caused by Bug 1570476 (my bad!)
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
In the StackTracePanel component we're fetching
stacktrace data on demand. In Bug 1570476 we
added a check to make sure we wouldn't fetch
the data if the same request was selected.
The issue is that the check is done on an
undefined property, and so the stacktrace
are never fetched from componentWillReceiveProps.
The test checking the stack trace data wasn't
actually doing so by triggering the UI, so the
bug wasn't caught.
This patch fixes the issue and modifies the test
so we make sure that the stacktrace is displayed
when selecting the stacktrace panel.
Updated•4 years ago
|
Updated•4 years ago
|
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8444c4271ed6 Fix empty Stack Trace panel when selecting another request. r=Honza.
Comment 5•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
Ryan, is it too late to request an uplift to Beta?
Comment 7•4 years ago
|
||
We've already built the Fx73 RC build. I don't have any drivers for a respin at this point, but feel free to nominate this patch for mozilla-release approval if you want it to be considered for ride-along status.
Assignee | ||
Comment 8•4 years ago
|
||
Honza, Bomsy, do you think this should be lifted all the way up to release?
Comment 9•4 years ago
|
||
Comment on attachment 9124060 [details]
Bug 1612817 - Fix empty Stack Trace panel when selecting another request. r=Honza.
Beta/Release Uplift Approval Request
- User impact if declined: Only DevTools users (web developers) impacted. Stack trace info not available for HTTP requests in some cases.
- 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): Low risk, only DevTools users & one-liner patch.
- String changes made/needed:
Comment 10•4 years ago
|
||
Good point Nicolas, asking for uplift. It's annoying bug and low risk patch.
Honza
Comment 11•4 years ago
|
||
LGTM for fix-optional. If we need to spin another build for release this would be good to include.
Comment 12•4 years ago
|
||
Comment on attachment 9124060 [details]
Bug 1612817 - Fix empty Stack Trace panel when selecting another request. r=Honza.
Fixes a Netmonitor bug which can cause stack traces to appear empty in some circumstances. Approved for 73.0 RC2.
Comment 13•4 years ago
|
||
bugherder uplift |
Description
•