Multiple batched request updates with the same id override each other
Categories
(DevTools :: Console, defect)
Tracking
(firefox86 fixed)
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: bomsy, Assigned: bomsy)
References
Details
Attachments
(1 file)
When enabling NETWORK_EVENT/NETWORK_EVENT_STACKTRACE in Bug 1665383. Browser_webconsole_network_messages_stacktrace_console_initiated_request.js
test fails intermittently here https://searchfox.org/mozilla-central/rev/6feef3dcfce7e5c922093edde758330857ce2bb3/devtools/client/webconsole/test/browser/browser_webconsole_network_messages_stacktrace_console_initiated_request.js#45. This happens because the stacktrace trace is not shown.
After investigations i discovered that when we get multiple message updates with the same id's batched before the queue is flushed.
e.g
const updates = [
{ id: "server0.conn0.netEvent5" , data: { foo: "123" } },
{ id: "server0.conn0.netEvent5", data: { bar: "456" } }
];
When redux updates the networkMessagesUpdateById
state here https://searchfox.org/mozilla-central/source/devtools/client/webconsole/reducers/messages.js#574-598, the data of the second update overrides the first, instead of augment what is already there.
AR:
After state update
networkMessagesUpdateById = {
"server0.conn0.netEvent5": { bar: "456" },
...
}
ER:
After state update
networkMessagesUpdateById = {
"server0.conn0.netEvent5": { foo: "123", bar: "456" },
...
}
So in the test scenario above, the stacktrace
from the first batch update gets overridden by the second batch update even though the second is not explicitly updating the stacktrace
. This happens intermittenly because certain times the network response listener might send an update to the frontend from here https://searchfox.org/mozilla-central/rev/6feef3dcfce7e5c922093edde758330857ce2bb3/devtools/server/actors/network-monitor/network-response-listener.js#531-536
Assignee | ||
Comment 1•4 years ago
|
||
Depends on D102116
Updated•4 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Backed out 3 changesets (Bug 1687205, Bug 1687192, Bug 1665383) for causing devtools failures in browser_net_block-csp.js CLOSED TREE
Failure log: https://treeherder.mozilla.org/logviewer?job_id=327030281&repo=autoland&lineNumber=3087
Backout: https://hg.mozilla.org/integration/autoland/rev/58b99a41151b6bfd8c7561ec47431dc284e17991
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 5•4 years ago
|
||
bugherder |
Description
•