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

Extension does not detect the connector on NixOS #509

Open
bashfulrobot opened this issue May 30, 2024 · 18 comments
Open

Extension does not detect the connector on NixOS #509

bashfulrobot opened this issue May 30, 2024 · 18 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@bashfulrobot
Copy link

Description

I am installing the extension for the first time on NixOS. I can complete the first two steps when following the wizard, but there is no obvious way to move on to the "Runtime Installation" step. I can see the binaries on my system, and I had no failures in my NixOS rebuild.

I use Home Manager to install/manage Firefox, but your Nix instructions use the regular module. So, I am wondering if that is the issue.

Extension Page
image

Binaries
image

Nix Config File
image

Steps to Reproduce

  1. Install the FF extension
  2. Click on the extension to follow the wizard
  3. Rebuild with my nix config
  4. stuck at the second step

Environment

OS: NixOS 24.11.20240524.bfb7a88 (Vicuña) x86_64
Kernel: Linux 6.6.31
Shell: bash 5.2.26
DE: Gnome 46.1
WM: Mutter (Wayland)
Mozilla Firefox 126.0
Extension Version 2.12.1
firefoxpwa 2.12.0

Thank you!

@bashfulrobot bashfulrobot added the bug Something isn't working label May 30, 2024
@filips123
Copy link
Owner

Yeah, home manager might be the problem. I found this config that may work with HM, but I haven't tested it. If it doesn't work, maybe package maintainers of the NixOS package can help, as I don't have experience with Nix.

@filips123 filips123 added the help wanted Extra attention is needed label Jun 2, 2024
@Sikeen
Copy link

Sikeen commented Jun 2, 2024

I have also not been able to get past the Connector Installation, even before starting to use HomeManager. Tried the other config as well.

@EmptyVisual
Copy link

Yeah, home manager might be the problem. I found this config that may work with HM, but I haven't tested it. If it doesn't work, maybe package maintainers of the NixOS package can help, as I don't have experience with Nix.

this is not specific to nixos by the way. I'm using Arch Linux with firefox installed from the main repository and I also cant get past the Connector Installation page.

@bashfulrobot
Copy link
Author

Yeah, home manager might be the problem. I found this config that may work with HM, but I haven't tested it. If it doesn't work, maybe package maintainers of the NixOS package can help, as I don't have experience with Nix.

Yeah, I had a look at that link. But what that's doing is installing the extension declarative.

What I did is I just installed it through the traditional means. So it's not really applicable. (I think).

Plus, I saw there's another comment on this thread that this is happening on arch as well. Which removes the home manager issue from the equation regardless.

@gabenasci
Copy link

I'm having the same problem with Fedora 40, can't get past "Connector installation". I tried installing both from packagecloud and the .rpm package.

@bashfulrobot
Copy link
Author

Seems like this is a larger issue and appears not to be platform specific. 🤔

@EmptyVisual
Copy link

Yeah, home manager might be the problem. I found this config that may work with HM, but I haven't tested it. If it doesn't work, maybe package maintainers of the NixOS package can help, as I don't have experience with Nix.

this is not specific to nixos by the way. I'm using Arch Linux with firefox installed from the main repository and I also cant get past the Connector Installation page.

My issue on Arch was because I was running the Firefox application through Flatpak (so may be a different issue from the original issue posted here). There is no native host messaging set up for flatpaks currently which was why the PWA connector was not able to communicate. I swapped to Firefox through pacman through the Arch repo and it worked. Associated flatpak xdg-desktop-portal bug

@filips123
Copy link
Owner

Yeah, if you are using Flatpak (or Snap), native messaging won't work. Otherwise, except possible problems with NixOS/HomeManager, it should work fine.

@AchyParts
Copy link

I had this issue when installing on Mac using Homebrew.

@filips123
Copy link
Owner

On macOS, you also need to link the manifest, as described in the caveats section. It should be something like this:

sudo mkdir -p "/Library/Application Support/Mozilla/NativeMessagingHosts"
sudo ln -sf "$HOMEBREW_PREFIX/opt/firefoxpwa/share/firefoxpwa.json" "/Library/Application Support/Mozilla/NativeMessagingHosts/firefoxpwa.json"

@Sikeen
Copy link

Sikeen commented Jun 30, 2024

I have also not been able to get past the Connector Installation, even before starting to use HomeManager. Tried the other config as well.

I don't use the flatpak btw

@AchyParts
Copy link

On macOS, you also need to link the manifest, as described in the caveats section. It should be something like this:

sudo mkdir -p "/Library/Application Support/Mozilla/NativeMessagingHosts"
sudo ln -sf "$HOMEBREW_PREFIX/opt/firefoxpwa/share/firefoxpwa.json" "/Library/Application Support/Mozilla/NativeMessagingHosts/firefoxpwa.json"

I think I accidentally separated the last line of code before, it worked now.

@filips123
Copy link
Owner

So, I think the only remaining issue here is when using NixOS. Problems with Flatpak and Snap are already known and don't need to be additionally reported, and if anyone still has problems on other systems, please create a new issue.

Now, back to the NixOS issue. Maybe @camillemndn or @pasqui23 can help, as they are the maintainers of the package and probably know Nix better than me.

@filips123 filips123 changed the title Cannot get past "Connector Installation" - No buttons or way to advance. Extension does not detect the connector on NixOS Jul 10, 2024
@pasqui23
Copy link

Unfortunately I cannot replicate your problem

@camillemndn
Copy link
Contributor

Hi, I think currently firefoxpwa only supports system-wide Firefox and not Home Manager. I suppose in your case the Home Manager version of Firefox, without PWAs, might take precedence over your Firefox with PWAs. Have you tried which firefox to see whether firefoxpwa appears in the Nix Store Path?

@pasqui23
Copy link

pasqui23 commented Jul 12, 2024

maybe try add

home.packages = [pkgs.firefoxpwa];
programs.firefox.nativeMessagingHosts=[pkgs.firefoxpwa];

@filips123 filips123 moved this to On Hold in PWAsForFirefox Aug 4, 2024
@Granitosaurus
Copy link

Granitosaurus commented Aug 28, 2024

does the extension have debug logs or something to trace what could be missing?

I've managed to debug this through trial an error and basically it has to be installed exactly as described in the instruction manual and use nix system program.firefox.enable = true and firefoxpwa has to be under system not user packages. This is not ideal but works!

@Rodrigodd
Copy link

In Arch Linux, I was able to get the extension to work by copying the file from /usr/lib/mozilla/native-messaging-hosts/firefoxpwa.json to ~/.mozilla/native-messaging-hosts/:

sudo cp /usr/lib/mozilla/native-messaging-hosts/firefoxpwa.json ~/.mozilla/native-messaging-hosts/

I did that based on the paths described here, but not sure why the globally-visible paths weren't working.

@filips123 filips123 added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: On Hold
Development

No branches or pull requests

10 participants