passff-host icon indicating copy to clipboard operation
passff-host copied to clipboard

Incompatible with Firefox/LibreWolf via snap/flatpak (e.g. on Ubuntu 22.04)

Open cmol opened this issue 3 years ago • 30 comments

General information. Describe your environment

  • Versions

    • Operating system: Linux
    • Browser: Firefox (via snap)
    • PassFF: latest
    • Host app: latest
    • OS: Ubuntu 22.04
  • How have you installed the host app? curl from readme.


Describe objectively your problem

Starting with Ubuntu 22.04, Mozilla have asked that Firefox be installed via snap and not deb. This makes it not possible to use the host app as expected, and leads to the error experienced here: https://github.com/passff/passff-host/issues/29

While there are different views on snap, the fact is that many ubuntu users upgrading to 22.04 will be unable to use passff.

As I see it, the following solutions exists:

  • Ask users to install Firefox differently
  • Create a workaround in passff-host
  • Stop using passff

I don't think this is a great situation for anyone, but wanted to track this progress.

cmol avatar Apr 08 '22 13:04 cmol

Thanks, this is definitely useful for future reference.

tuxor1337 avatar Apr 08 '22 21:04 tuxor1337

Probably need to make a snap plug like https://forum.snapcraft.io/t/system-files-under-mozilla-native-messaging-hosts/13627/19 for the native messaging.

mrkschan avatar Apr 22 '22 09:04 mrkschan

Any update on this issue? I've been using passff for a longer time now but it stopped working after the upgrade to Ubuntu 22.04. Is it planned to make passff compatible with the snap version of Firefox (cause Ubuntu does not deliver the usual DEB package anymore)?

sli720 avatar May 03 '22 19:05 sli720

+1, I am affected too and there doesn't seem to be any trivial workaround. If I understand it correctly, strictly confined snaps cannot exec local programs, and there is no way of granting an exception.

tomas-mazak avatar May 04 '22 13:05 tomas-mazak

I messed around with trying to install the snap with --classic or running beta/edge nothing worked well enough so i dumped the snap and pulled the tarball down to a directory while this gets sorted.

sairuk avatar May 06 '22 22:05 sairuk

Hello,

I've just installed a Xubuntu 22.04 and have lose 2 hours to find a workaround for this. This is not a fix but it may interest a few of you.

I've followed this tutorial to switch from snap to apt => https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04 That step worked without any issue.

But even after having done every things correctly, this error continues to appear "ls -> (-1) PassFF failed to execute the host app", after having checked a lot of things, I found this in /var/log/syslog:

... apparmor="DENIED" operation="file_mmap" profile="firefox//lsb_release" name="/usr/bin/python3.10" ...

So an apparmor issue. With the command sudo aa-status, I saw that firefox was in enforce mode. A few binaries are needed to fix that => sudo apt install apparmor apparmor-profiles apparmor-utils

Switching firefox into complain mode:

sudo aa-complain /etc/apparmor.d/usr.bin.firefox

A quick restart of firefox and it finally works.

djoproject avatar Jun 08 '22 13:06 djoproject

Hello,

it looks like there is some movement regarding this issue. See https://ubuntu.com//blog/how-are-we-improving-firefox-snap-performance-part-2 and https://phabricator.services.mozilla.com/D140803

However, I don't understand what exactly this means for the passff-host extension and what needs to be changed or how it can be installed in the future.

Best

mutlusun avatar Jun 16 '22 19:06 mutlusun

Today I had the chance to test this on an Ubuntu 22.04 machine. There is good news: A fix is in the pipeline upstream, there is nothing we can do on our end! (Source: https://forum.snapcraft.io/t/call-for-testing-native-messaging-support-in-the-firefox-snap/31055/9) If you want to test the new fix, upgrade to the Firefox version from the Snap beta channel:

$ sudo snap refresh firefox --beta

If it still doesn't work after the upgrade, make sure to check the permissions using this command line (you might need to sudo apt install flatpak first):

$ flatpak permissions webextensions

If the permissions are set to no, you can change them with this command line:

$ flatpak permission-set webextensions passff snap.firefox yes

You might need to restart Firefox afterwards.

tuxor1337 avatar Aug 22 '22 20:08 tuxor1337

Hm, OK, I upgraded to firefox 104.0b9.

joshua@oilfree ~> flatpak permissions webextensions
Table         Object                       App          Permissions Data
webextensions passff                       snap.firefox yes         0x00
webextensions org.gnome.chrome_gnome_shell snap.firefox yes         0x00

However, passff still doesn't work. It says, "Connection to the host app failed or returned an unexpected result!"

Update: I had to re-install passff-host too. Works now!! :champagne:

jpritikin avatar Aug 22 '22 21:08 jpritikin

@tuxor1337 great news! Not sure if you are just relaying messages, but do you have a sense about when this functionality might land in stable firefox?

cmol avatar Aug 22 '22 21:08 cmol

@cmol No, I don't have a clue.

tuxor1337 avatar Aug 22 '22 22:08 tuxor1337

Just updated to latest stable firefox (104 released today). Did not work. Updated to the beta channel (105.0b1-1) and it works like a charm.

cmol avatar Aug 23 '22 18:08 cmol

Just tested this with Firefox 105.0.1 on Ubuntu 22.04 and it does not work.

% flatpak permissions webextensions
Table         Object App          Permissions Data
webextensions passff snap.firefox yes         0x00

Then I installed the host application again:

curl -sSL github.com/passff/passff-host/releases/latest/download/install_host_app.sh | bash -s -- firefox

Error message is the usual:

[10:56:21] ls -> (-1) PassFF failed to execute the host app

Is there any log that I could check to find out what's wrong in my setup?

vollkorn1982 avatar Sep 29 '22 09:09 vollkorn1982

Just tested this with Firefox 105.0.1 on Ubuntu 22.04 and it does not work.

I think it only works on the beta channel right now. It's not been scheduled for a release yet, so you'd have to change your FF to be on beta.

cmol avatar Sep 29 '22 13:09 cmol

With the current stable Snap version 106 (has been working at least since 106.0.4, current is 106.0.5) of Firefox, this appears to be working again, finally…

gjvoosten avatar Nov 06 '22 16:11 gjvoosten

With the current stable Snap version 106 (has been working at least since 106.0.4, current is 106.0.5) of Firefox, this appears to be working again, finally…

Do you have any settings to make it work? the password i copied is always "undefined" on FF 106.0.5

mrkschan avatar Nov 08 '22 02:11 mrkschan

Do you have any settings to make it work? the password i copied is always "undefined" on FF 106.0.5

I did run:

flatpak permission-set webextensions passff snap.firefox yes

as mentioned earlier in this issue.

gjvoosten avatar Nov 08 '22 07:11 gjvoosten

Do you have any settings to make it work? the password i copied is always "undefined" on FF 106.0.5

I did run:

flatpak permission-set webextensions passff snap.firefox yes

as mentioned earlier in this issue.

I have done that as well and confirmed with below

$ flatpak permissions webextensions
Table         Object App          Permissions Data
webextensions passff snap.firefox yes         0x00

Though, i'm still copying "undefined" from the extension /shrug.

mrkschan avatar Nov 14 '22 01:11 mrkschan

How does this work for flatpak? I'm a bit confused, you guys seem to run snaps and run flatpak permissions? When I have flatpaks I should run ... passff snap.firefox yes. I don't get it working. I got the following output and reinstalled passff-host

flatpak permissions webextensions
Table         Object App                 Permissions Data
webextensions passff org.mozilla.firefox yes         0x00
webextensions passff snap.firefox        yes         0x00

Can someone help? Thanks in advance.

Randalix avatar Nov 17 '22 09:11 Randalix

Hey, I needed to install the passff host to ~/.mozilla/native-messaging-host/ as well as to the snap location of firefox ~/snap/firefox/common/.mozilla/native-messaging-hosts. It does not work with the host application in one of these locations. I don't know what's going on here. I suppose it's a bug in the snap package.

I don't know how this is handled in the flatpak package.

Maybe this helps?

mutlusun avatar Nov 18 '22 08:11 mutlusun

How does this work for flatpak?

it doesn't yet, the ubuntu devs went off on their own for snap and patched support that is not yet deemed fit for master.

refs

  • https://bugzilla.mozilla.org/show_bug.cgi?id=1661935
  • https://github.com/flatpak/xdg-desktop-portal/pull/705

sairuk avatar Nov 18 '22 19:11 sairuk

I had no problem with Ubuntu 22.04 until the last firefox update (122.0). On another computer I had firefox 110.0 and it worked. I updated it to check and I can confirm that updating to 122.0 broke pass.

remi-garcia avatar Jan 25 '24 11:01 remi-garcia

Same than @remi-garcia above. I have been using Ubuntu 22.04 for some time, and it worked like a charm, but Firefox has been updated to 122.0 today, and it does not work anymore.

$ flatpak permissions webextensions
Table         Object App          Permissions Data
webextensions passff snap.firefox yes         0x00

I also reinstalled the host application again, but still doesn't work. What should I do?

anne-pacalet avatar Jan 25 '24 11:01 anne-pacalet

I can confirm that this happens with Firefox 122 on Ubuntu 22.04: Screenshot from 2024-01-25 13-48-37 :disappointed:

gjvoosten avatar Jan 25 '24 12:01 gjvoosten

This is clearly not ideal but it works with an AppImage: https://github.com/srevinsaju/Firefox-Appimage

remi-garcia avatar Jan 25 '24 15:01 remi-garcia

Good to know. Which one have you used ? the beta version ?

anne-pacalet avatar Jan 25 '24 15:01 anne-pacalet

As of version 122, firefox is publishing their own debs! https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions

jpritikin avatar Jan 25 '24 17:01 jpritikin

Good to know. Which one have you used ? the beta version ?

I used the Stable AppImage. But as @jpritikin pointed out, the deb is probably the way to go actually.

remi-garcia avatar Jan 25 '24 19:01 remi-garcia

Thank you for the suggestion. I followed the instructions in the link provided by @jpritikin, and it worked perfectly. I retrieved both my environment and pass.

anne-pacalet avatar Jan 26 '24 07:01 anne-pacalet

Thanks for the suggestion about Firefox providing its own .deb, because going AppImage seems to me to be the wrong direction. But guess what, the latest snap update to 122.0-2.1 appears to fix the issue!

gjvoosten avatar Jan 28 '24 15:01 gjvoosten