DenisovAV / flutter_tv

232 stars 40 forks source link

Can't launch on TV simulator: Command PhaseScriptExecution failed with a nonzero exit code #16

Closed JulienDev closed 9 months ago

JulienDev commented 1 year ago

Hello Sasha, I've been following your Apple TV Flutter journey since the beginning and you are doing an awesome job 👏🏻 Today I wanted to give it a try, so I followed both Medium and Readme instructions but unfortunately, I'm not able to launch your demo on TV simulator. When I click on run in Xcode I get the following error message without more details: Command PhaseScriptExecution failed with a nonzero exit code

When I look at the output of sh scripts/run_apple_tv.sh I see something that could explain the problem but I'm not sure if it's the root cause or how to fix it: PathNotFoundException: Cannot open file, path = '/Users/juliendev/Downloads/flutter_tv/build/ios/Debug-iphonesimulator/App.framework/flutter_assets/kernel_blob.bin' (OS Error: No such file or directory, errno = 2)

Thanks for your help 🙏🏻

** BUILD FAILED **

Xcode's output: ↳ Writing result bundle at path: /var/folders/j7/31f7nmmj4l58hf9vk4jg5v4r0000gn/T/flutter_tools.Z13Ltz/flutter_ios_build_temp_diraIS3Ps/temporary_xcresult_bundle

warning: TARGETED_DEVICE_FAMILY value (3) does not contain any device family values compatible with the iOS platform. Please add one or more of the following values to the TARGETED_DEVICE_FAMILY build setting to indicate the device families supported by this target: '1' (indicating 'iPhone'), '2' (indicating 'iPad'). (in target 'path_provider_ios' from project 'Pods')
warning: TARGETED_DEVICE_FAMILY value (3) does not contain any device family values compatible with the iOS platform. Please add one or more of the following values to the TARGETED_DEVICE_FAMILY build setting to indicate the device families supported by this target: '1' (indicating 'iPhone'), '2' (indicating 'iPad'). (in target 'custom_shared_preferences_ios' from project 'Pods')
warning: TARGETED_DEVICE_FAMILY value (3) does not contain any device family values compatible with the iOS platform. Please add one or more of the following values to the TARGETED_DEVICE_FAMILY build setting to indicate the device families supported by this target: '1' (indicating 'iPhone'), '2' (indicating 'iPad'). (in target 'custom_native_video_player_ios' from project 'Pods')
/Users/juliendev/.pub-cache/hosted/pub.dev/path_provider_ios-2.0.11/ios/Classes/messages.g.m:49:58: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
NSObject<FlutterMessageCodec> *FLTPathProviderApiGetCodec() {
                                                         ^
                                                          void
1 warning generated.
/Users/juliendev/.pub-cache/hosted/pub.dev/path_provider_ios-2.0.11/ios/Classes/messages.g.m:49:58: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
NSObject<FlutterMessageCodec> *FLTPathProviderApiGetCodec() {
                                                         ^
                                                          void
1 warning generated.
warning: TARGETED_DEVICE_FAMILY value (3) does not contain any device family values compatible with the iOS platform. Please add one or more of the following values to the TARGETED_DEVICE_FAMILY build setting to indicate the device families supported by this target: '1' (indicating 'iPhone'), '2' (indicating 'iPad'). (in target 'Pods-Runner' from project 'Pods')
Compling /Flutter/App.Framework
 └─engine /Users/juliendev/Downloads/flutter-tv
 └─Coping Flutter.framework
 └─Compiling kernal
result d7f62e2e-6ad1-4996-a7f7-25947961abba
Unhandled exception:
**PathNotFoundException: Cannot open file, path = '/Users/juliendev/Downloads/flutter_tv/build/ios/Debug-iphonesimulator/App.framework/flutter_assets/kernel_blob.bin' (OS Error: No such file or directory, errno = 2)
#0      _checkForErrorResponse (dart:io/common.dart:55:9)**
#1      _File.open.<anonymous closure> (dart:io/file_impl.dart:381:7)
<asynchronous suspension>
Command PhaseScriptExecution failed with a nonzero exit code
note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
/Users/juliendev/Downloads/flutter_tv/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.0.99. (in target 'Flutter' from project 'Pods')

Encountered error while building for simulator.

  • sh scripts/switch_target.sh tvos '_ios' already exists or 'tvos'/'ios' does not exist
  • cd ios
  • fvm flutter pub get
DenisovAV commented 1 year ago

Hello! Could you give more details? Which version of Flutter do you use, and which kind of processor do you have? btw, the fastest fix of following error, is delete folder and clone it again Encountered error while building for simulator.

sh scripts/switch_target.sh tvos '_ios' already exists or 'tvos'/'ios' does not exist cd ios fvm flutter pub get