WebSocket payload preview broken
Categories
(DevTools :: Netmonitor, defect, P2)
Tracking
(firefox86 fixed, firefox87 fixed)
People
(Reporter: Honza, Assigned: bomsy)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
I am not seeing preview for WS JSON payload that contains "data" field.
STR:
- Load http://janodvarko.cz/test/websockets/
- Open the Network panel
- Click "Connect" button on the page
- Try to send some messages (just to have something in the list of frames to select)
- Select the 101 HTTP request and select the Response panel
- Put the following string into the Send input field and click the "Send" button
{ "data": { } }
- Select the WS frame in the Response panel -> the payload preview section is not updated BUG
ER:
The payload preview section should be properly updated when the use selects a frame in the list.
Honza
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Thanks Honza!
I can reproduce it. I get this error TypeError: payloadUnclean.match is not a function
. It might relate to this https://phabricator.services.mozilla.com/D80720
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Reporter | ||
Comment 3•3 years ago
|
||
The fix should be uplifted to beta when properly tested in Nightly.
Honza
Assignee | ||
Comment 4•3 years ago
|
||
After more investigation, we hit the issue mentioned in this comment
We have a loose rule in determining if the json payload is an Action Cable
or not. https://searchfox.org/mozilla-central/rev/69babd862de70cabfa1d0a369d38e4881bd41e4d/devtools/client/netmonitor/src/components/messages/MessagePayload.js#291-293
The fix was a bit tricky so i guess a compromise was made here
Assignee | ||
Comment 5•3 years ago
|
||
Identifying json Action cable
payloads is tricky. Currently we parse the json again in parseActionCable
to determine if
it is an Action cable
payload.
Instead lets check using a possible criteria before attempting to call parseActionCable
.
See https://medium.com/codequest/actioncable-in-rails-api-f087b65c860d for Action cable
details.
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dfe7c77efb78 Use more specific rules to determine 'action cable' payloads r=Honza
Comment 7•3 years ago
|
||
bugherder |
Assignee | ||
Comment 8•3 years ago
|
||
Comment on attachment 9199348 [details]
Bug 1688590 - Use more specific rules to determine 'action cable' payloads r=honza
Beta/Release Uplift Approval Request
- User impact if declined: Impacts only developers
- 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): Small JavaScript change, with tests included
- String changes made/needed:
Comment 9•3 years ago
|
||
Comment on attachment 9199348 [details]
Bug 1688590 - Use more specific rules to determine 'action cable' payloads r=honza
Low risk, has tests, approved for 86 beta 6, thanks.
Comment 10•3 years ago
|
||
bugherder uplift |
Description
•