filips123 / PWAsForFirefox

A tool to install, manage and use Progressive Web Apps (PWAs) in Mozilla Firefox
https://pwasforfirefox.filips.si
Mozilla Public License 2.0
2.3k stars 52 forks source link

PWAs close first time opening PWA - relative URL without a base #572

Open spoorun opened 1 month ago

spoorun commented 1 month ago

Description

During any given session, I open a PWA and it momentarily opens than closes If I open it a second time (from the menu or app icon but not the command line) it opens correctly This happens whether the PWA is opened from the command line, the KDE menu, or clicking an icon

When opened from the command line, the following error is given:

/usr/bin/firefoxpwa site launch 01J96HRTE3XC6AW2AQBEFMI7MNMP --protocol %u error: invalid value '%u' for '--protocol [<PROTOCOL>]': relative URL without a base For more information, try '--help'.

If I remove "%u" from the .desktop file the issue does not occur and the PWA opens correctly first time

Steps to Reproduce

  1. Create a PWA
  2. Restart the system (the error only occurs after a restart not when the PWA has just been installed)
  3. Launch the PWA from the menu or icon [It flashes up briefly then fails]
  4. Launch again [It launches correctly]

OR

  1. Create a PWA
  2. Restart the system (the error only occurs after a restart not when the PWA has just been installed)
  3. Launch the PWA from the command line [error is shown:[ (error: invalid value '%u' for '--protocol []': relative URL without a base) ]

Workaround

Remove "%U" from the .desktop file for the PWA The app starts correctly from menu, icon or commandline

Affected Websites

All

Environment

First occurred at least 6 months ago

filips123 commented 1 month ago

That may be a KDE bug. %u should be replaced with the URL when launching as a protocol handler, or be empty when launching normally. But I've tried to reproduce it on Manjaro with KDE in a VM and it works fine for me...

wroyca commented 1 week ago

I can confirm that this also happens with GNOME on Fedora 41.