Skip to content

webbrowser::open returns Ok(()) even when the web browser doesn't open #113

@mfreeborn

Description

@mfreeborn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions