Environment
What React Native libraries do you use?
Expo Application Services (EAS), Expo (mobile only), Hermes, RN New Architecture
Are you using sentry.io or on-premise?
sentry.io (SaaS)
Are you using any other error monitoring solution alongside Sentry?
No
@sentry/react-native SDK Version
7.11.0
How does your development environment look like?
expo: ~56.0.17
react-native: 0.85.3
New Architecture: enabled (default since SDK 53)
EAS: yes (EAS Update for OTA)
Sentry.init()
Sentry.init({
dsn: '...',
// standard config
});
Steps to Reproduce
- Register the Sentry plugin in
app.config.ts using the bare package name (which the official docs say is valid):
plugins: [
[
"@sentry/react-native",
{
organization: "my-org",
project: "my-project"
}
]
]
- Run
eas update to publish an OTA update (generates dist/ with bundles and source maps).
- Run
npx sentry-expo-upload-sourcemaps dist.
Expected Result
Source maps are uploaded to Sentry successfully. The official docs state:
"Both @sentry/react-native and @sentry/react-native/expo are valid plugin paths. Expo resolves them the same way."
Actual Result
🐕 Fetching from expo config...
Could not fetch '@sentry/react-native' plugin properties from expo config.
Error: Process completed with exit code 1.
Root Cause
In node_modules/@sentry/react-native/scripts/expo-upload-sourcemaps.js, the plugin lookup hardcodes the /expo suffix:
// line 31
return pluginName === '@sentry/react-native/expo';
So when the plugin is registered as '@sentry/react-native' (without /expo), sentryPlugin is undefined, pluginConfig is null, and the script exits with code 1.
Fix: Change the lookup to also match '@sentry/react-native':
return pluginName === '@sentry/react-native/expo' || pluginName === '@sentry/react-native';
Or use a helper like pluginName.startsWith('@sentry/react-native').
Workaround
Either register the plugin as '@sentry/react-native/expo' in app.config.ts, or pass SENTRY_ORG and SENTRY_PROJECT as environment variables (which bypasses the expo config lookup entirely).
Environment
What React Native libraries do you use?
Expo Application Services (EAS), Expo (mobile only), Hermes, RN New Architecture
Are you using sentry.io or on-premise?
sentry.io (SaaS)
Are you using any other error monitoring solution alongside Sentry?
No
@sentry/react-native SDK Version
7.11.0
How does your development environment look like?
Sentry.init()
Steps to Reproduce
app.config.tsusing the bare package name (which the official docs say is valid):eas updateto publish an OTA update (generatesdist/with bundles and source maps).npx sentry-expo-upload-sourcemaps dist.Expected Result
Source maps are uploaded to Sentry successfully. The official docs state:
Actual Result
Root Cause
In
node_modules/@sentry/react-native/scripts/expo-upload-sourcemaps.js, the plugin lookup hardcodes the/exposuffix:So when the plugin is registered as
'@sentry/react-native'(without/expo),sentryPluginisundefined,pluginConfigisnull, and the script exits with code 1.Fix: Change the lookup to also match
'@sentry/react-native':Or use a helper like
pluginName.startsWith('@sentry/react-native').Workaround
Either register the plugin as
'@sentry/react-native/expo'inapp.config.ts, or passSENTRY_ORGandSENTRY_PROJECTas environment variables (which bypasses the expo config lookup entirely).