diff --git a/packages/react-native/ReactCxxPlatform/react/devsupport/inspector/InspectorPackagerConnectionDelegate.cpp b/packages/react-native/ReactCxxPlatform/react/devsupport/inspector/InspectorPackagerConnectionDelegate.cpp index 2b19c3a659615e..86dbca6a262aad 100644 --- a/packages/react-native/ReactCxxPlatform/react/devsupport/inspector/InspectorPackagerConnectionDelegate.cpp +++ b/packages/react-native/ReactCxxPlatform/react/devsupport/inspector/InspectorPackagerConnectionDelegate.cpp @@ -60,7 +60,8 @@ InspectorPackagerConnectionDelegate::WebSocket::WebSocket( if (success) { strongDelegate->didOpen(); } else { - strongDelegate->didFailWithError(std::nullopt, message); + // Assume the server is not running, and suppress an error log + strongDelegate->didFailWithError(ECONNREFUSED, message); } } }); diff --git a/private/react-native-fantom/runner/utils.js b/private/react-native-fantom/runner/utils.js index 495b2e5ecacc9a..bcc51cb56534cf 100644 --- a/private/react-native-fantom/runner/utils.js +++ b/private/react-native-fantom/runner/utils.js @@ -54,8 +54,12 @@ export function getHermesCompilerTarget(variant: HermesVariant): string { export function getBuckModesForPlatform( enableRelease: boolean = false, ): $ReadOnlyArray { - let mode = enableRelease ? 'opt' : 'dev'; + let modes = ['@//xplat/mode/react-native/granite']; + if (enableRelease) { + modes.push('@//xplat/mode/hermes/opt'); + } + let mode = enableRelease ? 'opt' : 'dev'; if (enableRelease) { if (EnvironmentOptions.enableASAN || EnvironmentOptions.enableTSAN) { printConsoleLog({ @@ -101,7 +105,8 @@ export function getBuckModesForPlatform( throw new Error(`Unsupported platform: ${os.platform()}`); } - return ['@//xplat/mode/react-native/granite', osPlatform]; + modes.push(osPlatform); + return modes; } // TODO: T240293839 Remove when we get rid of RN_USE_ANIMATION_BACKEND preprocessor flag