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

Create observer before registering plugin #874

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

fractalwrench
Copy link
Contributor

Goal

Creates the observer before it is registered, otherwise this triggers an exception as the lateinit var will not have been initialised. This crashed the Bugsnag react native plugin

Tests

Manually verified with a local artefact on the v7-react-native example app

Copy link
Contributor

@bengourley bengourley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we prevent this kind of thing regressing?

@fractalwrench
Copy link
Contributor Author

How can we prevent this kind of thing regressing?

I think packaging AARs in the node_modules should be helpful at preventing this kind of thing, as I assume this was tested with a local AAR artefact on the React Native example app but Gradle incorrectly used a stale version of bugsnag-android. This will be addressed in the following PR: bugsnag/bugsnag-js#815

@fractalwrench fractalwrench merged commit d742a76 into v5-react-native Apr 23, 2020
@fractalwrench fractalwrench deleted the v5rn-fix-rn-plugin branch April 23, 2020 15:28
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 this pull request may close these issues.

2 participants