#Command PhaseScriptExecution failed with a nonzero exit code (RC)

23 messages · Page 1 of 1 (latest)

blissful tendon
#

I am using the create tauri-app and get this error:

error: no library targets found in package `tauri-app`
    Error [tauri_cli_node] Failed to run `cargo build`: command ["cargo", "build", "--package", "tauri-app", "--manifest-path", "/Users/ng/development/private/playground/tauri-app/src-tauri/Cargo.toml", "--target", "aarch64-apple-ios", "--features", "tauri/rustls-tls", "--lib", "--no-default-features"] exited with code 101
 ELIFECYCLE  Command failed with exit code 1.
Command PhaseScriptExecution failed with a nonzero exit code

note: Run script build phase 'Build Rust Code' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'tauri-app_iOS' from project 'tauri-app')
** BUILD FAILED **


The following build commands failed:
        PhaseScriptExecution Build\ Rust\ Code /Users/ng/Library/Developer/Xcode/DerivedData/tauri-app-hayycwedtkahadadsykurlzlmtap/Build/Intermediates.noindex/tauri-app.build/debug-iphoneos/tauri-app_iOS.build/Script-4CFF21EFA1FFE4D2AB9D6998.sh (in target 'tauri-app_iOS' from project 'tauri-app')
(1 failure)
    Error command ["xcodebuild"] exited with code 65

Script-4CFF21EFA1FFE4D2AB9D6998.sh:

#!/bin/sh
pnpm tauri ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --framework-search-paths "${FRAMEWORK_SEARCH_PATHS:?}" --header-search-paths "${HEADER_SEARCH_PATHS:?}" --gcc-preprocessor-definitions "${GCC_PREPROCESSOR_DEFINITIONS:-}" --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}
#

tauri.info:

[✔] Environment
    - OS: Mac OS 14.2.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.77.2 (25ef9e3d8 2024-04-09)
    ✔ cargo: 1.77.2 (e52e36006 2024-03-26)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.12.2
    - pnpm: 9.6.0
    - yarn: 1.22.21
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 2.0.0-rc.0
    - tauri-build [RUST]: 2.0.0-rc.0
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - tauri-cli [RUST]: 2.0.0-beta.13 
    - @tauri-apps/api [NPM]: 2.0.0-rc.0
    - @tauri-apps/cli [NPM]: 2.0.0-rc.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite
sullen zephyr
#

seems you tauri-cli is beta, other component is rc, maybe you can updata tauri-cli version to rc and try again.

blissful tendon
#

i found it also odd but still getting the error:

error: no library targets found in package `tauri-app`
    Error [tauri_cli_node] Failed to run `cargo build`: command ["cargo", "build", "--package", "tauri-app", "--manifest-path", "/Users/ng/development/private/playground/tauri-app/src-tauri/Cargo.toml", "--target", "aarch64-apple-ios", "--features", "tauri/rustls-tls", "--lib", "--no-default-features"] exited with code 101
 ELIFECYCLE  Command failed with exit code 1.
Command PhaseScriptExecution failed with a nonzero exit code

ClangStatCache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk /Users/ng/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos17.4-21E210-99a79c02cfa501706f5b564e46d84afe.sdkstatcache
    cd /Users/ng/development/private/playground/tauri-app/src-tauri/gen/apple/tauri-app.xcodeproj
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk -o /Users/ng/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos17.4-21E210-99a79c02cfa501706f5b564e46d84afe.sdkstatcache

** BUILD FAILED **

The following build commands failed:
        PhaseScriptExecution Build\ Rust\ Code /Users/ng/Library/Developer/Xcode/DerivedData/tauri-app-hayycwedtkahadadsykurlzlmtap/Build/Intermediates.noindex/tauri-app.build/debug-iphoneos/tauri-app_iOS.build/Script-4CFF21EFA1FFE4D2AB9D6998.sh (in target 'tauri-app_iOS' from project 'tauri-app')
(1 failure)
    Error command ["xcodebuild"] exited with code 65
#

tauri info (updated tauri-cli [RUST])

[✔] Environment
    - OS: Mac OS 14.2.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.77.2 (25ef9e3d8 2024-04-09)
    ✔ cargo: 1.77.2 (e52e36006 2024-03-26)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.12.2
    - pnpm: 9.6.0
    - yarn: 1.22.21
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 2.0.0-rc.0
    - tauri-build [RUST]: 2.0.0-rc.0
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - tauri-cli [RUST]: 2.0.0-rc.1
    - @tauri-apps/api [NPM]: 2.0.0-rc.0
    - @tauri-apps/cli [NPM]: 2.0.0-rc.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite
sullen zephyr
#

...

#

maybe you r encounter a same error as i

blissful tendon
#

what is your error?

blissful tendon
#

hmm your problem is related to cargo path.
mine can't execute the .sh. maybe the environment where it is executed doesn't work (xcode) ???

#

Command PhaseScriptExecution failed with a nonzero exit code (RC)

sullen zephyr
#

i don't know, still check and find solution

blissful tendon
#

It works now on my end!
I just uninstalled rust completely with rustup self uninstall and reinstallted it curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

Also keep only one package manager like cargo or pnpm. Maybe I accidentally mixed it up and got the issue that the script wouldn't work on xcode.

I used only pnpm this time and had no issues anymore.

Maybe a try worth @sullen zephyr! Good luck 🙂

#

pnpm tauri info:

    - OS: Mac OS 14.2.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.80.0 (051478957 2024-07-21)
    ✔ cargo: 1.80.0 (376290515 2024-07-16)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.12.2
    - pnpm: 8.15.8
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 2.0.0-rc.0
    - tauri-build [RUST]: 2.0.0-rc.0
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-rc.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:5173/
    - framework: Svelte
    - bundler: Vite
sullen zephyr
#

2024-08-07 16:34:53.619 ios-deploy[34209:266278] [ !! ] Unable to locate DeviceSupport directory with suffix 'DeveloperDiskImage.dmg'. This probably means you don't have Xcode installed, you will need to launch the app manually and logging output will not be shown!
Error Failed to deploy app to device: command ["ios-deploy", "--debug", "--id", "00008020-0015094C3EC2002E", "--no-wifi"] exited with code 253

blissful tendon
sullen zephyr
#

yes, Version 15.4 (15F31d)

#

re install xcode ? hahaha

blissful tendon
#

Idk 😅
I had an update for Xcode/ command line tool yesterday and just updated that too 😬

Are you trying to start the app on your physical device or are you using the simulator?

sullen zephyr
#

yes , i'm use physic device

#

"I had an update for Xcode/ command line tool " , in xcode to update it?

sullen zephyr