tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] tauri v2.0.0-beta.3 failed to define permissions for path: failed to write file:

Open practicalrs opened this issue 1 year ago • 4 comments

Describe the bug

Hi,

I'm trying to develop on Windows machine. I've got an error while executing cargo tauri dev

   Compiling tauri-utils v2.0.0-beta.2
   Compiling tauri-build v2.0.0-beta.2
   Compiling tauri-plugin v2.0.0-beta.2
   Compiling tauri-codegen v2.0.0-beta.2
   Compiling tauri v2.0.0-beta.3
   Compiling tauri-plugin-shell v2.0.0-beta.0
   Compiling tauri-macros v2.0.0-beta.2
   Compiling prs-ai-cht v0.0.0 (P:\projects\prs-ai-cht\src-tauri)
error: failed to run custom build command for `tauri v2.0.0-beta.3`

Caused by:
  process didn't exit successfully: `P:\projects\prs-ai-cht\target\debug\build\tauri-8dd888a98b32fd98\build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-cfg=dev
  cargo:rustc-cfg=desktop
  cargo:rustc-cfg=ipc_custom_protocol

  --- stderr
  thread 'main' panicked at C:\Users\micha\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-2.0.0-beta.3\build.rs:357:25:
  failed to define permissions for path: failed to write file: Nazwa pliku, nazwa katalogu lub składnia etykiety woluminu jest niepoprawna. (os error 123)
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
    Blocking waiting for file lock on build directory

2024-02-19T20:50:48.115895Z ERROR ❌ error
error from build pipeline

Caused by:
    0: HTML build pipeline failed (1 errors), showing first
    1: error from asset pipeline
    2: bad status returned from cargo artifacts request

Reproduction

cargo create-tauri-app --beta prs-ai-cht
cd .\prs-ai-cht\
cargo tauri dev

Expected behavior

Program compiles just fine

Full tauri info output

cargo tauri info
WARNING: no lock files found, defaulting to npm

[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 121.0.2277.128
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.76.0 (07dca489a 2024-02-04)
    ✔ cargo: 1.76.0 (c84b36747 2024-01-18)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)

[-] Packages
    - tauri [RUST]: 2.0.0-beta.3
    - tauri-build [RUST]: 2.0.0-beta.2
    - wry [RUST]: 0.36.0
    - tao [RUST]: 0.25.0
    - tauri-cli [RUST]: 2.0.0-beta.2
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-beta.2

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/


### Stack trace

_No response_

### Additional context

_No response_

practicalrs avatar Feb 19 '24 21:02 practicalrs

I couldn't reproduce, but note that tauri-plugin-shell is still not updated to tauri v2.0.0-beta.3, try removing that from your Cargo.toml and main.rs then try again

amrbashir avatar Feb 20 '24 00:02 amrbashir

Commenting out tauri-plugin-shell doesn't help.

What may be important is that drive that I use for development is hosted on Linux and exported through Samba.

This configuration worked fine when I tried Tauri v1.5.

I guess I'll have to move to Linux.

practicalrs avatar Feb 20 '24 23:02 practicalrs

Could be related? https://github.com/tauri-apps/tauri/issues/8924

pewsheen avatar Feb 21 '24 02:02 pewsheen

Looks like a different issue, but root cause may be similar.

practicalrs avatar Feb 21 '24 22:02 practicalrs

I don't see this problem with v2.0.0-beta.16 anymore. I've got other problem, but it may be system configuration, webview related.

practicalrs avatar Apr 23 '24 15:04 practicalrs

It looks like trunk update fixed the issue. Everything works. Thanks!

practicalrs avatar Apr 23 '24 16:04 practicalrs