Skip to content

Conversation

vzaidman
Copy link

Summary

CDP events pending doesn't make sense, since events can't be updated after they arrive (since they don't have an id anyway): https://github.com/ChromeDevTools/devtools-frontend/blob/3201a3630665afd30e0a879f4ebeae6fcc4f3806/front_end/panels/protocol_monitor/ProtocolMonitor.ts#L562-L587

Also, events are allowed to have no params based on:

The two events that caught my eye are:

Both are expected to be sent without params, however Chrome does send an empty object params for them.

I work on the DevTools branch for React Native-
https://github.com/facebook/react-native-devtools-frontend

We've omitted "params" for these events as per the CDP docs, resulting in "(pending)" displayed in the Protocol Monitor. We thought we made a mistake at first, but it turns out it's just the Protocol Monitor's UI.

Test plan

Screenshot 2025-08-20 at 11 37 19
  • This change maintains backwards compatibility with previous Local Storage data (if modifying settings, experiments, or other persisted client state).

Upstreaming plan

… with no params as "(pending)".

CDP events pending doesn't make sense, since events can't be updated
after they arrive (since they don't have an id anyway):
https://github.com/ChromeDevTools/devtools-frontend/blob/3201a3630665afd30e0a879f4ebeae6fcc4f3806/front_end/panels/protocol_monitor/ProtocolMonitor.ts#L562-L587

Also, events are allowed to have no params based on:
* JSON-RPC 2.0 Specification: https://www.jsonrpc.org/specification#:~:text=This%20member%20MAY%20be%20omitted
* and CDP Wire Format: https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/public/devtools_protocol/#:~:text=CDP%20is%20designed%20with%20JSON%2DRPC%202.0%20as%20the%20primary%20wire%20format

The two events that caught my eye are:
* Debugger.resumed
https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#event-resumed
* and Runtime.executionContextsCleared
https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#event-executionContextsCleared

Both are expected to be sent without params, however Chrome does send an
empty object params for them.

I work on the DevTools branch for React Native-
https://github.com/facebook/react-native-devtools-frontend

We've omitted "params" for these events as per the CDP docs, resulting
in "(pending)" displayed in the Protocol Monitor. We thought we made a
mistake at first, but it turns out it's just the Protocol Monitor's UI.

Screenshots of the issue and the fix are attached in
https://issues.chromium.org/issues/440012466.

Fixed: 440012466
Change-Id: I34e2472287d66b7cbe9146deae27fac138535425
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6862800
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
@meta-cla meta-cla bot added the cla signed label Aug 21, 2025
@motiz88 motiz88 self-requested a review August 21, 2025 15:04
Copy link

@motiz88 motiz88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: It's called "Protocol Monitor", not "Protocol Manager".

@vzaidman vzaidman changed the title [DevTools][Protocol Manager] Fixed Protocol Manager displaying CDP events as "(pending)" [DevTools][Protocol Manager] Fixed Protocol Monitor displaying CDP events as "(pending)" Aug 21, 2025
@vzaidman vzaidman merged commit 1e19c44 into main Aug 21, 2025
5 checks passed
@vzaidman vzaidman deleted the fix-protocol-manager-pending-state branch August 21, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants