react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Zero execution context ID passed in Debugger.scriptParsed event

Open aeulitz opened this issue 3 years ago • 1 comments

Description

Code in ReactCommon causes the Debugger.scriptParsed event to carry a zero executionContextId. This does not line up with the execution context ID in the ExecutionContextDescription arg of the Runtime.executionContextCreated event.

Version

0.70.0

Output of npx react-native info

System: OS: Windows 10 10.0.22000 CPU: (32) x64 AMD Ryzen Threadripper PRO 3955WX 16-Cores Memory: 104.50 GB / 127.86 GB Binaries: Node: 16.14.2 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.18 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.5.0 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: AllowDevelopmentWithoutDevLicense: Enabled AllowAllTrustedApps: Enabled IDEs: Android Studio: Not Found Visual Studio: 17.2.32802.462 (Visual Studio Enterprise 2022), 16.11.32802.440 (Visual Studio Enterprise 2019) Languages: Java: 11.0.12 - C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin\javac.EXE npmPackages: @react-native-community/cli: ^9.0.0-alpha.9 => 9.0.0-alpha.9 react: 18.1.0 => 18.1.0 react-native: Not Found react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  1. Run a ReactNative app using Hermes direct debugging.
  2. Monitor CDP WebSocket messages with an appropriate packet tracer (e.g. Wireshark, Chrome DevTools protocol monitor).
  3. Attach Chrome DevTools to ReactNative app.
  4. Compare execution context ID in Runtime.executionContextCreated and Debugger.scriptParsed event.

Result: Execution context ID in Runtime.executionContextCreated represents real context ID, execution context ID in Debugger.scriptParsed event is always zero.

Expected Result: Execution context IDs in both CDP events should match.

Snack, code example, screenshot, or link to a repository

Compare https://github.com/facebook/react-native/blob/main/ReactCommon/hermes/inspector/chrome/Connection.cpp#L394 to https://github.com/facebook/react-native/blob/main/ReactCommon/hermes/inspector/chrome/Connection.cpp#L314

aeulitz avatar Sep 09 '22 00:09 aeulitz

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Mar 08 '23 00:03 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Mar 15 '23 06:03 github-actions[bot]