Some error message might be displayed twice in the console after reload
Categories
(DevTools :: Console, defect)
Tracking
(firefox110 fixed)
Tracking | Status | |
---|---|---|
firefox110 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(1 file)
Steps to reproduce
- Open a tab on https://ffx-devtools-duplicated-csp-message-on-reload.glitch.me/
- Open the console
- Reload the tab
Expected results
The CSP warning is displayed once
Actual results
The CSP warning is displayed twice (see the "repeat bubble" at the right side of the message)
This comes from a race condition due to how we get "cached" messages and register for new ones in https://searchfox.org/mozilla-central/rev/4ebfb48f7e82251145afa4a822f970931dd06c68/devtools/server/actors/resources/utils/nsi-console-listener-watcher.js#44-47
The code there was supposed to handle such case, but this isn't enough.
Assignee | ||
Comment 1•2 years ago
|
||
Even if the code was trying to not get duplicated messages (from the cache and from the listener),
there were still cases where this could happen (e.g. CSP warnings on navigation).
To prevent this, we store the latest message microSecondTimeStamp so we can filter
out any message older than this in the listener.
An existing CSP warning test is modified to ensure we get single messages in the
console output.
Comment 3•2 years ago
|
||
bugherder |
Description
•