tauri: [bug] failed to bundle project: error running appimage.sh
Describe the bug
Build a hello word project, run pnpm tauri build, get a error:
Compiling serialize-to-javascript v0.1.1
Compiling serde_repr v0.1.9
Compiling state v0.5.3
Compiling webkit2gtk v0.18.2
Finished release [optimized] target(s) in 2m 14s
Bundling tauri-app-js_0.0.0_amd64.deb (/home/xujin/My_Projects/learning/learning-tauri/tauri-app-js/src-tauri/target/release/bundle/deb/tauri-app-js_0.0.0_amd64.deb)
Bundling tauri-app-js_0.0.0_amd64.AppImage (/home/xujin/My_Projects/learning/learning-tauri/tauri-app-js/src-tauri/target/release/bundle/appimage/tauri-app-js_0.0.0_amd64.AppImage)
Error failed to bundle project: error running appimage.sh: error running appimage.sh: `failed to run /home/xujin/My_Projects/learning/learning-tauri/tauri-app-js/src-tauri/target/release/bundle/appimage/build_appimage.sh`
ELIFECYCLE Command failed with exit code 1.
Reproduction
run pnpm tauri build
Expected behavior
Build success.
Platform and versions
Environment
› OS: Manjaro 22.0.0 X64
› Node.js: 16.18.1
› npm: 8.19.2
› pnpm: 7.18.1
› yarn: Not installed!
› rustup: 1.25.1
› rustc: 1.65.0
› cargo: 1.65.0
› Rust toolchain: stable-x86_64-unknown-linux-gnu
Packages
› @tauri-apps/cli [NPM]: 1.2.1
› @tauri-apps/api [NPM]: 1.2.0
› tauri [RUST]: 1.2.1,
› tauri-build [RUST]: 1.2.1,
› tao [RUST]: 0.15.6,
› wry [RUST]: 0.22.6,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
App directory structure
├─ src
├─ .vscode
├─ src-tauri
├─ node_modules
└─ dist
Stack trace
No response
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 23 (4 by maintainers)
Commits related to this issue
- fix: symlink issue bundling for linux #5781 — committed to passivedragon/tauri by passivedragon a year ago
- fix: symlink issue bundling for linux #5781 (#6391) * bundler for linux: fix error on pre-existing links * fix: symlink issue bundling for linux #5781 — committed to tauri-apps/tauri by passivedragon a year ago
In my case librsvg library was missing:
I had to install it using Ubuntu package manager:
BR, Darek
Closing this as OP’s (and hopefully all the others’) issues are resolved and a catch all issue is not really helpful considering that this error message can be caused by many different root causes.
In general in case anyone sees this error message and none of the messages here help them. Please re-run it with the --verbose flag and open a new issue with the logs. Thank you.
Symlinking works, thanks! Yeah that’s true.
For those looking to temporally disable AppImage build you can change
"targets": "all"insrc-tauri/tauri.conf.jsonfile to:Ref: https://tauri.app/v1/guides/building/linux#prerequisites
I also got the same error message “Error failed to bundle project: error running appimage.sh”. but the reason might be different. the content https://raw.githubusercontent.com/tauri-apps/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh is blocked by the GWT and failed to build the appImage. below is the log and testing I did.
Is it possible to move the dependant scripts be moved into a Rust crate instead of getting them from internet runtime and show explicit error message instead of a general error message?
Thank You @FabianLars .
npm run tauri build -- --verboseworking.I build my APP on jetson nano, is ARMv8 system. There are two problems.
I have add my user to ssl-cert group and root group, but still
find: ‘/usr/lib/ssl/private’: Permission deniedSame error, may related to this: failed to create symbolic link ‘tauri-app.png’: File exists
When I commented out the ln commands in target/release/bundle/appimage/build_appimage.sh, it succeeded, but fails the next time I run the build.
The -f might help?
ln -s -f “usr/share/icons/hicolor/256x256@2/apps/tauri-app.png” “tauri-app.png” ln -s -f “usr/share/applications/tauri-app.desktop” “tauri-app.desktop”
Hello, thanks for your help, i might know what’s causing the problem: Incomplete file download for
linuxdeploy-x86_64.AppImage.This seems to have fixed it for me, thank you.
@yozachar You have installed the latest version, which only contains
.so.16. See package content here. I found that symlinking both old libraries to their respective newer versions works, but it’s probably not and ideal solution.Please re-run it with the verbose flag;
pnpm tauri build --verboseHopefully we get more helpful output then.