question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[React Native] "Bugsnag.notify" doesn't work with Android JS

See original GitHub issue

Describe the bug

An error occurred when using “Bugsnag.notify” in “Android JS”. The error was resolved in “bugsnag-android v5.6.2”. But in “@bugsnag/react-native” I still get the error.

Steps to reproduce

  1. Use Bugsnag.notify()
  2. See error log

Environment

Error messages:
Failed to call dispatch on bugsnag-plugin-react-native, continuing
java.lang.NoSuchMethodError: No direct method <init>(Ljava/util/List;Lcom/bugsnag/android/Logger;)V in class Lcom/bugsnag/android/Stacktrace; or its super classes (declaration of 'com.bugsnag.android.Stacktrace' ...)
		at com.bugsnag.android.ErrorDeserializer.deserialize(ErrorDeserializer.java:30)
		at com.bugsnag.android.EventDeserializer.deserialize(EventDeserializer.kt:49)
		at com.bugsnag.android.BugsnagReactNativePlugin.dispatch(BugsnagReactNativePlugin.kt:140)
		at com.bugsnag.android.BugsnagReactNative.dispatch(BugsnagReactNative.kt:167)
		...

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jiggagcommented, Mar 4, 2021

Sent to support@bugsnag.com. @johnkiely1

Thanks.

0reactions
mattdyoungcommented, Mar 5, 2021

We’ve now released @bugsnag/react-native https://github.com/bugsnag/bugsnag-js/releases/tag/v7.8.2 which includes bugsnag-android v5.7.1.

We wouldn’t recommend changing the underlying bugsnag-android dependency when using @bugsnag/react-native as we only test the version combinations we officially release in the bugsnag-js repository so there could be unexpected behaviour.

If you use the latest @bugsnag/react-native as is without overriding the bugsnag-android dependency you’ll avoid this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reporting handled errors - React Native - Bugsnag docs
If you would like to send handled errors to Bugsnag, you can pass an error to the notify method in any of the...
Read more >
React Native integration guide - Bugsnag docs
Add Bugsnag to your React Native apps to report JavaScript and native errors. ... Sometimes it is useful to manually notify Bugsnag of...
Read more >
Configuration options - React Native - Bugsnag docs
By default, we will automatically notify Bugsnag of any uncaught errors that we capture. Use this flag to disable all automatic detection. Android: ......
Read more >
Legacy React Native integration guide - Bugsnag docs
The Bugsnag React Native library depends on the Bugsnag Cocoa or Android libraries, which have notify functions for reporting handled exceptions from native ......
Read more >
Bugsnag docs › Platforms › React Native
Add Bugsnag to your React Native projects to automatically capture and report exceptions on production. ... Add Bugsnag to your Expo apps to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found