#Tauri v2 - ubuntu 22.04 - build appimage

1 messages · Page 1 of 1 (latest)

zenith mural
#

Good morning,
I discovered Tauri and want to test v2, I had several problems which I solved before getting tauri dev to work, now that it works I am looking to make an .AppImage for Linux

Here I'm stuck on building AppImage, I get the error: [appimage/stderr] Error: no such file or directory: tauri-test-perso.AppDir ERROR: Failed to run plugin: appimage (exit code: 1) Error [tauri_cli_node] failed to bundle project: error running build_appimage.sh: failed to run /home/skyline-ch/Programmation/Tauri/tauri-test-perso/src-tauri/target/debug/bundle/appimage/build_appimage. sh ELIFECYCLE Command failed with exit code 1.

I started the build with pnpm dev -v

in ls script auto generate src-tauri/target/debug/bundle/appimage/build_appimage.sh
I see that the paths are relative, I wonder if there might not be an error there or a path problem

tauri info:
[✔] Environment

  • OS: Ubuntu 22.04 X64
    ✔ webkit2gtk-4.1:2.44.2
    ✔ rsvg2:2.52.5
    ✔ rustc:1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    node:20.15.0
    pnpm:9.5.0
    yarn: 1.22.17
    npm:8.5.5

[-] Packages
tauri [RUST]: 2.0.0-beta.23
tauri-build [RUST]: 2.0.0-beta.18
wry[RUST]: 0.41.0
tao [RUST]: 0.28.1
@tauri-apps/api [NPM]: 2.0.0-beta.14
@tauri-apps/cli [NPM]: 2.0.0-beta.21

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

#

Tauri v2 - ubuntu 22.04 - build appimage

regal dagger
#

Hi! Sorry for the issues you are facing

#

I tried bundling AppImage on Ubuntu 22.04 right now, and it worked fine ( on the default Tauri app, created using cargo create-tauri-app --beta )

#

Can you please try on the default application / share your application source code?

zenith mural
zenith mural
zenith mural
#

I confirm that this does not work for me with a freshly created app.
I just modified taui.conf.json to have only appimage output and identify so as not to have an error, everything else is left as created by the wizard

regal dagger
#

That is strange, you told had several problems which I solved before getting , can you roughly tell what problem was and how did you solve them?

zenith mural
# regal dagger That is strange, you told `had several problems which I solved before getting` ,...

I don't really remember the various problems anymore, basically I started testing with Ubuntu 20.04, I had version problems with various libraries.

so I ended up updating to 22.04 which solved some of the problems.
I'll have to do some research for more details.

there is also a problem that took me a little time to understand with the app created, problem that I have with the last one created is the error accessing the graphics buffer, the app opens mest is empty.
the solution is to initialize WEBKIT_DISABLE_DMABUF_RENDERER to 1, which is not done in main.rs generated by the created app.

regal dagger
#

WEBKIT_DISABLE_DMABUF_RENDERER to 1 I guess that was some NVIDIA issue, I had fasced that as well

zenith mural
regal dagger
#

Can you run pnpm tauri build -b appimage --verbose and paste the output where error occurs?

regal dagger
zenith mural
regal dagger
#

Sure

regal dagger
zenith mural
zenith mural
#

for me the context gives a ./ which is not the right folder and like the script uses relative paths it is therefore not in the right place to execute the actions

zenith mural
regal dagger
#

You can send it as a file maybe

zenith mural
regal dagger
#

Sure

zenith mural
regal dagger
#

Okay, I now tried using pnpm and it worked fine as well

#

Can you please check manually that folder src-tauri/target/release/bundle/appimage/<pkg-name>.AppDir exists?

regal dagger
#

Ok, so that exists 🤔

#

Lemme check script

zenith mural
#

what is the script that generates the build_appimage.sh file, if I find it locally I can add logs to have additional information on the execution context

#

I'm going to have to leave soon, it's late here, and tomorrow's work is soon here.

#

I tried to generate deb, it works, the problem seems to be for appimage only

regal dagger
#

So, you have to clone it locally, and then add it to Cargo.toml

#

But wait before that

#

Can you share your build_appimage.sh here?

regal dagger
#

Ok, now that is strange 🤔

#

The script should work

#

What is your default shell?

zenith mural
#

in VSC

regal dagger
#

No, system shell?

#

That executes the script?

#

Or is it default one?

zenith mural
#

I'm not sure but it seems to me that it's the default shell of the system

regal dagger
#

run echo $SHELL

zenith mural
regal dagger
#

Yeah, that's fine

zenith mural
#

😴 I'm going to go to sleep, we'll continue later, thanks for the support.
If you have any instructions to give me I will carry them out tomorrow

regal dagger
#

Sure 👍

zenith mural
#

hello, I wonder if there could not be a binary which would not be localized the same thing for you and for me, since I come from a version 18.04 with an update and not a fresh installation.

regal dagger
#

Hi! Can you try using gnome-terminal instead of VS Code terminal?

regal dagger
zenith mural
regal dagger
#

Will tell you if I can reproduce the bug

zenith mural
zenith mural
#

it's strange, without having modified anything in the version of the test project, now it no longer creates appimage, I have the same error as since VSC in the native terminal which uses bash

zenith mural
#

I did a new test, install a VM on virtualbox, with ubuntu 22.04 freshly installed.
install the prerequisites for Tauri, and share the project folder with the vm to try a build, I have the same error.

zenith mural
#

@regal dagger hello, I have an interesting lead, I did 3 lapp installations with tauri create always using the same configuration.
on the VM freshly installed with Ubuntu 22.04 without any particular modification

creation of the app in the user home, everything works for the build (my-first-app)
creation in the shared folder of the host, failure of the appimage RPM and GEB construction ok (my-second-app)
creation in a secondary disk for the VM, failure of the appimage RPM and GEB construction ok (my-third-app)

my theory is that if the folder to build in appimage is on a disk other than the system disk it fails, on my real computer, I have the /home on a disk other than the system which would explain that it fails but succeeds on the VM which has the /home on the same disk

#

here is a confirmation on my real workstation, I just copied the project folder which is in my home (so on a disk other than the system) on a folder of the system disk and launched the pnpm tauri build, which succeeded successfully

this therefore confirms my theory on the VM

I did this from the system terminal, I will test it later from the code editor

zenith mural
#

with IDE terminal it doesn't work

finite glacier
#

Can you try again? I tried to update linuxdeply and it may have caused this issue. A community member provided a modified linuxdeploy binary that should work.

zenith mural
finite glacier
#

Nothing, just rebuid your app. Maybe delete ~/.cache/tauri first so it must pull latest.