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

Opening a web link from another application opens it in a PWA #127

Closed
brendanjones opened this issue Feb 4, 2022 · 10 comments
Closed

Opening a web link from another application opens it in a PWA #127

brendanjones opened this issue Feb 4, 2022 · 10 comments
Labels
bug Something isn't working
Milestone

Comments

@brendanjones
Copy link

Description

When you have a PWA open, opening a web link from another application opens it in a PWA instead of in a new Firefox tab.

Steps to Reproduce

  1. Have both a PWA and Firefox open
  2. Open a link from another application (e.g. Slack)
  3. The link will load in the PWA window

Additional Information

  • Not happening every time I open a link. I haven't managed to isolate the behaviour that defines whether the link loads in the PWA or Firefox, will update here if I do.

Affected Websites

Doesn't seem to matter which URL is loaded, but the PWA is for meet.google.com, Google Meet.

Environment

  • Operating system: MacOS 12.1
  • System architecture: Intel Mac
  • Installation method: Extension > Homebrew
  • PWAsForFirefox extension version: 1.4.0
  • PWAsForFirefox native version:
  • Firefox version: latest, 96.0.3
@brendanjones brendanjones added the bug Something isn't working label Feb 4, 2022
@filips123
Copy link
Owner

Is this "another application" just another PWA or an actual native application?

If it is another PWA, you can probably fix this by enabling "Open out of scope URLs in a default browser" in PWA profile settings, and adding accounts.google.com,apps.google.com (to fix Google SSO, maybe you will also have to add other domains for other PWAs) to "Domains always allowed to be opened in the PWA browser".

If it is a native application, it might happen because Firefox used by PWAs registered itself as the default web browser, overwriting normal Firefox. Maybe you can check in your macOS settings if Firefox is correctly set as a default web browser.

@brendanjones
Copy link
Author

It's Slack, which I believe is an Electron app not an actual native app, but it's not a PWA.

Firefox is indeed set as my native browser since I use Firefox as my daily driver. Maybe what's happening is the Firefox for my PWAs is being chosen to open links instead of my 'real' Firefox? It's odd that it doesn't happen every time, though.

@zoeleu
Copy link

zoeleu commented Mar 20, 2022

Happened to me on Linux, I just set my default browser to /usr/bin/firefox

@filips123
Copy link
Owner

I'm not sure why this happens, but it seems OS thinks system Firefox and Firefox from PWAsForFirefox are the same program. On macOS, this may be solved by #131, but I'm not sure about Linux.

@matteoturini Which desktop environment do you use? Can you check which browsers are available as "web browser handles" with update-alternatives --query x-www-browser and which is set as default xdg-settings get default-web-browser? Unfortunately, there are many ways of registering a default browser on Linux, so the problem might also be somewhere else.

@zoeleu
Copy link

zoeleu commented Apr 2, 2022

I'm not sure why this happens, but it seems OS thinks system Firefox and Firefox from PWAsForFirefox are the same program. On macOS, this may be solved by #131, but I'm not sure about Linux.

@matteoturini Which desktop environment do you use? Can you check which browsers are available as "web browser handles" with update-alternatives --query x-www-browser and which is set as default xdg-settings get default-web-browser? Unfortunately, there are many ways of registering a default browser on Linux, so the problem might also be somewhere else.

It was KDE, and I switched to Budgie, and this never happened again.

@filips123 filips123 added this to the 2.0.0 milestone Jun 30, 2022
@isle9
Copy link

isle9 commented Apr 6, 2023

I've had this problem on pop-os before too, but now I'm on Ubuntu 22.10.

I've made sure that xdg-settings get default-web-browser uses the correct firefox installation.
update-alternatives --query x-www-browser shows:

Name: x-www-browser
Link: /usr/bin/x-www-browser
Status: auto
Best: /usr/bin/firefox
Value: /usr/bin/firefox
Alternative: /usr/bin/firefox
Priority: 40

@filips123
Copy link
Owner

Does it also happen if you try to open such URL with xdg-open?

@isle9
Copy link

isle9 commented Apr 7, 2023

Does it also happen if you try to open such URL with xdg-open?

Nope. It opens in the default firefox if I use xdg-open.

I've tried it on Timeshift which opens firefoxpwa if you:

  1. Go into the app.
  2. Click on the menu in the top-right.
  3. Click on About.
  4. Click on the github link.

@filips123
Copy link
Owner

Is it only in Timeshift or also other applications? I've tried to test this on Ubuntu 22.04, but Timeshift works fine for me.

It's really weird that xdg-settings, xdg-open and update-alternatives all show the default Firefox but Timeshift still opens the PWA version. Maybe there is some other setting for default browser that Timeshift uses where PWA Firefox is set as default? However, it appears Timeshift just uses normal GTK about dialog, so maybe this is hidden somewhere deep in the GTK code.

@isle9
Copy link

isle9 commented Apr 8, 2023

I've had it happen a lot in popOS, but currently only in this specific case in Timeshift which really isn't that big of a deal.
If it starts happening more, I'll post the examples here.

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
Status: Done
Development

No branches or pull requests

4 participants