From 44e5bc9e2c73235ba5d8bf0f5323181948e74197 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Fri, 23 Feb 2024 10:44:53 -0800 Subject: [PATCH] Do not crash on onJSBundleLoadedFromServer when fast-refreshing on bridgeless mode Summary: RN-Tester is currently instacrashing on fast-refresh (pressing r on Metro) as it ends up on `onJSBundleLoadedFromServer` which throws an exception on Bridgeless mode. I'm fixing it by following the same logic as `onReloadWithJSDebugger`. Changelog: [Android] [Fixed] - Do not crash on onJSBundleLoadedFromServer when fast-refreshing on bridgeless mode Reviewed By: huntie Differential Revision: D54121838 fbshipit-source-id: 82d98ec0c5b2295f5751525368c956574dd7f3a0 --- .../com/facebook/react/runtime/BridgelessDevSupportManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java index 0e424960ddc88e..e71937dd6d7f6f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java @@ -119,7 +119,7 @@ public void onReloadWithJSDebugger(JavaJSExecutor.Factory proxyExecutorFactory) @Override public void onJSBundleLoadedFromServer() { - throw new IllegalStateException("Not implemented for bridgeless mode"); + // Not implemented } @Override