Skip to content

fix(expo): resolve plugin config when registered as bare '@sentry/react-native' - #6543

Merged
antonis merged 5 commits into
mainfrom
fix/expo-upload-sourcemaps-bare-plugin-name
Jul 31, 2026
Merged

fix(expo): resolve plugin config when registered as bare '@sentry/react-native'#6543
antonis merged 5 commits into
mainfrom
fix/expo-upload-sourcemaps-bare-plugin-name

Conversation

@antonis

@antonis antonis commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix

📜 Description

The @sentry/expo-upload-sourcemaps CLI resolves the Sentry org/project/url from the Expo config by scanning the plugins array. It only matched the plugin name @sentry/react-native/expo, so projects that register the plugin under the equally-valid bare name @sentry/react-native were not found — pluginConfig came back null and the script exited 1 with:

🐕 Fetching from expo config...
Could not fetch from expo config, trying sentry.properties files...

Both names resolve to the same plugin module (packages/core/app.plugin.js re-exports ./expo), so the uploader now matches either name.

💡 Motivation and Context

The bare @sentry/react-native plugin path is valid everywhere else in the SDK (config plugin, native build), so the uploader failing on it is an inconsistency, not user error. The only workaround today is registering as @sentry/react-native/expo or setting SENTRY_ORG/SENTRY_PROJECT env vars.

Fixes #6538

💚 How did you test it?

Verified in packages/core/app.plugin.js that both plugin names resolve to the same module, so reading props from a bare-name registration is correct. node --check on the modified cli.js. The change is additive — the existing @sentry/react-native/expo path is evaluated first and behaves identically, and exact-string matching avoids false positives on unrelated packages (e.g. @sentry/react-native-navigation).

📝 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.
  • All tests passing.
  • No breaking changes.

🔮 Next steps

…ct-native'

The Expo source map uploader only matched the '@sentry/react-native/expo'
plugin name, so projects that register the plugin under the equally-valid
bare name '@sentry/react-native' failed with "Could not fetch from expo
config" and exited 1. Both names resolve to the same plugin module via
app.plugin.js, so match either.

Fixes #6538

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 30, 2026

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(expo): resolve plugin config when registered as bare '@sentry/react-native' by antonis in #6543
  • fix(ios): make the RNSentry SPEC CHECKSUM in Podfile.lock machine-independent by alwx in #6534
  • chore(deps): update Android SDK to v8.51.0 by github-actions in #6539
  • chore(deps): update Sentry Android Gradle Plugin to v6.17.0 by github-actions in #6544
  • feat(core): Extend TurboModule instrumentation to legacy NativeModules by alwx in #6504
  • feat(ios): Introduce enableMetricKit option by alwx in #6540

🤖 This preview updates automatically when you update the PR.

@antonis
antonis marked this pull request as ready for review July 30, 2026 14:33
@antonis antonis added the ready-to-merge Triggers the full CI test suite label Jul 31, 2026
@antonis
antonis enabled auto-merge (squash) July 31, 2026 09:22
@antonis
antonis merged commit d387874 into main Jul 31, 2026
86 of 110 checks passed
@antonis
antonis deleted the fix/expo-upload-sourcemaps-bare-plugin-name branch July 31, 2026 09:26
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.

sentry-expo-upload-sourcemaps fails when plugin is registered as '@sentry/react-native' instead of '@sentry/react-native/expo'

2 participants