Skip to content

Implement core Network CDP events on Android #52485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

huntie
Copy link
Member

@huntie huntie commented Jul 8, 2025

Summary:
Begins integrating NetworkReporter (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the enableNetworkEventReporting and fuseboxNetworkInspectionEnabled feature flags.

This diff

Initially integrates the NetworkReporter methods corresponding to the Network.requestWillBeSent, Network.requestWillBeSentExtraInfo, Network.responseReceived, Network.loadingFinished CDP events, which are sufficient for populating a minimally rendered Network request list.

  • Create JNI InspectorNetworkReporter helper class (may also become the later public API for 3P reporting into the Network domain).
  • Renames ResponseUtil.kt as NetworkEventUtil.kt.

Changelog: [Internal]

Differential Revision: D71897099

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 8, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@huntie huntie force-pushed the export-D71897099 branch from 727b5c7 to 482fd91 Compare July 9, 2025 12:32
huntie added a commit to huntie/react-native that referenced this pull request Jul 9, 2025
Summary:

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Differential Revision: D71897099
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

huntie added a commit to huntie/react-native that referenced this pull request Jul 9, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Differential Revision: D71897099
@huntie huntie force-pushed the export-D71897099 branch from 482fd91 to 989f5ff Compare July 9, 2025 15:01
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@huntie huntie force-pushed the export-D71897099 branch from 989f5ff to 7630642 Compare July 9, 2025 16:24
huntie added a commit to huntie/react-native that referenced this pull request Jul 9, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

huntie added a commit to huntie/react-native that referenced this pull request Jul 9, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@huntie huntie force-pushed the export-D71897099 branch from 7630642 to 0e73928 Compare July 9, 2025 16:32
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@huntie huntie force-pushed the export-D71897099 branch from 0e73928 to ebd0ae3 Compare July 9, 2025 17:05
huntie added a commit to huntie/react-native that referenced this pull request Jul 9, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@huntie huntie force-pushed the export-D71897099 branch from ebd0ae3 to 1fe5e29 Compare July 10, 2025 09:18
huntie added a commit to huntie/react-native that referenced this pull request Jul 10, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

huntie added a commit to huntie/react-native that referenced this pull request Jul 10, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@huntie huntie force-pushed the export-D71897099 branch from 1fe5e29 to 4ee56c8 Compare July 10, 2025 09:26
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

huntie added a commit to huntie/react-native that referenced this pull request Jul 10, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@huntie huntie force-pushed the export-D71897099 branch from 4ee56c8 to cb3178d Compare July 10, 2025 09:33
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

huntie added a commit to huntie/react-native that referenced this pull request Jul 10, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@huntie huntie force-pushed the export-D71897099 branch from f85dc41 to 601125b Compare July 10, 2025 09:54
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@huntie huntie force-pushed the export-D71897099 branch from 601125b to e9beb88 Compare July 10, 2025 12:32
huntie added a commit to huntie/react-native that referenced this pull request Jul 10, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@huntie huntie force-pushed the export-D71897099 branch from e9beb88 to 72cc7fe Compare July 10, 2025 12:42
huntie added a commit to huntie/react-native that referenced this pull request Jul 10, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@huntie huntie force-pushed the export-D71897099 branch from 72cc7fe to c03f2f4 Compare July 11, 2025 09:13
huntie added a commit to huntie/react-native that referenced this pull request Jul 11, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

huntie added a commit to huntie/react-native that referenced this pull request Jul 11, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@huntie huntie force-pushed the export-D71897099 branch from c03f2f4 to f3486ba Compare July 11, 2025 09:23
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@huntie huntie force-pushed the export-D71897099 branch from f3486ba to 3e1cac5 Compare July 11, 2025 10:17
huntie added a commit to huntie/react-native that referenced this pull request Jul 11, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@huntie huntie force-pushed the export-D71897099 branch from 3e1cac5 to 3ffd10f Compare July 11, 2025 10:24
huntie added a commit to huntie/react-native that referenced this pull request Jul 11, 2025
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
Summary:
Pull Request resolved: facebook#52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71897099

@huntie huntie force-pushed the export-D71897099 branch from 3ffd10f to 49ae334 Compare July 11, 2025 16:33
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 13, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b18cd58.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @huntie in b18cd58

When will my fix make it into a release? | How to file a pick request?

@huntie huntie deleted the export-D71897099 branch July 14, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants