fix(expo): resolve plugin config when registered as bare '@sentry/react-native' - #6543
Open
antonis wants to merge 4 commits into
Open
fix(expo): resolve plugin config when registered as bare '@sentry/react-native'#6543antonis wants to merge 4 commits into
antonis wants to merge 4 commits into
Conversation
…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>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
antonis
marked this pull request as ready for review
July 30, 2026 14:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
The
@sentry/expo-upload-sourcemapsCLI resolves the Sentry org/project/url from the Expo config by scanning thepluginsarray. It only matched the plugin name@sentry/react-native/expo, so projects that register the plugin under the equally-valid bare name@sentry/react-nativewere not found —pluginConfigcame backnulland the script exited 1 with:Both names resolve to the same plugin module (
packages/core/app.plugin.jsre-exports./expo), so the uploader now matches either name.💡 Motivation and Context
The bare
@sentry/react-nativeplugin 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/expoor settingSENTRY_ORG/SENTRY_PROJECTenv vars.Fixes #6538
💚 How did you test it?
Verified in
packages/core/app.plugin.jsthat both plugin names resolve to the same module, so reading props from a bare-name registration is correct.node --checkon the modifiedcli.js. The change is additive — the existing@sentry/react-native/expopath is evaluated first and behaves identically, and exact-string matching avoids false positives on unrelated packages (e.g.@sentry/react-native-navigation).📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps