Skip to content
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

Ensure client is initialised synchronously in bridgeless mode #2165

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

yousif-bugsnag
Copy link
Contributor

Goal

The current code for detecting if the app is running in the remote debugger gives a false positive when running in Bridgeless New Architecture mode because global.nativeCallSyncHook is always undefined, meaning that the client is initialised asynchronously unnecessarily.

This PR updates the check to also check for global.RN$Bridgeless avoid a false positive on Bridgeless (based on React Native's internal code)

Testing

Tested manually in a 0.74 app

Copy link

github-actions bot commented Jun 28, 2024

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 44.22 kB 13.52 kB
After 44.22 kB 13.52 kB
± No change No change

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 5bb7f27

@yousif-bugsnag yousif-bugsnag force-pushed the PLAT-12176/remote-debugger-check branch from 4f069f6 to 5bb7f27 Compare June 28, 2024 11:26
@yousif-bugsnag yousif-bugsnag changed the title fix(react-native): initialise synchronously in bridgeless mode Ensure client is initialised synchronously in bridgeless mode Jun 28, 2024
@yousif-bugsnag yousif-bugsnag marked this pull request as ready for review June 28, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants