0
0

More than 1 year has passed since last update.

【Flutter】XcodeをアップデートしたらiOSシュミレーターでビルド失敗(domain=NSMachErrorDomain, code=-308)

Last updated at Posted at 2022-04-21

はじめに

タイトル通りですが、XcodeをアップデートしたくてmacOSも同時にMontereyにアップデートさせました。

するとアプデ前まで正常にシュミレーターでビルドできていたのに、👇のようなエラーで失敗するようになりました。。。。

Unable to install /Users/userName/flutter/insta/build/ios/iphonesimulator/Runner.app on DE709473-59D9-47A3-AE88-A4F9A756EE21. This is sometimes caused by a malformed plist file:
ProcessException: Process exited abnormally:
An error was encountered processing the command (domain=NSMachErrorDomain, code=-308):
The operation couldn’t be completed. (Mach error -308 - (ipc/mig) server died)
  Command: xcrun simctl install DE709473-59D9-47A3-AE88-A4F9A756EE21 /Users/userName/flutter/insta/build/ios/iphonesimulator/Runner.app
Error launching application on iPhone SE (3rd generation).

とりあえずflutter doctor

 flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.0, on macOS 12.3.1 21E258 darwin-x64, locale
    ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.66.2)
[✓] Connected device (1 available)
[✓] HTTP Host Availability

• No issues found!

何も問題はなさそう・・・:frowning2:

エラーメッセージに書いてあるコマンドを試してみる

 xcrun simctl install DE709473-59D9-47A3-AE88-A4F9A756EE21
Install an app on a device.
Usage: simctl install <device> <path>

何も変わりませんでした・・・:expressionless:

simctlとは
Xcodeに含まれる標準CLIツールで、主にシミュレータの管理を行うための機能を備えています。
https://qiita.com/tamaki/items/02eb43253193b950b08f

よくわからんがflutter pub getで解決?

flutter pub getした後、なぜかiOSシュミレーターでビルド成功するようになりました!:sweat_smile:

ios/Runner.xcodeprojからXcodeで開いてビルドしてみると、 「firestoreが見つからない!」 と言われていた・・・。なんでやろう・・。
スクリーンショット 2022-04-21 23.41.27.png
なのでとりあえずflutter pub getしてみました。

「domain=NSMachErrorDomain, code=-308」とかで検索しても全然ヒントが出てこなかったので、わかる人いたらコメントお願いします〜!!!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0