Bug: no warning when all Chromium-family browsers are removed
Summary
Launching any webapp (WhatsApp, Discord, YouTube, X, etc.) crashes with a
cryptic error when the default browser is not a Chromium-family browser
and no Chromium-family browser (Chrome/Brave/Edge/Opera/Vivaldi/Helium) is
installed. No warning is shown explaining that a supported browser is missing.
What happened
$ omarchy-launch-webapp https://web.whatsapp.com/
Error: Path "--app=https:/web.whatsapp.com" does not exist!
Via the desktop launcher the webapp simply "crashes"/does nothing.
What was expected
A clear warning that no supported (Chromium-family) browser is installed, and
a graceful error instead of a crash.
Steps to reproduce
- Set a non-Chromium browser as default, e.g. Zen:
xdg-settings set default-web-browser zen.desktop
(zen.desktop returns Exec=/opt/zen-browser-bin/zen-bin %u)
- Ensure no Chromium-family browser is installed (no
chromium.desktop,
chrome.desktop, etc. in /usr/share/applications/ or ~/.local/share/applications/).
- Run
omarchy-launch-webapp https://web.whatsapp.com/ (or open the WhatsApp
desktop launcher / the SUPER+SHIFT+ALT+G keybind).
Root cause
In bin/omarchy-launch-webapp:
case $browser in
google-chrome* | brave* | microsoft-edge* | opera* | vivaldi* | helium*) ;;
*) browser="chromium.desktop" ;;
esac
xdg-settings get default-web-browser returns zen.desktop, which is not
in the whitelist, so the script forces chromium.desktop. But chromium.desktop
does not exist (Chromium uninstalled), the sed emits an empty string, and the
command collapses to:
uwsm-app -- --app=https://web.whatsapp.com/
The Wayland app daemon has no binary to exec, interprets --app=... as a path,
and returns Error: Path "--app=https:/web.whatsapp.com" does not exist!.
There is no check that the resolved browser binary actually exists, and no
error/warning surfaced to the user.
Suggested fix
- After resolving the
.desktop file, verify a binary was found; if not, print
a clear message that no supported (Chromium-family) browser is installed and
exit with a non-zero code.
- Optionally detect whether the default browser is a supported one, and warn
when falling back.
Environment
- Omarchy: 4.0.1-1
- Default browser: Zen (
zen.desktop), Firefox-based
- Kernel: 7.1.9-arch1-2
- Desktop: Hyprland (DM: SDDM), Omarchy
- Machine: Lenovo 300e 2nd Gen (Convertible, LNVNB161216)
- CPU: Intel Pentium Silver N5000 (4 cores, Goldmont Plus)
- GPU: Intel UHD Graphics 605 (i915), Gen-9.5
- Memory: 8 GiB
- Repos: pkgs.omarchy.org/stable (pacman, 1248 packages)
Bug: no warning when all Chromium-family browsers are removed
Summary
Launching any webapp (WhatsApp, Discord, YouTube, X, etc.) crashes with a
cryptic error when the default browser is not a Chromium-family browser
and no Chromium-family browser (Chrome/Brave/Edge/Opera/Vivaldi/Helium) is
installed. No warning is shown explaining that a supported browser is missing.
What happened
Via the desktop launcher the webapp simply "crashes"/does nothing.
What was expected
A clear warning that no supported (Chromium-family) browser is installed, and
a graceful error instead of a crash.
Steps to reproduce
xdg-settings set default-web-browser zen.desktop(
zen.desktopreturnsExec=/opt/zen-browser-bin/zen-bin %u)chromium.desktop,chrome.desktop, etc. in/usr/share/applications/or~/.local/share/applications/).omarchy-launch-webapp https://web.whatsapp.com/(or open the WhatsAppdesktop launcher / the
SUPER+SHIFT+ALT+Gkeybind).Root cause
In
bin/omarchy-launch-webapp:xdg-settings get default-web-browserreturnszen.desktop, which is notin the whitelist, so the script forces
chromium.desktop. Butchromium.desktopdoes not exist (Chromium uninstalled), the
sedemits an empty string, and thecommand collapses to:
The Wayland app daemon has no binary to exec, interprets
--app=...as a path,and returns
Error: Path "--app=https:/web.whatsapp.com" does not exist!.There is no check that the resolved browser binary actually exists, and no
error/warning surfaced to the user.
Suggested fix
.desktopfile, verify a binary was found; if not, printa clear message that no supported (Chromium-family) browser is installed and
exit with a non-zero code.
when falling back.
Environment
zen.desktop), Firefox-based