Home > Software engineering >  Downloaded executables cannot execute on host - MacOS Monterey 12.4, Silicon Chip
Downloaded executables cannot execute on host - MacOS Monterey 12.4, Silicon Chip

Time:01-10

I was recently trying to run my flutter app. However, when I tried to do so, I got the following error:

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Application launch for 'com.[redacted]' did not return a valid pid 
nor a launch error.
No such process
Command: /usr/bin/arch -arm64e xcrun simctl launch AA375D1F-5CFC-4D1B-B367- 
4CB98488D7DA 
com.[redacted] --enable-dart-profiling
--enable-checked-mode --verify-entry-points --observatory-port=0
Error launching application on iPhone 13.

To try and fix this, I ran flutter doctor, where I got the following errors:

      See https://github.com/flutter/flutter/issues/6207 for more information

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Community Edition (version 2022.1.2)
[✓] VS Code (version 1.67.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

I have already tried uninstalling and reinstalling flutter, and I am still getting the same error. I am genuinely confused as to why this happening, and I would really appreciate some help. Thank you in advance!

CodePudding user response:

After running this command: $ sudo softwareupdate --install-rosetta --agree-to-license, the problem appears to have been fixed. I ran flutter doctor, and this was the output:

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Community Edition (version 2022.1.2)
[✓] VS Code (version 1.67.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

(Ignore the android issues- I intentionally did not install them).

CodePudding user response:

I was getting the same error on my mac M1. looks like,rosetta was not installed properly. Install rosetta using.

sudo softwareupdate --install-rosetta --agree-to-license
  • Related