Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for snap/flatpak distributions of Firefox #80

Closed
allanlaal opened this issue Apr 7, 2022 · 22 comments
Closed

Support for snap/flatpak distributions of Firefox #80

allanlaal opened this issue Apr 7, 2022 · 22 comments
Labels
B:firefox Firefox-specific issues and functionality upstream

Comments

@allanlaal
Copy link

ff2mpv seems to no longer work in Firefox 99

starting from 99 firefox moved to snap, but their migration tool did not copy the native-messaging-hosts/ff2mpv.json (and others?) file.
the profile root that used to be ~/.mozilla is now in ~/snap/firefox/common/.mozilla/

@allanlaal allanlaal added the bug-candidate maybe a bug; not confirmed label Apr 7, 2022
@allanlaal
Copy link
Author

copying ff2mpv.json to ~/snap/firefox/common/.mozilla/native-messaging-hosts/ff2mpv.json did not help

@woodruffw
Copy link
Owner

woodruffw commented Apr 8, 2022

Could you please fill out the entire bug report template? It provides the context I need to help debug this.

For context: I'm running Firefox 99 on Ubuntu LTS (20.04) using the recommended installation, and ff2mpv works correctly for me. snap is still not the recommended way to install Firefox on Linux distributions, because its isolation/sandboxing mechanism causes problems like these.

@allanlaal
Copy link
Author

Could you please fill out the entire bug report template? It provides the context I need to help debug this.

i'll get to it ASAP

@allanlaal
Copy link
Author

snap is still not the recommended way to install Firefox on Linux distributions,

I'm on Ubuntu 22.04, so I am a voice from the future =)

https://news.itsfoss.com/ubuntu-firefox-snap-default/
deb vs snap

@allanlaal
Copy link
Author

@woodruffw is ff2mpv impossible with snap?

Firefox-ESR is still a proper deb package on 22.04, but its only a matter of time till ff2mpv becomes totally useless in Ubuntu ≥20.10 :(

@woodruffw
Copy link
Owner

is ff2mpv impossible with snap?

I don't know if it's impossible, but it's probably more difficult given snap's pseudo-isolation.

I ran into a similar problem while trying to test ff2mpv on Chrome/Chromiuim via snap -- the default native messaging directories weren't respected, and neither were the "isolated" ones.

Looks like this isn't a new problem:

@woodruffw
Copy link
Owner

woodruffw commented Apr 10, 2022

I'm going to follow up on that BMO bug report, since it looks like Mozilla's devs are already aware this this is going to be a problem.

Edit: Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1661935

@woodruffw woodruffw added B:firefox Firefox-specific issues and functionality upstream and removed needs information bug-candidate maybe a bug; not confirmed labels Apr 10, 2022
@oSoMoN
Copy link

oSoMoN commented Apr 11, 2022

FWIW, I tested this extension and the native host connector with https://phabricator.services.mozilla.com/D140803 built in the firefox snap, and I'm happy to report that it works as expected. This is still work in progress, but it is getting closer to a releasable state.

@woodruffw
Copy link
Owner

FWIW, I tested this extension and the native host connector with https://phabricator.services.mozilla.com/D140803 built in the firefox snap, and I'm happy to report that it works as expected. This is still work in progress, but it is getting closer to a releasable state.

That's great news! Thanks for testing that.

It sounds like we might want to add some additional documentation to the wiki when the new LTS fully rolls out, but otherwise that there are no major changes needed to ff2mpv itself. Am I understanding that correctly?

@oSoMoN
Copy link

oSoMoN commented Apr 11, 2022

That's correct, no functional changes should be required, other than a documentation update.

@woodruffw
Copy link
Owner

Excellent. We'll leave this open for now, just so other users who experience breakage during the packaging change have a place to look.

@woodruffw woodruffw changed the title FIX support for Firefox ≥99 (uses snap) Support for snap/flatpak distributions of Firefox Apr 11, 2022
@woodruffw
Copy link
Owner

Pinging back on this: can any users confirm that this extension is working correctly for them with the snap-ified distribution of Firefox in 22.04?

@allanlaal
Copy link
Author

tested with Firefox 100 from snap: does not work

works fine with straight .deb distributions though. firefox-next ppa doesn't use snap 👍

@FallCheetah7373
Copy link

same here for flatpak...it doesn't works

@woodruffw
Copy link
Owner

Another pingback: I'll probably upgrade my own machine when 22.04.1 is released, which will likely be in the next couple of weeks. If it's still broken when that happens, I'll try and fix it...

@oSoMoN
Copy link

oSoMoN commented Aug 2, 2022

This doesn't work in Ubuntu 22.04 out of the box just yet, but is being addressed. Please see the corresponding call for testing. I personally tested ff2mpv and got it working, if you're seeing something different please comment on that thread. Thanks!

@woodruffw
Copy link
Owner

woodruffw commented Sep 13, 2022

I upgraded today, and this is the only command I needed to run to get things working:

flatpak permission-set webextensions ff2mpv snap.firefox yes

(I did need to install flatpak via sudo apt install -y flatpak).

Could someone else in this thread confirm that the above makes the extension work for them? If so, I'm inclined to close this as fixed upstream (albeit in an annoying manner).

@woodruffw
Copy link
Owner

Forgot to mention: I did have to switch to the "beta" channel:

sudo snap refresh firefox --beta

@oSoMoN
Copy link

oSoMoN commented Sep 13, 2022

A couple of comments on this:

  • In theory one should be prompted for permission by their desktop environment (GNOME Shell displays a modal prompt) the first time firefox requests access to a given native application through the portal. Choosing yes means no further action needed, but it could be that other desktop shells haven't implemented that prompt yet, and so the permission defaults to "no".
  • The use of the flatpak command is quite confusing indeed. This is because the permissions database, even though it’s not flatpak-specific (it’s also used for snaps), doesn’t have its own separate management tool yet.
  • As you mentioned, this is not available in a stable version of firefox yet, you'll need to use the snap from the beta or edge channel for now. I'm hoping this will land very soon in stable, but until that happens it's probably premature to mark it fixed.

@woodruffw
Copy link
Owner

Thanks for these comments!

The point about the permission prompt makes sense: I'm using i3wm, which probably doesn't have support for this kind of stuff. It's good to know that the experience should be smoother for most other users.

@woodruffw
Copy link
Owner

This has been working for me with the snap-ified Firefox on Ubuntu 22.04 for the last two weeks, so I'm closing it.

@ugurbolat
Copy link

ugurbolat commented Apr 15, 2023

I upgraded today, and this is the only command I needed to run to get things working:

flatpak permission-set webextensions ff2mpv snap.firefox yes

(I did need to install flatpak via sudo apt install -y flatpak).

Could someone else in this thread confirm that the above makes the extension work for them? If so, I'm inclined to close this as fixed upstream (albeit in an annoying manner).

This doesn't work for firefox 112 with flatpak...

  • copied ff2mpv.json to ~/.var/app/org.mozilla.firefox/.mozilla/native-messaging-hosts
  • changed the path of ff2mpv.py
  • gave a permission: flatpak permission-set webextensions ff2mpv org.mozilla.firefox yes

Maybe it is just solved for only snap` firefox atm

EDIT: made it work according to these instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B:firefox Firefox-specific issues and functionality upstream
Projects
None yet
Development

No branches or pull requests

5 participants