After clicking on a link that opens in Firefox, when you return to the PWA there's only a blank page
Description
Under Ubuntu Linux using apt install of Firefox, if you click a link in your PWA for something that should not open in the PWA (something that SHOULD open in Firefox), when you return to your PWA you see nothing but a blank page. You PWA site no longer displays.
Steps to Reproduce
Install the apt install of Firefox in Ubuntu 24.04 (this system has had snaps removed, so it only supports apt and flatpaks. This problem MAY also occur in the snap version but I have no way to try it).
Install the PWAsForFirefox addon and create a PWA for a specific site.
Scroll through the site and left-click on a link that is external to the site you are on. It should open in Firefox (there may be something you need to configure to make that happen, I don't recall).
Go back to your PWA by clicking on its icon in the dock. You will see nothing but the top menu bar and below that a dark gray page (or whatever color your theme uses for a blank page). The only ways I have found to recover are to close and reopen the PWA (which loses your place on the page) or to click the "hamburger" button, select sSettings, and then when the settings page appears you can close it and then you will be back where you were (no blank page).
Additional Information
What is really strange is you can avoid the problem by middle-clicking the mouse on the link. If you do that then it opens the link in Firefox and does not go to a blank page in your PWA. But, since you typically use left-clicking to launch a link in EVERY other program, most people have developed a "muscle memory" to left click everything. I cannot get out of the habit of left-clicking to launch a site in a PWA.
If a left click would simply take the same action as a middle click the problem would be solved.
Also, this is a relatively recent issue, everything worked as it should when I first installed your addon, probably right around the start of 2025 give or take a month or two.
Toggling the "Open out-of-scope URLs in a default browser" setting off and back on, as suggested in https://github.com/filips123/PWAsForFirefox/issues/668 did not work.
Affected Websites
- Any Mastodon instance
- Any other site I have tried
Environment
- Operating system: Ubuntu 24.04
- System architecture: Dell Optiplex (IBM based)
- Desktop environment: Gnome (Ubuntu default)
- Installation method: Firefox: apt PWAsForFirefox: Firefox addons.
- PWAsForFirefox extension version: 2.14.1
- PWAsForFirefox native version: Can't find in settings
- PWAsForFirefox runtime version: Can't find in settings
- Firefox version: 137.0
I'm seeing the same thing in a fairly different environment:
- Operating system: Arch
- System architecture: x86-64
- Desktop environment: Niri
- Installation method: Arch
- PWAsForFirefox extension version: 2.14.1
- PWAsForFirefox native version: 2.14.1
- PWAsForFirefox runtime version: 137.0.1
- Firefox version: 138.0
I am seeing the same issue as well on Windows. Given multiple user reports, this seems to be a widespread issue across multiple users now:
- Operating system: Windows 11
- System architecture: x86_64 (Asus Zephyrus)
- Desktop environment: N/A (Windows default desktop environment)
- Installation method: Firefox: installer from Mozilla; PWAsForFirefox: Firefox Add-ons
- PWAsForFirefox extension version: 2.14.1
- PWAsForFirefox native version: 2.14.1
- PWAsForFirefox runtime version: 137.0.1
- Firefox version: 137.0.2 Thanks for letting us know about the middle click trick! On a laptop trackpad, I can do Ctrl + Click and this seems to work successfully in avoiding the blank screen for now. This is an issue across all of my PWAs.
I also tried turning on and off "Open out-of-scope URLs in a default browser" but it didn't fix it for me either.
Still the same issue here as well, Windows 11, latest public release.
- Operating system: Windows 11
- System architecture: x86_64 (i5 12400f)
- Desktop environment: N/A (Windows default desktop environment)
- Installation method: Firefox: installer from Mozilla; PWAsForFirefox: Firefox Add-ons
- PWAsForFirefox extension version: 2.14.1
- PWAsForFirefox native version: 2.14.1
- PWAsForFirefox runtime version: 139.0.4
- Firefox version: 139.04
Can you please check if the issue happens in a fresh web app profile? I still can't reproduce it myself...
I created a new Profile, then created a new App within that profile. The app in question is Google Messages. Unfortunately, the same results occurred. When a link is clicked in a message, the link opens in the default browser (not the App), and a separate Null window opens. The Null window is completely blank. It is the Null window that either needs to not open, or should close immediately after opening. I've attempted to create a script to run through Tampermonkey, which would close the Null window. But, I have not succeeded at that. I am a novice on that kind of scripting.
Here are the profile settings on the original App
And here are the profile settings on the new App
Browser version of PWA App
Browser version of default Firefox browser (the one that is opening the clicked links)
For my computer operating system, I am running Windows 11 Professional 24H2, build 26100.4652.
Thanks for your continued help!
Coming from #668, I can also confirm that the problem exists with a new profile.
My settings are the same as shown by @mstromboli, except that I have also enabled the Show browser tabs and enable using multi-tabbed web apps option.
I discovered something today while trying to resolve this annoying null/blank window phenomenon... I was actually able to get it to stop opening the unnecessary window when clicking on a link that opens in the default browser. This involved a few toggling efforts with the settings.
- Uncheck "Open out-of-scope URLs" and checking "Force links into the current tab", then refreshing app. Click on weblink, and it will open a new window with the link you just clicked.
- Check "Open out-of-scope URLs", then refresh app. Click on weblink
- Now, select "Do not change link behavior", while keeping "Open out-of-scope URLs" checked. Then refresh app and click on weblink.
At some point, it seems to remember and then causes the unnecessary window from opening. And the clicked weblink in the PWA opens the link in the default Firefox browser
These are my resulting settings after the trial-and-error of toggling settings.
There's some weird behavior but I confirm @mstromboli workaround does the trick!