#Cargo tauri build NSIS OS ERROR 5

7 messages · Page 1 of 1 (latest)

covert fossil
#

Hi everyone!

I'm trying to build my app, but I keep getting this error related to the NSIS bundle on Windows, and I can't figure out how to fix it — even when running as admin. 😩

Has anyone encountered this before or found a solution?

Thanks in advance!

~/Documents/Dev/xxx/xxx-tauri on  main! ⌚ 17:52:28
$ cargo tauri build
Running beforeBuildCommand trunk build
2025-07-28T15:56:11.072235Z INFO Starting trunk 0.21.14
2025-07-28T15:56:11.073610Z INFO starting build
Finished dev profile [unoptimized + debuginfo] target(s) in 0.38s
2025-07-28T15:56:13.344711Z INFO applying new distribution
2025-07-28T15:56:13.350870Z INFO success
Compiling xxx-tauri v1.0.1 (C:\Users\xxx\Documents\Dev\xxx\xxx-tauri\src-tauri)
Finished release profile [optimized] target(s) in 47.52s
Built application at: C:\Users\xxx\Documents\Dev\xxx\xxx-tauri\target\release\xxx-tauri.exe
Warn NSIS directory is missing some files. Recreating it.
Info Verifying NSIS package
Downloading https://github.com/tauri-apps/binary-releases/releases/download/nsis-3/nsis-3.zip
Info validating hash
Info extracting NSIS
Downloading https://github.com/tauri-apps/nsis-tauri-utils/releases/download/nsis_tauri_utils-v0.5.1/nsis_tauri_utils.dll
Info validating hash
Info Target: x64
Error failed to bundle project:
- Accès refusé. (os error 5)

cyan lichen
#

please run it with the verbose flag cargo tauri build --verbose and share the new logs you'll get

covert fossil
#

There is many many logs but here is the last ones

Warn [tauri_bundler::bundle] Failed to add bundler type to the binary: __TAURI_BUNDLE_TYPE variable not found in binary. Make sure tauri crate and tauri-cli are up to date. Updater plugin may not be able to update this package. This shouldn't normally happen, please report it to https://github.com/tauri-apps/tauri/issues
Info [tauri_bundler::bundle:windows:nsis] Target: x64
Error [tauri_cli] failed to bundle project:
- Accès refusé. (os error 5)

covert fossil
cyan lichen
#

wow, the binary patcher sure is noisy

#

can you also share the output of cargo tauri info please?

covert fossil
#

~/Documents/Dev/gramlyst/gramlyst-tauri on  main! ⌚ 14:41:04
$ cargo tauri info

[✔] Environment
- OS: Windows 10.0.26100 x86_64 (X64)
✔ WebView2: 138.0.3351.109
✔ MSVC: Visual Studio Build Tools 2022
✔ rustc: 1.88.0 (6b00bc388 2025-06-23)
✔ cargo: 1.88.0 (873a06493 2025-05-10)
✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (overridden by environment variable RUSTUP_TOOLCHAIN)
- node: 23.9.0
- pnpm: 10.5.2
- npm: 10.9.2

[-] Packages
- tauri 🦀: 2.7.0
- tauri-build 🦀: 2.3.1
- wry 🦀: 0.52.1
- tao 🦀: 0.34.0
- tauri-cli 🦀: 2.7.1

[-] Plugins
- tauri-plugin-opener 🦀: 2.4.0
- tauri-plugin-notification 🦀: 2.3.0

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