Open Bug 1661935 Opened 2 years ago Updated 9 days ago

Snap does not support NativeMessaging

Categories

(Core :: Widget: Gtk, defect)

80 Branch
Desktop
Linux
defect

Tracking

()

ASSIGNED

People

(Reporter: eduardo.rojasr, Assigned: olivier)

References

(Blocks 3 open bugs)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

Steps to reproduce:

Use the Firefox Snap build from Ubuntu Snap Store (Ubuntu software).

Install "chrome-gnome-shell" package.

Install Firefox GNOME Shell integration.

Go to "extensions.gnome.org" and choose any extension.

Actual results:

Actual results:

An error report shows that says the native host connector cannot be detected.

There is no option to install the GNOME extension.

Expected results:

Expected results:

I should be able to install the chosen GNOME extension directly from the website and manage it afterwards.

The behavior is correct on the current RPM/DEB builds.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

This bug is also being tracked at https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1741074

Ubuntu 21.10 ships the snap version of Firefox by default, (instead of the APT version), so we can expect more users to experience this bug.

Flatpak counterpart: bug 1621763.

See Also: → 1621763

S2 (Serious) Major functionality/product severely impaired and a satisfactory workaround does not exist

Severity: -- → S2

Proposal for a new NativeMessaging portal to address this issue: https://github.com/flatpak/xdg-desktop-portal/issues/655.

See Also: → 1734371
See Also: 1738488
Duplicate of this bug: 1738488
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Linux
Hardware: Unspecified → Desktop
Summary: Snap: cannot install/manage extensions from extensions.gnome.org → Snap does not support NativeMessaging

This bug report is getting triaged, I'm glad. I'll add that Ubuntu 22.04 LTS is planning on removing Firefox from the APT repositories altogether and to only provide the snap version of Firefox, which is Ubuntu's default browser, so this bug is going to be experienced by a large fraction of the Ubuntu userbase at some point.

Assignee: nobody → olivier
Attachment #9267325 - Attachment description: WIP: Bug 1661935 - [WIP] Integration with a new WebExtensions XDG desktop portal for native messaging on Linux → WIP: Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux
Status: NEW → ASSIGNED
Attachment #9267325 - Attachment description: WIP: Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux → Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux

Chiming in as a maintainer of an extension (ff2mpv) that uses native messaging: users have already reported challenges getting the extension to function correctly with the snap-ified Firefox distribution in the upcoming Ubuntu LTS release.

Downstream tracking: https://github.com/woodruffw/ff2mpv/issues/80

Duplicate of this bug: 1763517
Attachment #9267325 - Attachment description: Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux → WIP: Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux
Attachment #9267325 - Attachment description: WIP: Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux → Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux
Attachment #9267325 - Attachment description: Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux → WIP: Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux
Attachment #9267325 - Attachment description: WIP: Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux → Bug 1661935 - Integration with a new WebExtensions XDG desktop portal for native messaging on Linux
Duplicate of this bug: 1786499
Depends on: 1788091

I'm entering a comment here because I've not seen a tracker for the snap releases having native messaging enabled.

I've been using native messaging in FireFox to integrate with KeePassXC for several weeks now, through several FireFox beta releases (currently "beta" snap channel version 105.0b5-1). It is working as expected.

The only issue I noticed so far is each FireFox Profile needs its own separate connector to the KeePassXC database. This makes sense, but might warrant some documentation, somewhere.

(In reply to William Woodruff from comment #10)

Chiming in as a maintainer of an extension (ff2mpv) that uses native messaging: users have already reported challenges getting the extension to function correctly with the snap-ified Firefox distribution in the upcoming Ubuntu LTS release.

Downstream tracking: https://github.com/woodruffw/ff2mpv/issues/80

Following up on this: I'm able to confirm that the extension I maintain works correctly on the "beta" channel of the Firefox snap.

However, to get it working, I had to run a manual flatpak command on the terminal:

flatpak permission-set webextensions ff2mpv snap.firefox yes

Is this documented somewhere? I had to dig through others' bug reports to figure out that this is what I needed, and I can imagine that a lot of other native extension users (and developers) are in a similar position.

As explained in the ff2mpv issue, desktop shells (such as GNOME Shell) and portal frontends (such as xdg-desktop-portal-gtk and xdg-desktop-portal-kde) should display a modal prompt the first time an extension requires this permission, and so you wouldn't need to use the flatpak command to make this choice "by hand". However minimal window managers without portal frontends (e.g. i3) are unlikely to implement that prompt, and the answer will default to "no".

You need to log in before you can comment on or make changes to this bug.