-
Notifications
You must be signed in to change notification settings - Fork 329
Description
Description
When stopping a Flutter app running on iOS simulator from Android Studio, I get a ProcessException error, even though the app stops successfully.
Steps to Reproduce
- Open project in Android Studio
- Run Flutter app on iOS simulator
- Click Stop button in Android Studio
- Error appears in console
Expected Behavior
App should stop without showing error message
Actual Behavior
App stops successfully but shows ProcessException error:
Error: Unable to terminate uz.nextbrain.fitcityapp on 24DDCCF7-6C7D-498B-94FC-8142468288EE:
ProcessException: Process exited abnormally with exit code -2:
Command: /usr/bin/arch -arm64e xcrun simctl terminate 24DDCCF7-6C7D-498B-94FC-8142468288EE uz.nextbrain.fitcityapp
Environment
Flutter version: Flutter 3.38.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 66dd93f9a2 (6 days ago) • 2025-12-03 14:56:10 -0800
Engine • hash 360877569ab6632a564a0a8a815b2e0fe5ae294a (revision a5cb96369e) (5 days ago) • 2025-12-03 20:56:06.000Z
Tools • Dart 3.10.3 • DevTools 2.51.1
Android Studio version: Android Studio Otter 2 Feature Drop | 2025.2.2
macOS version: macOS Tahoe 26.1
Xcode version: Xcode 26.1.1
Run: flutter doctor -v and paste output here:
[✓] Flutter (Channel stable, 3.38.4, on macOS 26.1 25B78 darwin-arm64, locale en-UZ) [469ms]
• Flutter version 3.38.4 on channel stable at /Users/xusanboytursunov/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 66dd93f9a2 (6 days ago), 2025-12-03 14:56:10 -0800
• Engine revision a5cb96369e
• Dart version 3.10.3
• DevTools version 2.51.1
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets,
omit-legacy-version-file, enable-lldb-debugging
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0-rc1) [2.5s]
• Android SDK at /Users/xusanboytursunov/Library/Android/sdk
• Emulator version 36.3.10.0 (build_id 14472402) (CL:N/A)
• Platform android-36.1, build-tools 36.1.0-rc1
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.8+-14196175-b1038.72)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 26.1.1) [995ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17B100
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [5ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (5 available) [9.3s]
• iPhone D (wireless) (mobile) • 00008130-001C61D02138001C • ios • iOS 26.1 23B85
• I.S.K.A.N.D.A.R (wireless) (mobile) • 00008030-000A68513AC3402E • ios • iOS 26.1 23B85
• iPhone 17 Pro Max (mobile) • 24DDCCF7-6C7D-498B-94FC-8142468288EE • ios • com.apple.CoreSimulator.SimRuntime.iOS-26-1 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 26.1 25B78 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 143.0.7499.41
! Error: Browsing on the local area network for iPhoneB 16. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for iPhoneB. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources [496ms]
• All expected network resources are available.
• No issues found!
Additional Context
- This happens consistently when stopping the app
- App functions normally otherwise
- The error appears to be related to the terminate command trying to stop an already stopped process
- Issue occurs on iOS simulator only
Possible Cause
It seems like Android Studio/Flutter tools might be trying to terminate the app twice, or the app is already stopped when the terminate command runs.