Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] tauri ios build failed: sandbox-exec: sandbox_apply: Operation not permitted #10363

Closed
winjeysong opened this issue Jul 23, 2024 · 5 comments
Labels
platform: iOS status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@winjeysong
Copy link

winjeysong commented Jul 23, 2024

Describe the bug

tauri ios build failed with error message below:

error: failed to run custom build command for `tauri v2.0.0-beta.24`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/Users/xxx/Documents/GitHub/xxx/src-tauri/target/release/build/tauri-b7cb6b07eaaf6d1d/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-check-cfg=cfg(custom_protocol)
  cargo:rustc-cfg=custom_protocol
  cargo:rustc-check-cfg=cfg(dev)
  cargo:dev=false
  cargo:rustc-check-cfg=cfg(desktop)
  cargo:rustc-check-cfg=cfg(mobile)
  cargo:rustc-cfg=mobile
  cargo:rustc-link-search=native=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos
  cargo:rustc-link-search=native=/usr/lib/swift
  cargo:rustc-link-lib=clang_rt.ios
  cargo:rustc-link-search=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/lib/darwin

  --- stderr
  error: 'ios-api': Invalid manifest (compiled with: ["/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/var/folders/s0/rk_dbzpn1hld677qdxd588dc0000gn/T/TemporaryDirectory.EeXcKi/vfs.yaml", "-L", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-target", "arm64-apple-macosx13.0", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk", "-F", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks", "-I", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-L", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-swift-version", "5", "-I", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk", "-package-description-version", "5.3.0", "/Users/winjeysong/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-beta.24/mobile/ios-api/Package.swift", "-Xfrontend", "-disable-implicit-concurrency-module-import", "-Xfrontend", "-disable-implicit-string-processing-module-import", "-o", "/var/folders/s0/rk_dbzpn1hld677qdxd588dc0000gn/T/TemporaryDirectory.m1OlgD/ios-api-manifest"])
  sandbox-exec: sandbox_apply: Operation not permitted
  thread 'main' panicked at /Users/xxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swift-rs-1.0.6/src-rs/build.rs:276:17:
  Failed to compile swift package Tauri
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:647:5
     1: core::panicking::panic_fmt
               at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panicking.rs:72:14
     2: swift_rs::build::SwiftLinker::link
     3: tauri_utils::build::link_swift_library
     4: tauri_utils::build::link_apple_library
     5: build_script_build::main
     6: core::ops::function::FnOnce::call_once

Reproduction

No response

Expected behavior

tauri ios build runs successfully.

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.5.0 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.14.0
    - pnpm: 8.14.0
    - yarn: 1.22.22
    - npm: 10.7.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.24
    - tauri-build [RUST]: 2.0.0-beta.19
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - tauri-cli [RUST]: 2.0.0-beta.22
    - @tauri-apps/api [NPM]: 2.0.0-beta.15
    - @tauri-apps/cli [NPM]: 2.0.0-beta.22

[-] App
    - build-type: bundle
    - CSP: default-src 'self'; img-src 'self' asset: https://asset.localhost tauri: blob: data:; connect-src ipc: http://ipc.localhost; script-src 'self' 'unsafe-eval'
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: SolidJS
    - bundler: Vite

Stack trace

No response

Additional context

No response

@winjeysong winjeysong added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jul 23, 2024
@FabianLars
Copy link
Member

In the past this error was project dependent, see https://discord.com/channels/616186924390023171/1159773023918882897 for example. Can you create a minimal reproduction example maybe?

@winjeysong
Copy link
Author

winjeysong commented Jul 23, 2024

In the past this error was project dependent, see https://discord.com/channels/616186924390023171/1159773023918882897 for example. Can you create a minimal reproduction example maybe?

I have read this issue before, but it's not relevant. Because my dependencies are up to date.

I can create an example later

@FabianLars
Copy link
Member

I have read this issue before, but it's not relevant. Because my dependencies are up to date.

It is relevant because the Tauri version(s) never mattered there. (I'm talking about the lower half of the thread where the Invalid Manifest error was first posted) Anyway, it was just an example to second my statement, it was not meant to show a solution or something.

I can create an example later

Thank you!

@winjeysong
Copy link
Author

I have read this issue before, but it's not relevant. Because my dependencies are up to date.

It is relevant because the Tauri version(s) never mattered there. (I'm talking about the lower half of the thread where the Invalid Manifest error was first posted) Anyway, it was just an example to second my statement, it was not meant to show a solution or something.

I can create an example later

Thank you!

Thank you for your rapid reply! I'll check for system dependencies asap

@winjeysong
Copy link
Author

winjeysong commented Jul 23, 2024

Set User Script Sandboxing to No , and tauri ios build runs successfully.
I don't know why this option is defaut to Yes in my XCode...

SCR-20240723-ssq

@winjeysong winjeysong changed the title [bug] tauri ios build failed [bug] tauri ios build failed: sandbox-exec: sandbox_apply: Operation not permitted Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: iOS status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants