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

Profile Swticher not updating after following instructions for installation prompt #95

Open
fergiedrew opened this issue Nov 21, 2023 · 8 comments

Comments

@fergiedrew
Copy link

I installed profile switcher, and followed the instructions for adding the "additional software." I checked the output of which firefox and it said /snap/bin/firefox, so I ran the corresponding script. However, nothing has updated for me, it still reads the same prompt about adding the additional software. I also checked my ~/snap/firefox/common directory and it appears that all the files from what I gather the script installs are there:

Outputs:

ls -a ~/snap/firefox/common:
. .. .cache firefoxprofileswitcher-install .mozilla

ls -a ~/snap/firefox/common/firefoxprofileswitcher-install:
. .. ff-pswitch-connector

ls -a ~/snap/firefox/common/.mozilla/native-messaging-hosts
. .. ax.nd.profile_switcher_ff.json

@pulbhaba
Copy link

pulbhaba commented Nov 21, 2023

This should be a problem with snap. I experienced the same in Ubuntu 22.04.3 LTS(64-bit) after I migrated my firefox installation from PPA to SNAP.

You may need to install flatpak first.
sudo apt-get install flatpak
then set permission for firefox extension to communicate with the system.
flatpak permission-set webextensions ax.nd.profile_switcher_ff snap.firefox yes

This should obviously go past one issue at hand. Then you'll come across another issue with snap-firefox it doesn't pass the extension-id to the profile switcher binary.
log::trace!("Extension id: {}", extension_id.unwrap());
This is the line causing the app to panic. You'll have to compile the binary yourselves after removing the above line if you're trying to fix the issue. If this is not a problem, you're lucky mate.

Finally, put this file in the ~/.config/firefoxprofileswitcher/config.json and make sure to replace your username there.

{
    "browser_profile_dir": "/home/{{username}}/snap/firefox/common/.mozilla/firefox/",
    "browser_binary": "/bin/firefox"
}

@fergiedrew
Copy link
Author

This should be a problem with snap. I experienced the same in Ubuntu 22.04.3 LTS(64-bit) after I migrated my firefox installation from PPA to SNAP.

You may need to install flatpak first. sudo apt-get install flatpak then set permission for firefox extension to communicate with the system. flatpak permission-set webextensions ax.nd.profile_switcher_ff snap.firefox yes

This should obviously go past one issue at hand. Then you'll come across another issue with snap-firefox it doesn't pass the extension-id to the profile switcher binary. log::trace!("Extension id: {}", extension_id.unwrap()); This is the line causing the app to panic. You'll have to compile the binary yourselves after removing the above line if you're trying to fix the issue. If this is not a problem, you're lucky mate.

Finally, put this file in the ~/.config/firefoxprofileswitcher/config.json and make sure to replace your username there.

{
    "browser_profile_dir": "/home/{{username}}/snap/firefox/common/.mozilla/firefox/",
    "browser_binary": "/bin/firefox"
}

Hm, I'm thinking I should just re-install firefox through a PPA. Anything wrong with that? I appreciate your thoroughness by the way!

@atomjack
Copy link

That fix worked for me! I couldn't find the log trace in the source so I didn't need to recompile the extension. I already had flatpak, so all I had to do was do the permission-set command and create the config.json file as directed, restarted firefox, and now the profile switcher works! Thanks @pulbhaba !!!

@pulbhaba
Copy link

This should be a problem with snap. I experienced the same in Ubuntu 22.04.3 LTS(64-bit) after I migrated my firefox installation from PPA to SNAP.
You may need to install flatpak first. sudo apt-get install flatpak then set permission for firefox extension to communicate with the system. flatpak permission-set webextensions ax.nd.profile_switcher_ff snap.firefox yes
This should obviously go past one issue at hand. Then you'll come across another issue with snap-firefox it doesn't pass the extension-id to the profile switcher binary. log::trace!("Extension id: {}", extension_id.unwrap()); This is the line causing the app to panic. You'll have to compile the binary yourselves after removing the above line if you're trying to fix the issue. If this is not a problem, you're lucky mate.
Finally, put this file in the ~/.config/firefoxprofileswitcher/config.json and make sure to replace your username there.

{
    "browser_profile_dir": "/home/{{username}}/snap/firefox/common/.mozilla/firefox/",
    "browser_binary": "/bin/firefox"
}

Hm, I'm thinking I should just re-install firefox through a PPA. Anything wrong with that? I appreciate your thoroughness by the way!

Hope it works mate! this wasted an entire day for me.

@pulbhaba
Copy link

pulbhaba commented Nov 22, 2023

@fergiedrew I've updated a fork of this with the removal of the line
https://github.com/pulbhaba/firefox-profile-switcher-connector/releases

@kasteelharry
Copy link

This should be a problem with snap. I experienced the same in Ubuntu 22.04.3 LTS(64-bit) after I migrated my firefox installation from PPA to SNAP.

You may need to install flatpak first. sudo apt-get install flatpak then set permission for firefox extension to communicate with the system. flatpak permission-set webextensions ax.nd.profile_switcher_ff snap.firefox yes

This should obviously go past one issue at hand. Then you'll come across another issue with snap-firefox it doesn't pass the extension-id to the profile switcher binary. log::trace!("Extension id: {}", extension_id.unwrap()); This is the line causing the app to panic. You'll have to compile the binary yourselves after removing the above line if you're trying to fix the issue. If this is not a problem, you're lucky mate.

Finally, put this file in the ~/.config/firefoxprofileswitcher/config.json and make sure to replace your username there.

{
    "browser_profile_dir": "/home/{{username}}/snap/firefox/common/.mozilla/firefox/",
    "browser_binary": "/bin/firefox"
}

Installing flatpack and this configuration option ended up working for me. I did have to make a symlink between the browser_profile_dir and the .mozilla folder in my user home folder.

@jonathan-avecilla
Copy link

jonathan-avecilla commented Feb 22, 2024

Hi @pulbhaba !, I'm on Ubuntu and trying to solve this. I'm kinda new to Linux but can move around the terminal well and execute some commands, I was wondering if you could tell me how to locate the file to edit this:

"Then you'll come across another issue with snap-firefox it doesn't pass the extension-id to the profile switcher binary.
log::trace!("Extension id: {}", extension_id.unwrap());
This is the line causing the app to panic. You'll have to compile the binary yourselves after removing the above line if you're trying to fix the issue. If this is not a problem, you're lucky mate."

Edit: I'm using snap as well

Have a good day!

@pulbhaba
Copy link

@jonathan-avecilla Hey mate, you can just download the binary and install it. https://github.com/pulbhaba/firefox-profile-switcher-connector/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants