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

Firefox stuck on "Loading available logins..." #338

Open
adham-omran opened this issue Dec 20, 2023 · 12 comments
Open

Firefox stuck on "Loading available logins..." #338

adham-omran opened this issue Dec 20, 2023 · 12 comments

Comments

@adham-omran
Copy link

General information

  • OS: NixOS 23.11
  • Browser + version: Firefox 120.0.1 (64-bit)
  • Information about the host app:
    • How did you install it? Installed using Nix's configuration.nix
  • Information about the browser extension:
    • How did you install it? Installed using Firefox extension store
    • Browserpass extension version as reported by your browser: 3.8.0

Exact steps to reproduce the problem

  1. Click on the extension

What should happen?

Show the list of credentials

What happened instead?

Shows "Loading available logins"

Other

This issue does not occur on Chrome.

@erayd
Copy link
Collaborator

erayd commented Dec 20, 2023

  1. Do you have any recursive symlinks in your password store directory tree? I'm wondering if it might be looping while scanning the contents of your store.
  2. What does the CPU usage look like when this happens? Is there a core pegged at 100%?
  3. If you point it at an empty directory (instead of wherever it's currently pointed), does the issue still occur?

@adham-omran
Copy link
Author

  1. No.
  2. None of the cores see any changes.
  3. How can I change where it is pointing?
    Under the Firefox preferences for the addon I find error no such native application com.github.browserpass.native

@maximbaz
Copy link
Member

The error seems to indicate that the Firefox browser was not configured for Browserpass, so it can't locate the native host part. There was a link to how to do it in the issue template 😉 Here it is, please give it a try: https://github.com/browserpass/browserpass-native?tab=readme-ov-file#configure-browsers

@adham-omran
Copy link
Author

The error seems to indicate that the Firefox browser was not configured for Browserpass, so it can't locate the native host part.
@maximbaz

I checked it and there is no documentation for a non-stateful NixOS configuration, I'm assuming the options do the host configuration. You can see this in my Nix flake configuration here and here.

@maximbaz
Copy link
Member

Would creating a file under $HOME/.mozilla also be considered stateful? Browsers support configuring native hosts both via a system-wide path and a user-specific path, so make hosts-firefox-user might be all you need to make it work.

https://github.com/browserpass/browserpass-native/blob/master/Makefile#L461

Let me know if adding that file helps!

@linxOD
Copy link

linxOD commented Dec 21, 2023

I have the same issue with the Chromium Web Browser. It works with Chrome. I ran make hosts-chromium-user from browserpass directory and the syslink was created. At least there was no error.

I installed browserpass-native manually.
version: 3.1.0 linux64

@maximbaz
Copy link
Member

Assuming it's not #326 / browserpass/browserpass-native#93 / browserpass/browserpass-native#82, please file a new issue, the content of issue template might help narrow down the case. With the issues like this, when it works in one browser and not another, the issue is almost certainly in the browser configuration (make hosts-*). Try also both -user and system-wide, it's possible that on your environment one path is for whatever reason not respected by the browser, but another one will be.

@linxOD
Copy link

linxOD commented Dec 21, 2023

I tried -user and system wide. Still not working. Anyway, I might come back to this sometime later.

@adham-omran
Copy link
Author

Would creating a file under $HOME/.mozilla also be considered stateful? Browsers support configuring native hosts both via a system-wide path and a user-specific path, so make hosts-firefox-user might be all you need to make it work.

https://github.com/browserpass/browserpass-native/blob/master/Makefile#L461

Let me know if adding that file helps!

Unfortunately it does not work, make hosts-firefox-user does not work on NixOS since /usr/ does not work like it does in other distros, it shows the following error

'/home/adham/.mozilla/native-messaging-hosts/com.github.browserpass.native.json' -> '/usr/lib/browserpass/hosts/firefox/com.github.browserpass.native.json'
Error: the symlink points to a non-existent location

@maximbaz
Copy link
Member

I see, so Nix package must be installing that json file in some other location. There are two ways to proceed:

The first one is completely manually.
Here's the json file: https://github.com/browserpass/browserpass-native/blob/master/browser-files/firefox-host.json
Take it and put it in $HOME/.mozilla/native-messaging-hosts/com.github.browserpass.native.json.
There's one placeholder %%replace%% inside the json file, replace it with the full path to the browserpass binary.

Alternatively, locate where the Nix package installed the com.github.browserpass.native.json file (there are two, for Chromium and Firefox, make sure to find the correct one), and create the symlink by hand: ln -s /path/to/located/com.github.browserpass.native.json $HOME/.mozilla/native-messaging-hosts/com.github.browserpass.native.json. The Nix package has hopefully done the placeholder replacement, so you don't need to do that part.

Let me know which one works, if any! 🙏

@adham-omran
Copy link
Author

Alternatively, locate where the Nix package installed the com.github.browserpass.native.json file

I was able to find it using rg --files | rg 'com.github.browserpass.native.json' while after I cd /.
It was in /nix/store/6zvqim62fnnncsp6vyyw3g82bbc86rd4-browserpass-3.1.0/lib/browserpass/hosts/firefox/com.github.browserpass.native.json but I copied it instead of symlinking since I don't know if the path will change or not, I'll see if it breaks and copy again.

The Nix package has hopefully done the placeholder replacement, so you don't need to do that part.

It does!

Let me know which one works, if any! 🙏

The second one, if anyone is coming after me, don't forget to also mkdir /home/$USER/.mozilla/native-messaging-hosts/

@dactylroot
Copy link

I had this issue in Mac. The make hosts-firefox-user was attempting to symlink to somewhere other than where browserpass was installed. When I manually linked to the existing json file it began working fine.

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

No branches or pull requests

5 participants