firefox-profile-switcher icon indicating copy to clipboard operation
firefox-profile-switcher copied to clipboard

Extension stop working on Ubuntu

Open galloramiro opened this issue 2 years ago • 23 comments

Extension stop working after snap refresh. Screenshot_20221102_083811 I try running again the shell commands, I try installing the .deb for ubuntu, restarting the device several times and still do not work. What info could I send you to help me fix this? Thanks!

galloramiro avatar Nov 02 '22 11:11 galloramiro

Same here after last snap update on Ubuntu 22.04 Run the snap script and verified the files and configs but the extension is not working (keep asking to complete the setup)

Follow checks after script execution

merlos@system76-pc:~$ BASE_DIR="$HOME/snap/firefox/common"
merlos@system76-pc:~$ MANIFEST_INSTALL_DIR="$BASE_DIR/.mozilla/native-messaging-hosts"
merlos@system76-pc:~$ ls -l /home/merlos/snap/firefox/common/firefoxprofileswitcher-install/ff-pswitch-connector
-rwxr-xr-x 1 merlos merlos 2057552 mar 14  2022 /home/merlos/snap/firefox/common/firefoxprofileswitcher-install/ff-pswitch-connector
merlos@system76-pc:~$ cat /home/merlos/snap/firefox/common/.mozilla/native-messaging-hosts/ax.nd.profile_switcher_ff.json

{
    "allowed_extensions": [
        "[email protected]"
    ],
    "description": "Profile Switcher for Firefox",
    "name": "ax.nd.profile_switcher_ff",
    "path": "/home/merlos/snap/firefox/common/firefoxprofileswitcher-install/ff-pswitch-connector",
    "type": "stdio"
}

gmellini avatar Nov 03 '22 08:11 gmellini

Upon debugging the extension it seems that the native application is no longer found:

grafik

The ax.nd.profile_switcher_ff.json is placed where it should be - I hadn't had any success in debugging further on.

legroeder2k avatar Nov 03 '22 09:11 legroeder2k

Same here. Not working anymore :( It asks for setup, although I already run the script

lucianolev avatar Nov 07 '22 13:11 lucianolev

I believe it's worth mentioning that I have the same issue with firefox (very freshly) installed from the PPA ppa:mozillateam/ppa, not from the snap store.

Wonskcalb avatar Nov 07 '22 14:11 Wonskcalb

I never thought I would get the chance to say this.

+1

Ryiski avatar Nov 09 '22 16:11 Ryiski

Same problem here, with snap.

leorjorge avatar Nov 10 '22 09:11 leorjorge

Same problem, after ugrading to Firefox 106.0.5 on Ubuntu 22.04 using snap.

morgaraf avatar Nov 11 '22 17:11 morgaraf

Ubuntu recently changed how they external programs can connect to the browser, breaking this extension.

I would like to fix it, however I have currently failed to locate any documentation about what exactly they have changed.

There was a talk/presentation about the changes at the Ubuntu 2022 Summit on Nov 9th: https://events.canonical.com/event/2/contributions/79/ which should hopefully reveal some more details about the changes. Unfortunately, the talk was not livestreamed but it should have been recorded. Hopefully the organizers post the recording online soon.

Leaving some other links here for myself as I continue to do more research into this:

  • https://github.com/flatpak/xdg-desktop-portal/issues/655#issuecomment-1308451627
  • https://ubuntu.com/blog/what-to-expect-at-the-ubuntu-summit-2022
  • https://github.com/flatpak/xdg-desktop-portal/pull/705/files

null-dev avatar Nov 13 '22 04:11 null-dev

+1 using snap

dap39 avatar Dec 20 '22 11:12 dap39

Same here with Fedora 37, installed through dnf (.rpm), stopped working sometime during this month!

Skaldebane avatar Jan 04 '23 21:01 Skaldebane

Same issue Fedora 37, installed through dnf, any Firefox version above 106.0.4 doesn't works.

donCESAR12345 avatar Mar 17 '23 14:03 donCESAR12345

has anyone found a fix (besides using about:profiles), i am experiencing the same behaviour on nobara (fedora spinoff)

NL-TCH avatar Jul 31 '23 18:07 NL-TCH

on Windows it just worked fine :(

NL-TCH avatar Jul 31 '23 18:07 NL-TCH

@NL-TCH If we found a fix, it would've been posted here

For now using about:profiles is the way to go 🤷🏻‍♂️

Skaldebane avatar Jul 31 '23 21:07 Skaldebane

@Skaldebane there is a workaround for as long as ~10 months, but it was in the connector repo: take a look at the workaround in the repo of the connector, this worked for me https://github.com/null-dev/firefox-profile-switcher-connector/issues/14

NL-TCH avatar Oct 17 '23 17:10 NL-TCH

@NL-TCH Thank you very much for sharing!!

Skaldebane avatar Oct 17 '23 17:10 Skaldebane

Thanks @NL-TCH for sharing, however this workaround does not seem to fix the issue in my case (snap ffox 118.0.2 ubuntu 22.04). Debugging provides basically the same answers as those reported by @saschahuck (which are indeed different than those in the debug message in https://github.com/null-dev/firefox-profile-switcher-connector/issues/14. Maybe there is a way to adapt that workaround also to this case, but I have been unsuccessful up to this point.

labachevskij avatar Oct 20 '23 11:10 labachevskij

@labachevskij I believe it's because you're using snap, in which case the config file has to be created somewhere the snap version actually looks at (or maybe giving permission to that file is enough? idk honestly). I believe the same issue would happen with flatpak as well.

Skaldebane avatar Oct 20 '23 15:10 Skaldebane

@labachevskij Based on this link: https://askubuntu.com/questions/1228911/how-to-find-config-files-for-snap-apps, you shall find the folder where firefox resides within /snap and put stuff in the .config folder that's right there.

Because of sandboxing, flatpaks and snaps can only see stuff within the virtual environments they run inside, which is why you have to modify the sandbox itself, not the global configs.

Skaldebane avatar Oct 20 '23 15:10 Skaldebane

@Skaldebane: thanks for the tips! I tried to put the json in ~/snap/firefox/3253/.config and in ~/snap/firefox/common/.config with no success. But I might be doing something wrong. At the same time, the error message when debugging is consistent with issues with native messaging hosts in snaps (and flatpaks), as discussed by @null-dev. Unfortunately this goes way beyond my understanding. I will try again sometimes in the future and in the meantime I will keep my about:profiles page always close in the bookmarks bar

labachevskij avatar Oct 20 '23 17:10 labachevskij

@labachevskij ooh yeah I forgot one very little but important detail: when using snap or flatpak, the firefox executable doesn't exist in /usr/bin/firefox, but inside the sandboxed environment!

Normally, you should never attempt to link to the executable within the sandbox, and shall instead run flatpak run app_id / whatever it is for snap. Idk if providing the path to those commands with the relevant arguments is gonna work tho, depends on how the extension reads that string.

Skaldebane avatar Oct 20 '23 17:10 Skaldebane

I had already used /snap/firefox.../firefox as executable. Not sure if that is allowed, but it does not work. There are a lot of layers in this issue: snap, native messages, firefox, extensions. A bit too much to chew, at least for me, without some good documentation and quite some work :-)

labachevskij avatar Oct 20 '23 18:10 labachevskij

Hey everyone, any progress on this?

zhengliw avatar Jan 18 '24 16:01 zhengliw