tauri
tauri copied to clipboard
[bug] Raspbery pi - error running appimage.sh
Describe the bug
when running cargo tauri build --verbose
on a raspberry pi. I get the following error
Error [tauri_cli] failed to bundle project: error running appimage.sh: error running appimage.sh:
`failed to run /home/pi/spike/tauri-pcap-spike/src-tauri/target/release/bundle/appimage/build_appimage.sh`
looking into the error I noticed that build_appimage.sh is trying to run this command
( cd "/home/pi/.cache/tauri" && ( wget -q -4 -N
https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-${ARCH} || wget -q -4 -N
https://github.com/AppImage/AppImageKit/releases/download/12/AppRun-${ARCH} ) )
however, when the script tries to run it for my arch type it equates to
https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-armv7
and
https://github.com/AppImage/AppImageKit/releases/download/12/AppRun-armv7
These are dead links that produce 404's.
Reproduction
- grab a raspberry pi
- follow the quick start guide
Expected behavior
.deb file should be successfully created
Platform and versions
Environment
› OS: Raspberry Pi OS 11 X32
› Node.js: 14.20.1
› npm: 6.14.17
› pnpm: Not installed!
› yarn: 1.22.19
› rustup: 1.25.1
› rustc: 1.64.0
› cargo: 1.64.0
› Rust toolchain: stable-armv7-unknown-linux-gnueabihf
Packages
› @tauri-apps/cli [NPM]: 1.1.1
› @tauri-apps/api [NPM]: 1.1.0
› tauri [RUST]: 1.1.1,
› tauri-build [RUST]: 1.1.1,
› tao [RUST]: 0.14.0,
› wry [RUST]: 0.21.1,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:5173/
› framework: React
App directory structure
├─ public
├─ .vscode
├─ tauri-pcap-spike.AppDir
├─ dist
├─ src-tauri
├─ node_modules
└─ src
Stack trace
...
...
Bundling [tauri_bundler::bundle::linux::appimage] tauri-pcap-spike_0.1.0_arm.AppImage (/home/pi/spike/tauri-pcap-spike/src-tauri/target/release/bundle/appimage/tauri-pcap-spike_0.1.0_arm.AppImage)
Running [tauri_bundler::bundle::common] Command `/home/pi/spike/tauri-pcap-spike/src-tauri/target/release/bundle/appimage/build_appimage.sh `
+ export ARCH=armv7
+ ARCH=armv7
+ APPIMAGE_BUNDLE_XDG_OPEN=0
+ APPIMAGE_BUNDLE_GSTREAMER=0
+ TRAY_LIBRARY_PATH=0
+ '[' armv7 == i686 ']'
+ linuxdeploy_arch=armv7
+ mkdir -p tauri-pcap-spike.AppDir
+ cp -r ../appimage_deb/data/usr tauri-pcap-spike.AppDir
+ cd tauri-pcap-spike.AppDir
+ mkdir -p usr/bin
+ mkdir -p usr/lib
+ [[ 0 != \0 ]]
+ [[ 0 != \0 ]]
++ dirname '{}'
+ find /usr/lib /usr/libexec -name WebKitNetworkProcess -exec mkdir -p . ';' -exec cp --parents '{}' . ';'
++ dirname '{}'
+ find /usr/lib /usr/libexec -name WebKitWebProcess -exec mkdir -p . ';' -exec cp --parents '{}' . ';'
++ dirname '{}'
+ find /usr/lib /usr/libexec -name libwebkit2gtkinjectedbundle.so -exec mkdir -p . ';' -exec cp --parents '{}' . ';'
+ cd /home/pi/.cache/tauri
+ wget -q -4 -N https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-armv7
+ wget -q -4 -N https://github.com/AppImage/AppImageKit/releases/download/12/AppRun-armv7
Error [tauri_cli] failed to bundle project: error running appimage.sh: error running appimage.sh: `failed to run /home/pi/spike/tauri-pcap-spike/src-tauri/target/release/bundle/appimage/build_appimage.sh`
Additional context
armv7 32 bit
This should be an easy fix for the appimage links, we just need to change armv7
to armhf
but linuxdeploy only has i386
and x86_64
, cc @FabianLars
Basically an extension of https://github.com/tauri-apps/tauri/issues/4174 which means we're still waiting for https://github.com/linuxdeploy/linuxdeploy/issues/175. So i guess we have to look into it ourselves after all
I'm running into the exact same issue now. Any suggestions for a workaround?
If you only want a .deb file, it already works. For an appimage, I have no suggestions. https://discord.com/channels/616186924390023171/1051862193030840330/1051862193030840330
@michibertel good to know 👍
https://github.com/tauri-apps/tauri/issues/4174#issuecomment-1876034526
Building and running appimages on arm now works. Cross compiling from x86_64 to arm however does not and is tracked here https://github.com/linuxdeploy/linuxdeploy/issues/258. For now you'll have to build on arm devices or inside something like a qemu vm (qemu can emulate different architectures).