mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
090196f330
Summary: By the time that we call [ReactContext.assertOnNativeModulesQueueThread()](https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java?commit=747a25280435d276fb975ccfe36fd5e60254c4e4&lines=355%2C359), ReactContext.mNativeModulesMessageQueueThread must be non-null. This implies that two things must have happened: 1. We initialized the ReactContext 2. After initialization, ReactContext.mNativeModulesMessageQueueThread must be non-null. According to T85807990, ReactContext.mNativeModulesMessageQueueThread is null. Since ReactContext doesn't ever write to ReactContext.mNativeModulesMessageQueueThread aside from during initialization, it must mean that we either didn't initialize properly, or we initialized, but set the NativeModules thread to null. This diff throws IllegalStateExceptions inside ReactContext initialization, which should help narrow down the crash in T85807990. Changelog: [Internal] Reviewed By: PeteTheHeat Differential Revision: D27729355 fbshipit-source-id: e39030b7db8862ae76fb644efaafb382a79b8ad0
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.