Sentry-react-native: UnexpectedNativeTypeException since migrating to @sentry/react-native

Created on 9 Jan 2020  路  2Comments  路  Source: getsentry/sentry-react-native

OS:

  • [ ] Windows
  • [ ] MacOS
  • [ ] Linux

_Platform:_

  • [X] iOS
  • [X] Android

SDK:

  • [X] @sentry/react-native
  • [ ] react-native-sentry

react-native version: 0.61.2
@sentry/react-native:1.2.1

Init Code:

Sentry.init({
          enableNative: true,
          enableNativeCrashHandling: true,
          enableNativeNagger: false,
          dsn: Config.RN_SENTRY_ENDPOINT,
          release: Info.getVersion(),
          environment: "production"
        });

I have following issue:

An unhandled promise rejection causes a crash. I can see that this issue was previously reported here https://github.com/getsentry/sentry-react-native/issues/652 but it appears to still occur. I had no issues prior to upgrading from react-native-sentry to @sentry/react-native

I see many many crashes as below.

UnexpectedNativeTypeException
Value for exception cannot be cast from String to ReadableNativeMap
com.facebook.react.bridge.UnexpectedNativeTypeException: at com.facebook.react.bridge.ReadableNativeMap.checkInstance (ReadableNativeMap.java:139) at com.facebook.react.bridge.ReadableNativeMap.getNullableValue (ReadableNativeMap.java:127) at com.facebook.react.bridge.ReadableNativeMap.getMap (ReadableNativeMap.java:171) at com.facebook.react.bridge.ReadableNativeMap.getMap (ReadableNativeMap.java:22) at io.sentry.RNSentryModule.sendEvent (RNSentryModule.java:301) at java.lang.reflect.Method.invoke (Native Method) at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:371) at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:150) at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method) at android.os.Handler.handleCallback (Handler.java:789) at android.os.Handler.dispatchMessage (Handler.java:98) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:26) at android.os.Looper.loop (Looper.java:164) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:225) at java.lang.Thread.run (Thread.java:764)

Steps to reproduce:

  • Unhandled promise rejection

Actual result:

  • App crash

Most helpful comment

Hey I was just wondering if there's any update on this? I am seeing production crashes due to this and so am on the verge of getting rid of Sentry

All 2 comments

Hey I was just wondering if there's any update on this? I am seeing production crashes due to this and so am on the verge of getting rid of Sentry

Please upgrade to 1.3.0 the issue should be fixed there.
Sorry for the inconvenience.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kriptonhaz picture kriptonhaz  路  3Comments

KevinColemanInc picture KevinColemanInc  路  3Comments

jamesone picture jamesone  路  3Comments

brainbicycle picture brainbicycle  路  3Comments

hecontreraso picture hecontreraso  路  3Comments