Closed juicemia closed 1 year ago
I originally opened this issue with Sentry and they recommended I ask for help here.
I'm also having issues with sentry-expo since SDK 46. Errors are not delivered to sentry. This happens also for standalone app builds.
What is weird is that downgrading expo-sentry to 4.2.0 is working for me and also some other devs reported this here: https://github.com/expo/sentry-expo/issues/243
Update: I just investigated my issue further and I was missing the @sentry/react-native dependency in my package.json. After adding that and creating a new build sentry receives events again. So anyone using the downgrade workaround should probably check that. Seems like the need for this dependency only became crucial with the latest sdk update. Still does not help with the unavailable SDK in expo go but thought I add my findings here anyway for anyone that searches for it.
@aeife I have the @sentry/react-native
dependency in my package.json
, but I'm going to try downgrading like you suggested. I'll report back here with how it goes.
@aeife downgrading like you suggested didn't fix it. All it did was make the app endlessly error with logs like this:
ERROR Sentry Logger [error]: Error while triggering instrumentation handler.
Type: xhr
Name: _xhrBreadcrumb
Error: [SentryError: Native Client is not available, can't start on native.]
ERROR Sentry Logger [error]: Error while triggering instrumentation handler.
Type: xhr
Name: _xhrBreadcrumb
Error: [SentryError: Native Client is not available, can't start on native.]
ERROR Sentry Logger [error]: Error while triggering instrumentation handler.
Type: xhr
Name: _xhrBreadcrumb
Error: [SentryError: Native Client is not available, can't start on native.]
ERROR Sentry Logger [error]: Error while triggering instrumentation handler.
Type: xhr
Name: _xhrBreadcrumb
Error: [SentryError: Native Client is not available, can't start on native.]
ERROR Sentry Logger [error]: Error while triggering instrumentation handler.
Type: xhr
Name: _xhrBreadcrumb
Error: [SentryError: Native Client is not available, can't start on native.]
The error log Native Client is not available, can't start on native.
means that the Native bridges (Android and iOS) were not able to be inited.
That could be either caching on your end or something with the Expo and Sentry setup, if I install the Sentry RN SDK directly in a fresh app, everything works out normally.
Likely related to https://github.com/expo/sentry-expo/issues/285 as well
If you are using RN >= 0.69, try to check this out: https://docs.sentry.io/platforms/react-native/troubleshooting/#react-native-069-and-higher
I am getting this error too on "expo": "^47.0.0"
and "sentry-expo": "~5.0.0"
.
Whenever I execute
Sentry.Native.captureException(new Error("Sentry test...");
I get the
Sentry Logger [warn]:, Event was skipped as native SDK is not enabled. at node_modules\@sentry\utils\cjs\logger.js:null in consoleSandbox$argument_0 at node_modules\@sentry\utils\cjs\logger.js:null in consoleSandbox at node_modules\@sentry\utils\cjs\logger.js:null in name at node_modules\@sentry\react-native\dist\js\wrapper.js:null in awaiter$argument_3 at node_modules\tslib\tslib.js:null in
at node_modules\promise\setimmediate\core.js:null in tryCallTwo at node_modules\promise\setimmediate\core.js:null in doResolve at node_modules\promise\setimmediate\core.js:null in Promise at node_modules\tslib\tslib.js:null in awaiter at node_modules\@sentry\react-native\dist\js\wrapper.js:null in NATIVE.sendEnvelope at node_modules\@sentry\react-native\dist\js\transports\native.js:null in _buffer.add$argument_0 at node_modules\@sentry\utils\cjs\promisebuffer.js:null in add at node_modules\@sentry\react-native\dist\js\transports\native.js:null in NativeTransport#send at node_modules\@sentry\core\cjs\baseclient.js:null in BaseClient#_sendEnvelope at node_modules\@sentry\core\cjs\baseclient.js:null in BaseClient#sendEvent at node_modules\@sentry\core\cjs\baseclient.js:null in _prepareEvent.then.then$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null inat node_modules\@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules\@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules\@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules\@sentry\utils\cjs\syncpromise.js:null in at node_modules\@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules\@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules\@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules\@sentry\utils\cjs\syncpromise.js:null in at node_modules\@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules\@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules\@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules\@sentry\utils\cjs\syncpromise.js:null in at node_modules\@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules\@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules\@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules\@sentry\utils\cjs\syncpromise.js:null in at node_modules\@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules\@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules\@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules\@sentry\utils\cjs\syncpromise.js:null in at node_modules\@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules\@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules\@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules\@sentry\utils\cjs\syncpromise.js:null in at node_modules\@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules\@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules\@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules\@sentry\utils\cjs\syncpromise.js:null in at node_modules\@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules\@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules\@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules\@sentry\utils\cjs\syncpromise.js:null in at node_modules\@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules\@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules\@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules\@sentry\utils\cjs\syncpromise.js:null in at node_modules\@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules\@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules\@sentry\utils\cjs\syncpromise.js:null in _setResult
- ... 2 more stack frames from framework internals
I am on android and I applied the workaround linked above in the comments...
Any way to make it work again?
I posted a solution that works for me here: https://github.com/expo/sentry-expo/issues/285#issuecomment-1318421217
Above reply did not work, but this does: https://github.com/expo/sentry-expo/issues/285#issuecomment-1309222639
I also had some typescript issues until I removed @sentry/react-native from my package.json and used it as a transient dependency through sentry-expo@4.2.0
I am getting this error too on
"expo": "^47.0.0"
and"sentry-expo": "~5.0.0"
.Whenever I execute
Sentry.Native.captureException(new Error("Sentry test...");
I get the
Sentry Logger [warn]:, Event was skipped as native SDK is not enabled. at node_modules@sentry\utils\cjs\logger.js:null in consoleSandbox$argument_0 at node_modules@sentry\utils\cjs\logger.js:null in consoleSandbox at node_modules@sentry\utils\cjs\logger.js:null in name at node_modules@sentry\react-native\dist\js\wrapper.js:null in awaiter$argument_3 at node_modules\tslib\tslib.js:null in at node_modules\promise\setimmediate\core.js:null in tryCallTwo at node_modules\promise\setimmediate\core.js:null in doResolve at node_modules\promise\setimmediate\core.js:null in Promise at node_modules\tslib\tslib.js:null in awaiter at node_modules@sentry\react-native\dist\js\wrapper.js:null in NATIVE.sendEnvelope at node_modules@sentry\react-native\dist\js\transports\native.js:null in _buffer.add$argument_0 at node_modules@sentry\utils\cjs\promisebuffer.js:null in add at node_modules@sentry\react-native\dist\js\transports\native.js:null in NativeTransport#send at node_modules@sentry\core\cjs\baseclient.js:null in BaseClient#_sendEnvelope at node_modules@sentry\core\cjs\baseclient.js:null in BaseClient#sendEvent at node_modules@sentry\core\cjs\baseclient.js:null in _prepareEvent.then.then$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in at node_modules@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules@sentry\utils\cjs\syncpromise.js:null in at node_modules@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules@sentry\utils\cjs\syncpromise.js:null in at node_modules@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules@sentry\utils\cjs\syncpromise.js:null in at node_modules@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules@sentry\utils\cjs\syncpromise.js:null in at node_modules@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules@sentry\utils\cjs\syncpromise.js:null in at node_modules@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules@sentry\utils\cjs\syncpromise.js:null in at node_modules@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules@sentry\utils\cjs\syncpromise.js:null in at node_modules@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules@sentry\utils\cjs\syncpromise.js:null in at node_modules@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules@sentry\utils\cjs\syncpromise.js:null in _setResult at node_modules@sentry\utils\cjs\syncpromise.js:null in _resolve at node_modules@sentry\utils\cjs\syncpromise.js:null in at node_modules@sentry\utils\cjs\syncpromise.js:null in cachedHandlers.forEach$argument_0 at node_modules@sentry\utils\cjs\syncpromise.js:null in _executeHandlers at node_modules@sentry\utils\cjs\syncpromise.js:null in _setResult
- ... 2 more stack frames from framework internals
I am on android and I applied the workaround linked above in the comments...
Any way to make it work again?
Downgrade sentry-expo to "~4.2.0" and expo to "~46.0.17". It works fine for me
Did you find any solution for this?
Any update here? I mean without downgrade the versions
I found the docs said
Native crash reporting is not available in Expo Go, it is only available in standalone builds or development builds.
So I had to actually do an EAS build with my test error, download the binary, drop it into the simulator, and then trigger the error. Then it actually showed up in Sentry.
I think the enableInExpoDevelopment
is kind of misleading since it doesn't work in Expo Go.
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.
Leaving my context here jic anyone else is facing the same issue. I'm running managed Expo 47 (no bare/eject; just vanilla Expo). I had the same issue many have mentioned that events weren't reaching my Sentry (SaaS; not self-hosted) instance.
Dependencies
expo=47.0.14
sentry-expo=4.2.0
@sentry/react-native=3.1.1
Caveats:
Upgrading sentry-expo and @sentry/react-native worked after building.
expo=47.0.14
sentry-expo=6.0.0
@sentry/react-native=4.9.0
This requires installing @sentry/react-native as a dependency and building again.
Summary
Followed the documentation here after direct usage of
@sentry/react-native
stopped working in my Expo app.I stripped everything and followed that documentation to get
sentry-expo
installed and working. I'm just trying to test if an event gets to Sentry correctly which is why I have it enabled in development.When I load the app with the above configuration I see the following in the logs:
When I set
enableNative: false
I see the following logs (ignoreTESTING SENTRY FROM APP
that's just my test error):In either case, I don't see the errors actually making it to Sentry.
I tested the DSN itself using
sentry-cli
and messages show up in that case, so that's ruled out.Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!managed
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
expo@46.0.16
Environment
Reproducible demo or steps to reproduce from a blank project
npx create-expo-app sentry-expo-test
cd sentry-expo-test
npx expo install expo-application expo-constants expo-device expo-updates @sentry/react-native
npm run start
package.json
:App.js
: