bugsnag / bugsnag-react-native

Error monitoring and reporting tool for native exceptions and JS errors in React Native apps
https://docs.bugsnag.com/platforms/react-native
MIT License
370 stars 121 forks source link

Use the correct android version in Notifier payload #409

Closed fractalwrench closed 5 years ago

fractalwrench commented 5 years ago

Goal

The version supplied by getSpecificationVersion() always returns 0. We should use the version supplied by Notifier.getInstance() instead, as we know it will always be accurate, and will allow us to determine which version of bugsnag-android is actually being used for each event.

Tests

Confirmed that in a local artefact the message now states:

Initialized Bugsnag React Native 2.23.2/Android 4.19.1

rather than "0.0".

Discussion

We want to update the format of our payload to include the RN/Android version separately. This change requires pipeline alterations so is not addressed in this PR.