Skip to content

Return NO from requiresMainQueueSetup to avoid main-queue dispatch_sync at bridge init #6201

Closed

Description

@HADeveloper

What React Native libraries do you use?

RN New Architecture, Expo Application Services (EAS), Expo (mobile only), React Navigation

Are you using sentry.io or on-premise?

sentry.io (SaS)

Are you using any other error monitoring solution alongside Sentry?

No

Other Error Monitoring Solution Name

No response

@sentry/react-native SDK Version

6.20.0

How does your development environment look like?

⬇  Place the `npx react-native@latest info` output here. ⬇

(REDACTED)
iOS:
  hermesEnabled: true
  newArchEnabled: true


Sentry.init()

Sentry.init({
  dsn: 'https://...@sentry.io/...'
  // other options
});

N/A

Steps to Reproduce

RNSentry's +requiresMainQueueSetup currently returns YES (packages/core/ios/RNSentry.mm). Its init only performs a trivial NSObject allocation — no UIKit or main-thread-only work — so it can safely return NO.

Returning YES forces a dispatch_sync onto the main queue during bridge setup, which has been observed as a rare "App Hang" crasher (notably reported by Shopify: https://arc.net/l/quote/kkxmwgdb). Concern grows under the New Architecture where bridge-init timing is tighter.

Proposed change: return NO. Happy to open a PR if it's welcome.

Expected Result

No Crash

Actual Result

Startup crashes

(This is more of a preventative measure as we are cleaning up things and moving to new arch)

Activity

  1. linear-code commented on May 21, 2026

    @linear-code
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 21, 2026
  3. self-assigned this
    on May 21, 2026
  4. antonis commented on May 21, 2026

    @antonis
    Contributor

    Thank you for reporting 🙇 We are working on a fix with #6202
    We'll iterate here once shipped.

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 21, 2026
  6. github-actions commented on May 28, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #6202, which was included in the 8.13.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions