bugsnag-js icon indicating copy to clipboard operation
bugsnag-js copied to clipboard

React Native doesn't support unhandled Promise rejections from Bluebird

Open jeremy303 opened this issue 4 years ago • 1 comments

Describe the bug

If a React Native app uses Bluebird for promises, Bugsnag will not report unhandled promise rejections.

Filing this as a bug rather than a feature request as looking at the changelog suggests Bluebird promises are supported, however support has only been implemented in the browser. Bluebird support was never added to plugin-react-native-unhandled-rejection-- although adding it seems very straightforward.

Using the existing Bugsnag code as an example, I've now implemented my own global unhandled rejection handler within my app and am manually creating Bugsnag events, which should hold us over until proper Bluebird support can be added for React Native. Unfortunately, I don't have time at the moment to ensure that this handles all edge cases and is sufficiently robust to commit back to the repo.

Steps to reproduce

  1. Configure Bluebird as the global Promise implementation and Bugsnag to report unhandled Promise rejections.
  2. Generate an unhandled Promise rejection.
  3. Observe that it is not reported to Bugsnag.

Environment

React Native
bugsnag-js 7.9.5

jeremy303 avatar Jun 24 '21 15:06 jeremy303

Hey @HolySamosa,

As discussed in the email chain, but for the benefit of the wider community, we will be looking to add this support for React Native when we can. I don't have any estimate on timeframe as yet but I will post here with any updates on this.

johnkiely1 avatar Jun 25 '21 09:06 johnkiely1