tauri
tauri copied to clipboard
[bug] Gstreamer issues under Arch Linux when using AppImage
Describe the bug
I try to create a simple App which shows a single website. The idea is to replicate the functionality of electron-nativefier. I thought I start with WhatsApp:
https://github.com/RubenKelevra/whatsapp-tauri
When I set tauri.bundle.appimage.bundleMediaFramework
to true
, the compilation will fail with this error:
$ cargo tauri build -b appimage
Compiling app v0.1.0 (/home/rubenk/dev/tauri-whatsapp/src-tauri)
^X@sk Finished release [optimized] target(s) in 24.94s
Bundling whats-app_0.1.1_amd64.AppImage (/home/rubenk/dev/tauri-whatsapp/src-tauri/target/release/bundle/appimage/whats-app_0.1.1_amd64.AppImage)
Error failed to bundle project: error running appimage.sh: error running appimage.sh: `failed to run /home/rubenk/dev/tauri-whatsapp/src-tauri/target/release/bundle/appimage/build_appimage.sh`
When I set it to false
the build process works fine, but I won't be able to use it: The main window launches but the window-content remains white blank and that's it.
On the console the appimage will print the following:
$ /home/rubenk/dev/tauri-whatsapp/src-tauri/target/release/bundle/appimage/whats-app_0.1.1_amd64.AppImage
GStreamer element autoaudiosink not found. Please install it
(WebKitWebProcess:440827): GLib-GObject-WARNING **: 14:51:10.999: invalid (NULL) pointer instance
(WebKitWebProcess:440827): GLib-GObject-CRITICAL **: 14:51:10.999: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
The deb builds fine and does start and render the website. There's also audio playback possible.
The system is ArchLinux with Linux 5.18.8-xanmod1
, I use KDE 5.25.2 and the user session runs on Wayland 1.21.0. Arch Linux already uses pipewire - so maybe there are some incompatibilities? Tauri gets compiled with Rust 1.62.0, and I've just set up the development environment yesterday by running:
$ cargo install tauri-cli --version "^1.0.0"
$ cargo tauri init
The release binaries are build with the standard cargo tauri build
.
I've installed the necessary packages from the Readme for Arch Linux:
webkit2gtk, gtk3, libayatana-appindicator
Reproduction
- try to start AppImages bundles
OR
- start building a bundle with AppImage as target and
tauri.bundle.appimage.bundleMediaFramework
set to true
Expected behavior
Build and runs fine, regardless of the flag.
Platform and versions
$ cargo tauri info
Environment
› OS: EndeavourOS Rolling Release X64
› Node.js: 16.16.0
› npm: 8.13.1
› pnpm: Not installed!
› yarn: 1.22.19
› rustup: Not installed!
› rustc: 1.62.0
› cargo: 1.62.0
› Rust toolchain:
Packages
WARNING: no lock files found, defaulting to npm
› @tauri-apps/cli [NPM]: 1.0.3
› @tauri-apps/api [NPM]: Not installed!
› tauri [RUST]: 1.0.3,
› tauri-build [RUST]: 1.0.3,
› tao [RUST]: 0.12.1,
› wry [RUST]: 0.19.0,
App
› build-type: bundle
› CSP: unset
› distDir: https://web.whatsapp.com/
› devPath: https://web.whatsapp.com/
package.json not found
App directory structure
├─ .github
├─ src-tauri
└─ .git
Stack trace
No response
Additional context
No response
tauri.bundle.appimage.bundleMediaFramework
works only when building on ubuntu for now. I wanted to "fix" this for weeks now, but couldn't find the time to do it yet...
That said, you don't want to build distributable apps on arch anyway, because these apps can only work on rolling release distros then. "Build your app on the oldest system you want to support", see https://tauri.app/v1/guides/distribution/linux#limitations If they are meant for local usages only, i don't reallyyy see why you'd want to use appimages anyway (file size)
I'm fine with not supporting older versions of operating systems. 🤷🏼
I would have not looked into app images if this wouldn't be a default bundle, and thus I checked both. AppImage wasn't working so I was curious what I did wrong.
Maybe the solution would be to remove AppImages altogether as standard bundle?
Would be kinda neat if tauri could output PKGBUILD files, so not "arch packages" (which cannot be distributed that easily) but just the build instructions to create tauri apps locally.
So kinda like https://github.com/tauri-apps/tauri/issues/3728, but just creating the main file from the config file and place everything else necessary as dependency or as files next to it.
This way tauri packages can be easily shared on the AUR, with only the need to place binary files, like sidecars (if not possible to put them in a dedicated package) on a server.
Same issue:
GStreamer element autoaudiosink not found. Please install it
(WebKitWebProcess:141658): GLib-GObject-WARNING **: 01:59:06.463: invalid (NULL) pointer instance
(WebKitWebProcess:141658): GLib-GObject-CRITICAL **: 01:59:06.463: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
on KDE Neon with Ubuntu 20.04 base.
@erayerdin it's not the same issue, you just didn't build your app with the mentioned tauri.bundle.appimage.bundleMediaFramework
config enabled. Doing so should make it work.
it does not work, here is the environment:
tauri.conf.json
is as below:
{
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
"build": {
"beforeBuildCommand": "",
"beforeDevCommand": "",
"devPath": "../dist",
"distDir": "../dist"
},
"package": {
"productName": "taurapp",
"version": "0.1.2-alpha"
},
"tauri": {
"allowlist": {
"all": true
},
"bundle": {
"appimage": {
"bundleMediaFramework": true
},
"active": true,
"category": "DeveloperTool",
"copyright": "",
"deb": {
"depends": []
},
"externalBin": [],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
],
"identifier": "com.erayerdin.taurapp",
"longDescription": "",
"macOS": {
"entitlements": null,
"exceptionDomain": "",
"frameworks": [],
"providerShortName": null,
"signingIdentity": null
},
"resources": [],
"shortDescription": "",
"targets": "all",
"windows": {
"certificateThumbprint": null,
"digestAlgorithm": "sha256",
"timestampUrl": ""
}
},
"security": {
"csp": null
},
"updater": {
"active": false
},
"windows": [
{
"fullscreen": false,
"height": 600,
"resizable": true,
"title": "TaurApp",
"width": 800
}
],
"systemTray": {
"iconPath": "icons/128x128.png",
"iconAsTemplate": true
}
}
}
Runtime environment is KDE Neon with Ubuntu 20.04 base.
The project is open source and hosted here.
It logs out these on launch:
GStreamer element autoaudiosink not found. Please install it
(WebKitWebProcess:31764): GLib-GObject-WARNING **: 11:54:31.420: invalid (NULL) pointer instance
(WebKitWebProcess:31764): GLib-GObject-CRITICAL **: 11:54:31.420: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Whether you set tauri.bundle.appimage.bundleMediaFramework
to true
or false
, the result is the same.
same situation.
@spirityy Can you do below?
rm src-tauri/target/release/bundle/appimage/*.AppDir/ -rfv
I have just realized that it fails to build similar to your case if <appname>.AppDir
directory already exists.
it works! thx.
Hi! Just confirming that this is still an issue using Arch and Tauri 1.3
GStreamer element autoaudiosink not found. Please install it
(WebKitWebProcess:82481): GLib-GObject-CRITICAL **: 11:50:26.506: invalid (NULL) pointer instance
(WebKitWebProcess:82481): GLib-GObject-CRITICAL **: 11:50:26.506: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Issue persists in the latest 2.0.0 alpha releases
cargo tauri info
[✔] Environment
- OS: Arch Linux Rolling Release X64
✔ webkit2gtk-4.1: 2.40.3
✔ rsvg2: 2.56.2
✔ rustc: 1.71.0 (8ede3aae2 2023-07-12)
✔ Cargo: 1.71.0 (cfd3bbd8f 2023-06-08)
✔ rustup: 1.26.0 (2023-05-04)
✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
- node: 18.16.0
- pnpm: 8.6.9
- yarn: 1.22.19
- npm: 9.8.0
[-] Packages
- tauri [RUST]: 2.0.0-alpha.10
- tauri-build [RUST]: 2.0.0-alpha.6
- wry [RUST]: 0.28.3
- tao [RUST]: 0.19.1
- @tauri-apps/api [NPM]: 2.0.0-alpha.4
- @tauri-apps/cli [NPM]: 2.0.0-alpha.10
[-] App
- build-type: bundle
- CSP: unset
- distDir: ../dist
- devPath: http://localhost:1420/
- framework: SolidJS
- bundler: Vite
GStreamer element autoaudiosink not found. Please install it
(WebKitWebProcess:91838): GLib-GObject-CRITICAL **: 14:12:54.056: invalid (NULL) pointer instance
(WebKitWebProcess:91838): GLib-GObject-CRITICAL **: 14:12:54.056: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
我也遇到这个问题,也是archlinux