I'm on Ubuntu 24.04 and my default browser is Firefox which was installed by default using snap.
I somehow got into the position where the snapd.apparmor service had exited, which didn't seem otherwise seem to affect my usage of my computer, including Firefox, outside of this issue.
In this state, calling webbrowser::open, returned Ok(()), but the browser didn't open (nor would it create a new tab if the browser was already open at the time of the call).
I managed to get some logging output by setting BrowserOptions::with_suppress_output(false), and the following was printed to my terminal:
snap-confine is packaged without necessary permissions and cannot continue required permitted capability cap_dac_override not found in current capabilities
Restarting the snapd.apparmor process fixed the problem, but I would have expected webbrowser to return an Err(_) rather than silently fail.
I'm on Ubuntu 24.04 and my default browser is Firefox which was installed by default using
snap.I somehow got into the position where the
snapd.apparmorservice had exited, which didn't seem otherwise seem to affect my usage of my computer, including Firefox, outside of this issue.In this state, calling
webbrowser::open, returnedOk(()), but the browser didn't open (nor would it create a new tab if the browser was already open at the time of the call).I managed to get some logging output by setting
BrowserOptions::with_suppress_output(false), and the following was printed to my terminal:Restarting the
snapd.apparmorprocess fixed the problem, but I would have expectedwebbrowserto return anErr(_)rather than silently fail.