Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnexpectedNativeTypeException since migrating to @sentry/react-native #740

Closed
3 of 7 tasks
paul-doherty opened this issue Jan 9, 2020 · 2 comments
Closed
3 of 7 tasks

Comments

@paul-doherty
Copy link

paul-doherty commented Jan 9, 2020

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @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 #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

  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
@paul-doherty
Copy link
Author

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

@HazAT
Copy link
Member

HazAT commented Feb 12, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants