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

[Android] Reset ReactInstanceManager state on failure to allow retries #32901

Closed
wants to merge 1 commit into from

Conversation

samkline
Copy link
Contributor

Summary

This fixes #32898 by reseting ReactInstanceManager state when createReactContext throws. By resetting the state, we allow future attempts at creating the React context.

Changelog

[Android] [Fixed] - Fixed empty screen after retrying a BundleDownloader failure in dev mode

Test Plan

Go through the steps to reproduce listed in #32898 and see that the React Native application starts.

When `ReactInstanceManager.createReactContext` fails, reset state to allow reloads; fixes facebook#32898
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jan 16, 2022
@react-native-bot react-native-bot added Bug Platform: Android Android applications. labels Jan 16, 2022
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 6b42bcc
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,292,513 +83
android hermes armeabi-v7a 7,627,751 +86
android hermes x86 8,764,810 +90
android hermes x86_64 8,701,732 +88
android jsc arm64-v8a 9,679,608 +10
android jsc armeabi-v7a 8,671,521 -5
android jsc x86 9,637,393 -1
android jsc x86_64 10,231,908 -2

Base commit: 6b42bcc
Branch: main

samkline added a commit to samkline/react-native that referenced this pull request Jan 16, 2022
@facebook-github-bot
Copy link
Contributor

@ShikaSD has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @samkline in c8d823b.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: Android Android applications. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android: empty white screen after BundleDownloader failure
4 participants