Command PhaseScriptExecution failed with a nonzero exit code

I developed the application with flutter and then built it in xcode and ran into the following problems:


Project /Users/Justin/Documents/flutter/home-app/ios/.. built and packaged successfully.
The path  does not exist
Command PhaseScriptExecution failed with a nonzero exit code


  • Xcode 11.1 & New Build System (even use Legacy Build System, get the same error)
  • i have already add script in Run Script
"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build
"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed

flutter clean , pod clean/install ... have tried


Can someone help me, thanks!

And the relevant context is:

......

Runner-clmnexenwctdimbdxjxbyzskrybi/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Objects-normal/arm64/Runner.SwiftFileList

export SYMROOT=/Users/Justin/Library/Developer/Xcode/DerivedData/Runner-clmnexenwctdimbdxjxbyzskrybi/Build/Products

export SYSTEM_ADMIN_APPS_DIR=/Applications/Utilities

export SYSTEM_APPS_DIR=/Applications

export SYSTEM_CORE_SERVICES_DIR=/System/Library/CoreServices

export SYSTEM_DEMOS_DIR=/Applications/Extras

export SYSTEM_DEVELOPER_APPS_DIR=/Applications/Xcode.app/Contents/Developer/Applications

export SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin

export SYSTEM_DEVELOPER_DEMOS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Utilities/Built Examples"

export SYSTEM_DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer

export SYSTEM_DEVELOPER_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library"

export SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Graphics Tools"

export SYSTEM_DEVELOPER_JAVA_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Java Tools"

export SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Performance Tools"

export SYSTEM_DEVELOPER_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes"

export SYSTEM_DEVELOPER_TOOLS=/Applications/Xcode.app/Contents/Developer/Tools

export SYSTEM_DEVELOPER_TOOLS_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools"

export SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools"

export SYSTEM_DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr

export SYSTEM_DEVELOPER_UTILITIES_DIR=/Applications/Xcode.app/Contents/Developer/Applications/Utilities

export SYSTEM_DEXT_INSTALL_PATH=/System/Library/DriverExtensions

export SYSTEM_DOCUMENTATION_DIR=/Library/Documentation

export SYSTEM_KEXT_INSTALL_PATH=/System/Library/Extensions

export SYSTEM_LIBRARY_DIR=/System/Library

export TAPI_VERIFY_MODE=ErrorsOnly

export TARGETED_DEVICE_FAMILY=1

export TARGETNAME=Runner

export TARGET_BUILD_DIR=/Users/Justin/Library/Developer/Xcode/DerivedData/Runner-clmnexenwctdimbdxjxbyzskrybi/Build/Products/Debug-iphoneos

export TARGET_DEVICE_IDENTIFIER=ddd7d7d1490d9f020a5deb1a39018c13833e9a41

export TARGET_DEVICE_MODEL=iPhone10,3

export TARGET_DEVICE_OS_VERSION=13.1.3

export TARGET_NAME=Runner

export TARGET_TEMP_DIR=/Users/Justin/Library/Developer/Xcode/DerivedData/Runner-clmnexenwctdimbdxjxbyzskrybi/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build

export TEMP_DIR=/Users/Justin/Library/Developer/Xcode/DerivedData/Runner-clmnexenwctdimbdxjxbyzskrybi/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build

export TEMP_FILES_DIR=/Users/Justin/Library/Developer/Xcode/DerivedData/Runner-clmnexenwctdimbdxjxbyzskrybi/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build

export TEMP_FILE_DIR=/Users/Justin/Library/Developer/Xcode/DerivedData/Runner-clmnexenwctdimbdxjxbyzskrybi/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build

export TEMP_ROOT=/Users/Justin/Library/Developer/Xcode/DerivedData/Runner-clmnexenwctdimbdxjxbyzskrybi/Build/Intermediates.noindex

export TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault

export TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain

export TREAT_MISSING_BASELINES_AS_TEST_FAILURES=NO

export TeamIdentifierPrefix=H6KXY3X96C.

export UID=501

export UNLOCALIZED_RESOURCES_FOLDER_PATH=Runner.app

export UNSTRIPPED_PRODUCT=NO

export USER=Justin

export USER_APPS_DIR=/Users/Justin/Applications

export USER_LIBRARY_DIR=/Users/Justin/Library

export USE_DYNAMIC_NO_PIC=YES

export USE_HEADERMAP=YES

export USE_HEADER_SYMLINKS=NO

export USE_LLVM_TARGET_TRIPLES=YES

export USE_LLVM_TARGET_TRIPLES_FOR_CLANG=YES

export USE_LLVM_TARGET_TRIPLES_FOR_LD=YES

export USE_LLVM_TARGET_TRIPLES_FOR_TAPI=YES

export USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES=YES

export VALIDATE_DEVELOPMENT_ASSET_PATHS=YES_ERROR

export VALIDATE_PRODUCT=NO

export VALIDATE_WORKSPACE=NO

export VALID_ARCHS="arm64 arm64e armv7 armv7s"

export VERBOSE_PBXCP=NO

export VERSIONING_SYSTEM=apple-generic

export VERSIONPLIST_PATH=Runner.app/version.plist

export VERSION_INFO_BUILDER=Justin

export VERSION_INFO_FILE=Runner_vers.c

export VERSION_INFO_STRING=""@(#)PROGRAM:Runner PROJECT:Runner-2""

export WRAPPER_EXTENSION=app

export WRAPPER_NAME=Runner.app

export WRAPPER_SUFFIX=.app

export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES=NO

export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode

export XCODE_PRODUCT_BUILD_VERSION=11A1027

export XCODE_VERSION_ACTUAL=1110

export XCODE_VERSION_MAJOR=1100

export XCODE_VERSION_MINOR=1110

export XPCSERVICES_FOLDER_PATH=Runner.app/XPCServices

export YACC=yacc

export arch=undefined_arch

export variant=normal

/bin/sh -c /Users/Justin/Library/Developer/Xcode/DerivedData/Runner-clmnexenwctdimbdxjxbyzskrybi/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-D0D7FA7E2361E4C100BF0213.sh

I've been running into the same issue for days now. Cannot figure it out.


Did you find a solution

Getting this now also. Scoured the internet for a solution, found none. Anyone here figure it out?

Try running this command on your root directory:

flutter create -i swift .

This will regenerate the iOS project.

I have also had this issue and had no solution - I tried all of the above.help!

Same issue. Apple guys need to be reliable, we spend too much time fixing bugs that aren't ours at all..... 1 week spent doing nothing but searching the internet. aaaaarggggh :-(

Try "flutter upgrade"

If the build works well on Android, it could be a problem with xcode configuration. It's not the code.

Hello Apple people, your help is needed here!!! Solution for this please!!

did anyone manage to find a solution? I have the same error for days

I swear, been trying to fix this archive issue since a while now. Worst support by apple. They be pushing updates just for names sake, why are we even paying their annual subscriptions for. Complete nonsense. I can find so many people having the same issue. If anyone has any answers please respond here- https://developer.apple.com/forums/thread/706425

In My case, I tried many solutions but all in vain

Solution: I just do "Pod deintegrate" and then "pod install" then my project is working perfectly.

I trying many things for me apps works after update flutter with flutter upgrade I hope works for you all also by the way ı update may mac and xcode also :)

Command PhaseScriptExecution failed with a nonzero exit code
 
 
Q