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 cannot detect the native connector on Ubuntu 23.04 #325

Closed
ghost opened this issue Apr 22, 2023 · 9 comments
Closed

Extension cannot detect the native connector on Ubuntu 23.04 #325

ghost opened this issue Apr 22, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Apr 22, 2023

@filips123 (Sorry for the ping, the bug should be classified as unbreak now if we were using Phabricator.)

Description

Unknown. No logs available.
Strange, since the command line program is working.

Steps to Reproduce

Install PWAsForFirefox and the native connector, on Ubuntu 23.04.

Affected Websites

None, relates to native connector itself.

Environment

  • Operating system: Ubuntu 23.04
  • System architecture: x86_64
  • Desktop environment: GNOME
  • Installation method: DEB
  • PWAsForFirefox extension version: 2.5.0
  • PWAsForFirefox native version: 2.5.0
  • Firefox version: 112.0.1, Mozilla Firefox for Ubuntu, canonical - 1.0
@ghost ghost added the bug Something isn't working label Apr 22, 2023
@ghost ghost changed the title "An unknown error occured" "An unexpected error occured" Apr 22, 2023
@filips123 filips123 changed the title "An unexpected error occured" Extension cannot detect the native connector on Ubuntu 23.04 Apr 30, 2023
@filips123
Copy link
Owner

filips123 commented Apr 30, 2023

Did you see any such popup when first installing PWAsForFirefox and going to the setup page? You would need to accept it to be able to use PWAsForFirefox, as you seem to be using Firefox Snap.

popup

If you didn't see it for some reason or accidentally denied it, you will have to allow it again. Apparently, you can do this "from the privacy settings" but I couldn't find where... Another option is to grant that permission via the command line:

flatpak permission-set webextensions firefoxpwa snap.firefox yes

After you grant the permission, you may need to restart Firefox. Or maybe even better, grant it while Firefox is closed.

You need to install Flatpak for this even though you use Snap, as it's used as an interface to manage xdg-desktop-portal permissions. You can later uninstall it if you do not use it.

Edit: And if you can find where those privacy settings to manage desktop portal permissions are, please let me know...

@mackuz
Copy link

mackuz commented Apr 30, 2023

Did not find that setting in Software center but your recommendation worked for me.

@badlogin
Copy link

badlogin commented May 9, 2023

Same issue on 23.04, but Firefox is installed from PPA and I have not seen any permission pop-ups or settings

@filips123
Copy link
Owner

Can you download Firefox from Mozilla website and check if this also happens there?

@badlogin
Copy link

that tar.gz2 version completes the installation successfully, the version from PPA shows "Mozilla Firefox for Ubuntu, canonical - 1.0", the version from the website is just "113.0 (64-bit)"

@filips123
Copy link
Owner

It seems this might be a bug in Firefox from PPA. I don't know how to fix it.

@Rigel2118
Copy link

Rigel2118 commented May 23, 2023

Did you see any such popup when first installing PWAsForFirefox and going to the setup page? You would need to accept it to be able to use PWAsForFirefox, as you seem to be using Firefox Snap.

popup

If you didn't see it for some reason or accidentally denied it, you will have to allow it again. Apparently, you can do this "from the privacy settings" but I couldn't find where... Another option is to grant that permission via the command line:

flatpak permission-set webextensions firefoxpwa snap.firefox yes

After you grant the permission, you may need to restart Firefox. Or maybe even better, grant it while Firefox is closed.

You need to install Flatpak for this even though you use Snap, as it's used as an interface to manage xdg-desktop-portal permissions. You can later uninstall it if you do not use it.

Edit: And if you can find where those privacy settings to manage desktop portal permissions are, please let me know...

Thanks! I fixed it via command line. I found that this permission prompt does appear in firefox dev, and also with any firefox running on Ubuntu from a USB memory. The only problem appears to be with stable/nightly version of firefox with Ubuntu already installed on a local drive.

@filips123
Copy link
Owner

I'll close this issue because there isn't much I can do. As Firefox from the Mozilla website detects the native connector properly, I think manifests are set up correctly. So, the problem is with specific versions of Firefox that I cannot fix.

Here are steps how you can fix this issue depending on your setup:

If you have other similar problems, it's a good test to check if other addons that use native messaging (KeePassXC, Plasma Integration, etc.) work with your setup. If they also do not work, it's probably a problem with the Firefox version. If they do work, it might be a problem with PWAsForFirefox.

@davidjao
Copy link

davidjao commented Jul 21, 2024

I was able to mostly fix this problem on Ubuntu by adding a few lines to /etc/apparmor.d/usr.bin.firefox:

/usr/libexec/firefoxpwa-connector ixr,
/usr/bin/firefoxpwa ixr,
owner @{HOME}/.local/share/** rw,

I say "mostly" because, although this change was enough to get the PWA that I was interested in (Microsoft Teams) to install, actually running the app still required some command line magic, which I can explain if anyone is interested, but doesn't seem to be related to this particular bug. I am using the mozilla-team PPA for Ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants