diff --git a/desktop/flipper-server/src/devices/ios/iOSDeviceManager.tsx b/desktop/flipper-server/src/devices/ios/iOSDeviceManager.tsx index 9744f887af4..45f53277111 100644 --- a/desktop/flipper-server/src/devices/ios/iOSDeviceManager.tsx +++ b/desktop/flipper-server/src/devices/ios/iOSDeviceManager.tsx @@ -198,7 +198,12 @@ export class IOSDeviceManager { const bridge = await this.getBridge(); await bridge.launchSimulator(udid); } catch (e) { - console.warn('Failed to launch simulator:', e); + if (e.killed === true && e.signal === 'SIGTERM') { + throw new Error('Failed to launch simulator: command timeout'); + } else { + console.warn('Failed to launch simulator:', e); + throw e; + } } } diff --git a/desktop/flipper-ui/src/sandy-chrome/appinspect/LaunchEmulator.tsx b/desktop/flipper-ui/src/sandy-chrome/appinspect/LaunchEmulator.tsx index 72a4f787e1b..94e79da7a0f 100644 --- a/desktop/flipper-ui/src/sandy-chrome/appinspect/LaunchEmulator.tsx +++ b/desktop/flipper-ui/src/sandy-chrome/appinspect/LaunchEmulator.tsx @@ -286,8 +286,24 @@ export const LaunchEmulatorDialog = withTrackingScope( ); onClose(); } catch (e) { - console.warn('Failed to start simulator: ', e); - message.error(`Failed to start simulator: ${e}`); + if ( + // definitely a server error + typeof e === 'string' && + e.includes('command timeout') + ) { + message.warn( + 'Launching simulator may take up to 2 minutes for the first time. Please wait.', + // seconds + 20, + ); + } else { + console.warn('Failed to start simulator: ', e); + message.error( + `Failed to start simulator: ${e}`, + // seconds + 20, + ); + } } finally { setPendingEmulators( produce((draft) => {