Open Bug 1661935 Opened 4 years ago Updated 4 days ago

Support NativeMessaging in Snap

Categories

(WebExtensions :: General, defect, P3)

80 Branch
Desktop
Linux
defect

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: eduardo.rojasr, Assigned: bandali)

References

(Depends on 2 open bugs, Blocks 5 open bugs)

Details

(Whiteboard: [addons-jira])

Attachments

(2 files)

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
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

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
Blocks: 1462888
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
Blocks: snap-sandbox
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
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".

Whiteboard: [addons-jira]

The snap now supports native messaging through the use of the WebExtensions portal, which is available as a distro-patch in Ubuntu 22.04 and 22.10.

I am not closing this bug yet, because even though the patch has been cherry-picked in the snap, it hasn't landed in the tree yet.

Olivier, are you still able to actively work on that ?

Flags: needinfo?(olivier)
Duplicate of this bug: 1462888
Severity: S2 → N/A
Type: defect → enhancement
Summary: Snap does not support NativeMessaging → Support NativeMessaging in Snap
Depends on: 1836718
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
See Also: → 1843341

Olivier has left Canonical and the patch has been taken over by :bandali. I'm therefore re-assigning the bug for clarity.

Also, considering that the majority of the work is in extension code, I'm moving the bug to WebExtensions.

Assignee: olivier → bandali
Component: Widget: Gtk → General
Flags: needinfo?(olivier)
Product: Core → WebExtensions
See Also: → 1847377
Depends on: 1847377, 1843341
See Also: 1843341, 1847377

(In reply to David D Lowe from comment #3)

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.

I have same problem. Few days ago i have installed Kubuntu 23.10 "Mantic Minotaur" replacing Linux Mint 21.2 "Victoria". the extension doesn't work as well (Including KDE Browser Integration, a Download Manager (Persepolis Download Manager Integration, Aria-NG Integration)). I have grant Permission but nothing happen lol.

KDE Plasma Integration on Firefox 120.

See Also: → 1876447
Severity: N/A → S2
Priority: -- → P1
Severity: S2 → N/A
Type: enhancement → defect
Priority: P1 → P3
Severity: N/A → S3
Blocks: 1903306
Blocks: 1903309
Blocks: 1903338
See Also: → 1903246
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: