Skip to content

fix(core): Match Sentry package paths with Windows separators in Metro resolvers - #6915

Merged
alwx merged 2 commits into
mainfrom
alwx/bugfix/6913
Oct 20, 2026
Merged

alwx merged 2 commits into
mainfrom
alwx/bugfix/6913

Conversation

@alwx

@alwx alwx commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

The Metro resolvers now match the @sentry/browser and @sentry/core origin paths with forward slashes and with backslashes. Before, they matched only forward slashes, so on Windows the @sentry/browser feedback wrappers and the server-only @sentry/core modules stayed in native bundles.

💡 Motivation and Context

With includeWebFeedback: false, bundles made on Windows kept feedbackSync.js. This file calls the stubbed buildFeedbackIntegration() at load time, so the app crashed at launch. Fixes #6913.

💚 How did you test it?

I added resolver tests that use Windows paths. They failed before the fix and pass after it. All tool tests, oxlint, oxfmt, and madge pass.

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • No breaking changes.

alwx added 2 commits October 20, 2026 11:36
…o resolvers

On Windows, Metro gives `originModulePath` with backslashes. The
`@sentry/browser` and `@sentry/core` origin checks searched for a
forward slash, so they never matched. With `includeWebFeedback: false`,
the bundle then kept `feedbackSync.js`, which calls the stubbed
`buildFeedbackIntegration()` at load time and crashes the app at launch.
Server-only `@sentry/core` modules also stayed in native bundles.

Match both separators in the two origin checks.

Fixes #6913
…lver fix

Replace the placeholder with the number of the opened PR.
@github-actions

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • fix(core): Match Sentry package paths with Windows separators in Metro resolvers by alwx in #6915
  • chore(e2e): Update Expo sample to SDK 58 by antonis in #6914
  • chore(e2e): Bump E2E tests to React Native 0.88.0 by antonis in #6899
  • fix(ios): Find .xcode.env in the debug symbols phase under SwiftPM by alwx in #6911
  • chore(deps): update React Native to v0.88.0 by github-actions in #6903
  • chore(deps): bump getsentry/craft from 2.34.1 to 2.35.0 by dependabot in #6906
  • chore(deps): bump actions/create-github-app-token from 3.2.0 to 3.3.0 by dependabot in #6908
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.33.1 to 2.35.0 by dependabot in #6907
  • chore(sample): Bump React Native sample to 0.88.0 by antonis in #6910
  • chore(deps): bump actions/setup-java from 6.0.1 to 6.1.0 by dependabot in #6909
  • chore(deps): bump the codeql-action group with 3 updates by dependabot in #6905
  • chore(deps): update Sentry Android Gradle Plugin to v6.24.0 by github-actions in #6902
  • chore(deps): bump @appium/support from 7.0.6 to 7.2.8 by dependabot in #6897
  • ci(e2e): Remove app metrics job and performance-tests by antonis in #6896

🤖 This preview updates automatically when you update the PR.

@alwx
alwx marked this pull request as ready for review October 20, 2026 10:11
@antonis antonis added the ready-to-merge Triggers the full CI test suite label Oct 20, 2026
@sentry

sentry Bot commented Oct 20, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.31.0 (111) Release

⚙️ sentry-react-native Build Distribution Settings

@antonis antonis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes and the tests LGTM. Note that I didn't actually test on Windows.

@alwx
alwx merged commit ea63a83 into main Oct 20, 2026
180 of 196 checks passed
@alwx
alwx deleted the alwx/bugfix/6913 branch October 20, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

includeWebFeedback: false leaves @sentry/browser's feedbackSync in bundles made on Windows, which then fail at launch

2 participants