tauri-apps/tauri

[bug] Building of the tonic crate (added as a dependency) fails the running cargo tauri dev due to failed to build archive: Operation not permitted

Open

#11,860 opened on Dec 3, 2024

View on GitHub
 (9 comments) (0 reactions) (0 assignees)Rust (106,642 stars) (3,597 forks)batch import
help wantedplatform: macOSstatus: needs triagetype: bug

Description

Describe the bug

Using cargo tauri dev or deno task tauri dev fails to build tonic with:

Compiling tonic v0.12.3
 
error: failed to build archive: Operation not permitted

error: could not compile `tonic` (lib) due to 1 previous error

Building works with cargo build or cargo tauri dev -- --release.

Reproduction

  1. Create a new tauri 2.0 project
  2. Add tonic as a dependency
  3. run cargo tauri dev

Expected behavior

The application builds in debug mode and runs.

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.5.0 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.11.0
    - pnpm: 8.15.6
    - yarn: 1.22.19
    - npm: 10.2.4
    - deno: deno 2.1.2

[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - tauri-cli 🦀: 2.1.0
    - @tauri-apps/api : 2.1.1
    - @tauri-apps/cli : 2.1.0

[-] Plugins
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : 2.0.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: Vue.js
    - bundler: Vite

Stack trace

No response

Additional context

No response

Contributor guide

[bug] Building of the tonic crate (added as a dependency) fails the running cargo tauri dev due to failed to build archive: Operation not permitted · tauri-apps/tauri#11860 | Good First Issue