Skip to content

Network requests fired before plugin initialization are not captured #82

@manish2612

Description

@manish2612

Describe the bug

When using @rozenite/network-activity-plugin in a React Native 0.78.2 project, the plugin successfully displays network requests in the React Native DevTools once it is initialized. However, any network requests that are fired before the plugin is initialized (e.g. during the initial render of the root component or from global singletons that execute at module load) are not captured in the Network Activity panel.

This means that the very first screen’s API calls are consistently missing from the logs, even though later requests show up as expected.

Expected Behavior

All network requests — including those fired during the initial render phase or before React mounts the root component — should be intercepted and displayed in the Network Activity panel.

Actual Behavior

Requests made before plugin initialization are silently missed.

Only requests after initialization are visible in DevTools.

System Info

React Native: 0.78.2

@rozenite/network-activity-plugin: latest

DevTools: new RN DevTools (not Flipper)

Platform: iOS

Rozenite Version

1.0.0-alpha.11

Reproduction

NA

Steps to reproduce

Add @rozenite/network-activity-plugin via Metro config (withRozenite).

Initialize the plugin using useNetworkActivityDevTools() at the very top of the root component (before rendering anything else).

Trigger a network request (e.g. via fetch or axios) immediately in the first screen’s useEffect.

Observe that this initial request does not appear in the Network Activity panel.

Any subsequent requests (triggered after initialization) do appear correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions