-
Notifications
You must be signed in to change notification settings - Fork 2.3k
🐛fix: Tauri AppImage failing to render on wayland + mesa #5463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛fix: Tauri AppImage failing to render on wayland + mesa #5463
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
Changes requested ❌
Reviewed everything up to 1f1a6fb in 1 minute and 38 seconds. Click for details.
- Reviewed
17lines of code in1files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/template-tauri-build-linux-x64.yml:154
- Draft comment:
Consider checking if the linuxdeploy binary already exists in TAURI_TOOLKIT_PATH to avoid redundant downloads on subsequent builds. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%None
2. .github/workflows/template-tauri-build-linux-x64.yml:157
- Draft comment:
Consider verifying the checksum of the downloaded linuxdeploy binary to ensure its integrity and guard against tampering. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%None
Workflow ID: wflow_xOqDRKXFjj2pr0Zl
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
| # Pin linuxdeploy version to prevent @tauri-apps/cli-linux-x64-gnu from pulling in an outdated version | ||
| TAURI_TOOLKIT_PATH="${XDG_CACHE_HOME:-$HOME/.cache}/tauri" | ||
| mkdir -p "$TAURI_TOOLKIT_PATH" | ||
| wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-x86_64.AppImage -O "$TAURI_TOOLKIT_PATH/linuxdeploy-x86_64.AppImage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling (e.g. using 'set -e' or checking wget's exit code) for the linuxdeploy download step to ensure a failed download aborts the build.
|
I'm Minh from Menlo Research. First of all, thank you so much for your contribution and for flagging this issue with Tauri's linuxdeploy, as well as for digging into the root cause in issue #5367. We really appreciate the time and care you've put into this. Following your suggestion, I downloaded the latest I've tried this setup on both a fresh Fedora Workstation 42 (GNOME desktop) and Ubuntu 22.04. However, I'm still encountering an error during make build-tauri (and make build as well), specifically:
We’re actively working on this and continuing to investigate what might be causing the failure. If there's anything else you think we should double-check, your input would be greatly appreciated. I've attached a screenshot of the terminal output below for reference: |
|
Hi @Minh141120, that's to be expected. That's the other issue I touched upon in #5367, there's a bit of magic in the github release workflow that isn't reflected by the makefile. As I've come to understand it, linuxdeploy drills down the dependency tree of bundled resources and errors when dependencies are missing (as you've just run into). This is normally reasonable, expect when you want dependencies to be provided by the end users' systems. Tauri doesn't provide an escape hatch for this. What it appears you guys are doing is this, you first remove the resources you intend to bundle from tauri.conf.json, proceed to call |
|
Hi @DistractionRectangle, thank you so much for the incredibly detailed explanation, your insight has been extremely helpful. I'll try to get it working locally first, and once everything builds smoothly, I'll proceed with merging your changes. Your thorough breakdown really helped us understand the issue and saved us a lot of time! By the way, we're planning to move toward a Flatpak distribution for Jan in the near future (issue #5416), which should help us avoid these kinds of packaging issues going forward. Once again, we greatly appreciate your contribution. I’ll keep you posted here as soon as I make progress. Thanks again for your support! |
c8cfb02 to
2fe2206
Compare
|
Its working now on my fedora machine, the Wayland rendering issue is gone! 🎉🎉. Thanks to your contribution, everything is running smoothly: We greatly appreciate your help! We’ll be including this in the upcoming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Could you help us rebase your branch with the latest changes from release/v0.6.4 and push the updated commit? That’ll help us proceed with the merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
AppImages built with Tauri fail to render with EGL_BAD_PARAMETER on wayland + mesa. This is a side effect of binary stripping in older linuxdeploy builds. Tauri cli pulls in an outdated build of linuxdeploy. This can be fixed by opting out of binary stripping, or by upgrading linuxdeploy. Tauri cli is well behaved in that it doesn't fetch linuxdeploy if it already exists in the cache. This behavior allows us to pin linuxdeploy to any version of our choosing by prepopulating the toolsdirectory with a linuxdeploy binary before calling Tauri cli.
2fe2206 to
e20d7d2
Compare
|
Rebased on release/v.0.6.4 |
|
Thank you @DistractionRectangle, I’ll go ahead and merge it once all the CI checks have passed. |
…b workflow - pulls fix for janhq#5463 out of the github release workflow and into the make/yarn build process - implements a wrapper script that pins linuxdeploy and injects a new location for XDG_CACHE_HOME into the build pipeline, allowing manipulating .cache/tauri without tainting the hosts .cache - adds ./.cache (project_root/.cache) to make clean and mise clean task - remove .devcontainer/buildAppImage.sh, obsolete now that extra build steps have been removed from the github workflow and incorporated in the normal build process
…b workflow - pulls fix for janhq#5463 out of the github release workflow and into the make/yarn build process - implements a wrapper script that pins linuxdeploy and injects a new location for XDG_CACHE_HOME into the build pipeline, allowing manipulating .cache/tauri without tainting the hosts .cache - adds ./.cache (project_root/.cache) to make clean and mise clean task - remove .devcontainer/buildAppImage.sh, obsolete now that extra build steps have been removed from the github workflow and incorporated in the normal build process - remove appimagetool from .devcontainer/postCreateCommand.sh, as it was only used by .devcontainer/buildAppImage.sh
…b workflow - pulls fix for janhq#5463 out of the github release workflow and into the make/yarn build process - implements a wrapper script that pins linuxdeploy and injects a new location for XDG_CACHE_HOME into the build pipeline, allowing manipulating .cache/tauri without tainting the hosts .cache - adds ./.cache (project_root/.cache) to make clean and mise clean task - remove .devcontainer/buildAppImage.sh, obsolete now that extra build steps have been removed from the github workflow and incorporated in the normal build process - remove appimagetool from .devcontainer/postCreateCommand.sh, as it was only used by .devcontainer/buildAppImage.sh



AppImages built with Tauri fail to render with EGL_BAD_PARAMETER on wayland + mesa. This is a side effect of binary stripping in older linuxdeploy builds. Tauri cli pulls in an outdated build of linuxdeploy. This can be fixed by opting out of binary stripping, or by upgrading linuxdeploy. Tauri cli is well behaved in that it doesn't fetch linuxdeploy if it already exists in the cache. This behavior allows us to pin linuxdeploy to any version of our choosing by prepopulating the toolsdirectory with a linuxdeploy binary before calling Tauri cli.
Describe Your Changes
Fixes Issues
Self Checklist
Important
Pins
linuxdeployversion in GitHub workflow to fix Tauri AppImage rendering issues on Wayland + Mesa.linuxdeployversion in.github/workflows/template-tauri-build-linux-x64.ymlto prevent outdated versions causing rendering issues on Wayland + Mesa.linuxdeploy-x86_64.AppImageand sets executable permissions before Tauri CLI execution.This description was created by
for 1f1a6fb. You can customize this summary. It will automatically update as commits are pushed.
Edit: correct github keyword from closes to fixes, added some hyperlinks to issue desc for improved context.