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

java.lang.ClassCastException when calling captureBreadcrumb on Android #667

Closed
2 of 5 tasks
petermoustrides opened this issue Sep 22, 2019 · 2 comments · Fixed by #749
Closed
2 of 5 tasks

java.lang.ClassCastException when calling captureBreadcrumb on Android #667

petermoustrides opened this issue Sep 22, 2019 · 2 comments · Fixed by #749

Comments

@petermoustrides
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • [ x] Android

SDK:

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

react-native version: 0..59.9

Init Code:

Sentry.init({
  dsn: 'https://[email protected]/...'
});

I have the following issue:

On some Android devices, our app is crashing with the following crash report:
java.lang.ClassCastException:
at com.facebook.react.bridge.ReadableNativeMap.checkInstance (ReadableNativeMap.java:150)
at com.facebook.react.bridge.ReadableNativeMap.getNullableValue (ReadableNativeMap.java:142)
at com.facebook.react.bridge.ReadableNativeMap.getMap (ReadableNativeMap.java:212)
at com.facebook.react.bridge.ReadableNativeMap.getMap (ReadableNativeMap.java:24)
at io.sentry.RNSentryModule.captureBreadcrumb (RNSentryModule.java:198)
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:158)
at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
at android.os.Handler.handleCallback (Handler.java:790)
at android.os.Handler.dispatchMessage (Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:29)
at android.os.Looper.loop (Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:232)
at java.lang.Thread.run (Thread.java:764)

Steps to reproduce:

  • call captureBreadcrumb

Actual result:

  • Error thrown, app cashes

Expected result:

  • Should record breadcrumb
@riquier
Copy link

riquier commented Sep 22, 2019

I am also getting the same issue when using Sentry on Android

@HazAT
Copy link
Member

HazAT commented Sep 25, 2019

Something is mixed up here if you are using @sentry/react-native there is no function called captureBreadcrumb, the new API is Sentry.addBreacrumb.

Can you post the actual code here?

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

Successfully merging a pull request may close this issue.

3 participants