Skip to content

Commit 6d21522

Browse files
Lulu Wucortinico
authored andcommitted
Fix RNTester not showing Redbox when Metro is not connected (#41191)
Summary: Pull Request resolved: #41191 In dev mode, display a Redbox for the first fatal error during RN initialization. So if the first fatal error is Metro not connected that will be displayed via Redbox. Changelog: [Android][Changed] - Fix RNTester not showing Redbox when Metro is not connected Reviewed By: cortinico Differential Revision: D50600631 fbshipit-source-id: f269091c1745a76b49e72d9051c4836a39fded12
1 parent 506ea9e commit 6d21522

File tree

1 file changed

+3
-0
lines changed
  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime

1 file changed

+3
-0
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,9 @@ DefaultHardwareBackBtnHandler getDefaultBackButtonHandler() {
638638
final String method = "handleHostException(message = \"" + e.getMessage() + "\")";
639639
log(method);
640640

641+
if (DEV) {
642+
mDevSupportManager.handleException(e);
643+
}
641644
destroy(method, e);
642645
mReactHostDelegate.handleInstanceException(e);
643646
}

0 commit comments

Comments
 (0)