Skip to content
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

xdg-open does not work in release artifacts produced by tauri-action #10617

Open
ninjadev64 opened this issue Aug 8, 2024 · 5 comments · May be fixed by tauri-apps/plugins-workspace#2103
Open
Labels
platform: Linux status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@ninjadev64
Copy link

Hey @FabianLars

3 different, but related, functions of my application do not work when using the AppImage of my application produced by tauri-action in GitHub Actions, but work in AppImages produced locally for myself and 3 other users (as well as other methods of running the application, such as cargo tauri dev or other packaging formats). On my system, at least, the .RPM produced by tauri-action seems to work, and it is only the .AppImage that does not work. This issue is possibly related to #6172.

  1. My application OpenDeck loads plugins, which then communicate by sending JSON events back and forth over a websocket. One such event is openUrl, which a plugin can send to open a URL in the user's browser, which OpenDeck handles using Tauri's shell::open (see here).

  2. OpenDeck also has a button to open its config directory in its settings tab, which, on Linux, uses xdg-open using std's Command inside a Tauri command.

  3. Additionally, OpenDeck's "starter pack" plugin has a "Run Command" action, in which users can input a command to run on key down and key up. The starter pack plugin is also written in Rust, and uses std's Command to implement this action.

For example, when pressing "open config directory" when using the AppImage from GitHub Actions, run with ./opendeck_2.0.0_amd64.AppImage, this is printed to the terminal that the AppImage was run from:

xdg-mime: no method available for querying MIME type of '/home/aman/.config/com.amansprojects.opendeck'
xdg-mime: mimetype argument missing
Try 'xdg-mime --help' for more information.
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: x-www-browser: command not found
XPCOMGlueLoad error for file /usr/lib64/firefox/libxul.so:
/usr/lib64/libproxy/libpxbackend-1.0.so: undefined symbol: g_once_init_leave_pointer
Couldn't load XPCOM.
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: iceweasel: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: seamonkey: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: mozilla: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: epiphany: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: konqueror: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: chromium: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: chromium-browser: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: google-chrome: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: www-browser: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: links2: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: elinks: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: links: command not found
/tmp/.mount_opendegOqUUe/usr/bin//xdg-open: line 882: lynx: command not found

and then it seems to finally find and open w3m on my system in the terminal in the correct directory, whereas it should open in Nautilus for me, as it does when running OpenDeck from different methods.

Or, when using the Run Command action with xdg-open https://example.com/, this is the stdout of the executed command:

XPCOMGlueLoad error for file /usr/lib64/firefox/libxul.so:
/usr/lib64/libproxy/libpxbackend-1.0.so: undefined symbol: g_once_init_leave_pointer
Couldn't load XPCOM.

OpenDeck is using the latest Tauri v1.7 and uses: tauri-apps/tauri-action@v0. I would appreciate some steps to follow to resolve this issue.

@ninjadev64
Copy link
Author

Oh, sorry for the ping, this was originally going to be a comment on another issue and I forgot to remove the ping.

@ninjadev64
Copy link
Author

ninjadev64 commented Aug 8, 2024

Seems like there is some useful information in this comment.

@FabianLars FabianLars transferred this issue from tauri-apps/tauri-action Aug 14, 2024
@FabianLars FabianLars added type: bug platform: Linux status: needs triage This issue needs to triage, applied to new issues labels Aug 14, 2024
@ninjadev64
Copy link
Author

Any update? Or some kind of manual fix?

@Norbiros
Copy link
Contributor

I've also encountered a few issues with an app built using tauri-action:

  • Normal <a href= links in HTML to external sites (that open in browser) don't work
  • xdg-open produces a lot of errors:
xdg-mime: no method available for querying MIME type of '/home/norbi/.local/share/ModrinthApp/profiles/Main'
xdg-mime: mimetype argument missing
Try 'xdg-mime --help' for more information.
Opening "/home/norbi/.local/share/ModrinthApp/profiles/Main" with Files  (inode/directory)
nautilus: /tmp/.mount_modrin4YwviT/usr/lib/libjson-glib-1.0.so.0: no version information available (required by /usr/lib64/libtracker-sparql-3.0.so.0)
nautilus: symbol lookup error: /usr/lib64/libappstream.so.4: undefined symbol: g_string_free_and_steal
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: x-www-browser: command not found
XPCOMGlueLoad error for file /usr/lib64/firefox/libxul.so:
/usr/lib64/firefox/libxul.so: undefined symbol: pixman_image_set_dither
Couldn't load XPCOM.
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: iceweasel: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: seamonkey: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: mozilla: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: epiphany: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: konqueror: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: chromium: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: chromium-browser: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: google-chrome: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: www-browser: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: links2: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: elinks: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: links: command not found
/tmp/.mount_modrin4YwviT/usr/bin//xdg-open: line 869: lynx: command not found
xdg-open: no method available for opening '/home/norbi/.local/share/ModrinthApp/profiles/Main'

But when I build app on my computer (tauri build) all problems are fixed...

@ninjadev64
Copy link
Author

Yeah, seems like the same symptoms. @FabianLars any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Linux status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants