Enable native messaging in Snap
Categories
(Thunderbird :: Add-Ons: General, defect)
Tracking
(Not tracked)
People
(Reporter: bugzilla, Assigned: gerard-majax)
References
Details
(Keywords: snap)
Attachments
(3 files)
Steps to reproduce:
Install Thunderbird on Ubuntu via snap
Install KeePassXC and follow the instructions to enable the browser integration on https://github.com/kkapsner/keepassxc-mail/?tab=readme-ov-file#linux
Add the extension keepassxc-mail
Open the error console (Ctrl+Shift+J)
Actual results:
There is a message "No such native application de.kkapsner.keepassxc_mail"
Expected results:
Thunderbird should be able to connect to the native message like Firefox is able to.
https://github.com/kkapsner/keepassxc-mail/issues/95 is the issue on the KPM side.
For Firefox the bug was https://bugzilla.mozilla.org/show_bug.cgi?id=1661935
Not quite sure if the portal has to be changed as well... (https://github.com/flatpak/xdg-desktop-portal/pull/705)
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Assignee | ||
Comment 4•2 months ago
|
||
There's still a preference to flip, cf Firefox snap patches
I think there is more to do... setting widget.use-xdg-desktop-portal.native-messaging to 1 or 2 does not work and in https://github.com/canonical/firefox-snap/pull/99/commits/17fa5e9c290c29c43e66aa58d26a2130c20321f0 there seem to be changes in the code of Firefox itself.
Assignee | ||
Comment 6•29 days ago
•
|
||
Heather, do you know what might be missing on thunderbird side? There's nothing in the patch introducing the feature that obviously looks limited to Firefox itself
Comment 7•28 days ago
•
|
||
I am trying to get my head around this. Are the changes linked in Comment 5 or in the canonical firefox snap repo those that are mentioned here by droidmonkey as being "backdoor implemented on their snap"?
Do I understand the following correctly:
- this change in Firefox snap allows you to use native Messaging on Firefox snap (through the WebExtension portal?) without additional workarounds?
- flatpack does not work?
Assignee | ||
Comment 8•28 days ago
|
||
(In reply to John Bieling (:TbSync) from comment #7)
I am trying to get my head around this. Are the changes linked in Comment 5 those that are mentioned here by droidmonkey as being "backdoor implemented it on their snap"?
I did read that thread, and I have no idea what "backdoor implemented it on their snap" refers to precisely. There was nothing done hidden, Canonical carried the patch on their snap package, for way too long because it was complicated to land on Gecko, but it was never anything nobody was aware of, we actively worked with them on it as visible here and on phabricator.
Do I understand the following correctly:
- this change in Firefox snap allows you to use native Messaging on Firefox snap (through the WebExtension portal?) without additional workarounds?
This change is now landed in Gecko, there's no more need for a specific patch for the feature. What remains is just enabling it by default on the Snap. See the review comments on the various patches, I asked whether we could enable it by default but :robwu
was not confident it was a good choice until we had a proper end-to-end test of the feature that is done against the real XDG portal and not the mock we are using in those tests.
Adding those tests will be done in https://bugzilla.mozilla.org/show_bug.cgi?id=1928096 and Nathan (from Canonical) is working on it. Nothing hidden.
- flatpack does not work?
It should work assuming:
- the pref we flip on snap is flipped for flatpak
- the xdg document portal used implements the PR.
To the best of my knowledge, upstream XDG PR has not yet been merged, so only Ubuntu (and maybe derivatives) have a XDG portal that implements the bits required for Native Messaging to work
Assignee | ||
Comment 9•28 days ago
|
||
(it's on beta and nightly, coming to stable in a few days, I've already prepared PRs against firefox-snap repo)
Comment 10•28 days ago
|
||
On the canonical Firefox snap repo I found this:
https://github.com/canonical/firefox-snap/blob/stable/patches/native-messaging-portal.patch
The Thunderbird snap repo does not have it (I am still waiting for feedback from team members, if that is the actual repo behind https://snapcraft.io/thunderbird):
https://github.com/ubuntu/thunderbird/tree/beta/patches
Do we need to add this patch to Thunderbird snap, or is that patch what is now finally landing in gecko?
Could you link me to resources to understand what the XDG portal is? Is it part of mozilla-central or do users need to install it manually?
Assignee | ||
Comment 11•28 days ago
|
||
(In reply to John Bieling (:TbSync) from comment #10)
On the canonical Firefox snap repo I found this:
https://github.com/canonical/firefox-snap/blob/stable/patches/native-messaging-portal.patchThe Thunderbird snap repo does not have it (I am still waiting for feedback from team members, if that is the actual repo behind https://snapcraft.io/thunderbird):
https://github.com/ubuntu/thunderbird/tree/beta/patchesDo we need to add this patch to Thunderbird snap, or is that patch what is now finally landing in gecko?
Could you link me to resources to understand what the XDG portal is? Is it part of mozilla-central or do users need to install it manually?
You're linking stable branch, please look at beta/nightly it should reply to all your comment.
See also the bug you will find the link to the XDG PR on GitHub, it's part of what is required to run snap or flatpak packages and it's a distro level package
Assignee | ||
Comment 12•28 days ago
|
||
So on the snap Thunderbird beta/nightly you should only need the patch that flips the pref like on Firefox and on stable you still need the complete one. But stable moves next Monday so you should just wait a few more days? Then you'll need only the pref change
Reporter | ||
Comment 13•27 days ago
|
||
That is great news. I just tested on 135.0b4 and after setting widget.use-xdg-desktop-portal.native-messaging to 2 (and restarting Thunderbird) it worked!
Assignee | ||
Comment 14•27 days ago
|
||
(In reply to kkapsner from comment #13)
That is great news. I just tested on 135.0b4 and after setting widget.use-xdg-desktop-portal.native-messaging to 2 (and restarting Thunderbird) it worked!
Ok, so it's working as intended then. Thanks for confirming
Assignee | ||
Comment 15•27 days ago
|
||
(In reply to John Bieling (:TbSync) from comment #10)
The Thunderbird snap repo does not have it (I am still waiting for feedback from team members, if that is the actual repo behind https://snapcraft.io/thunderbird):
https://github.com/ubuntu/thunderbird/tree/beta/patches
I'm not sure what kind of feedback you need here, the feature is needed and it has been baking for a very long time on firefox side, there should be no reason not to have it asap on beta, especially since it's going to arrive on stable very soon.
The XDG PR is https://github.com/flatpak/xdg-desktop-portal/pull/705 but for the snap you should not worry, ubuntu distros have the patches applied so it will work
Comment 16•27 days ago
|
||
Nice. I will get in touch with the responsible peers on our side, and we will follow firefox snap and flip "widget.use-xdg-desktop-portal.native-messaging" on thunderbird snap beta and stable!
Thanks for your patience and your explanations. These are a lot of moving parts....
Reporter | ||
Comment 17•25 days ago
|
||
Flatpak (beta) seems to work as well on Ubuntu with the flag set.
Assignee | ||
Updated•20 days ago
|
Assignee | ||
Comment 18•20 days ago
|
||
Assignee | ||
Comment 19•20 days ago
|
||
Assignee | ||
Comment 20•20 days ago
|
||
Assignee | ||
Updated•20 days ago
|
Comment 21•20 days ago
|
||
Thanks, :gerard-majax!
Comment 22•19 days ago
|
||
yes thank you very much!!
Assignee | ||
Comment 23•14 days ago
|
||
All PRs were merged
Updated•14 days ago
|
Comment 24•14 days ago
|
||
"Fixed" is reserved for bugs being resolved by code changes in the tree.
Description
•