Brave installable web sites (Progressive Web App) are garbage collected unbeknowst to the user
Describe the bug
Brave installable web sites (Progressive Web App) are garbage collected unbeknowst to the user.
Steps To Reproduce
Steps to reproduce the behavior:
- Go to any installable website (i.e. a website exposing a manifest.json so that browsers that support it will offer the user to install.
- Install the app / website.
- After some time (for me it happened within a few days or weeks, with a few reboots) the web apps / PWAs will be garbage collected. That is, they won't feature anymore in one's DE application launcher, and won't be callable outside of
brave://apps/.
Expected behavior
Once installed, unless manually uninstalled, PWAs should persist for as long as the browser that installed them (i.e. Brave).
Screenshots
None needed I think.
Additional context
I mentioned this problem on https://discourse.nixos.org/t/chromium-based-installed-apps-pwa-sometimes-accidentally-garbage-collected/35700/9 and @jtojnar mentioned a promising fix used for flaptaks.
Notify maintainers
@nasirhm @JeffLabonte @rht @uskudnik
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.00 MiB download, 0.00 MiB unpacked):
/nix/store/kajzlkh8kydmflf8ir8iid9ig0zrd90n-nix-info
copying path '/nix/store/kajzlkh8kydmflf8ir8iid9ig0zrd90n-nix-info' from 'https://cache.nixos.org'...
- system: `"x86_64-linux"`
- host os: `Linux 6.6.2, NixOS, 24.05 (Uakari), 24.05pre553283.8cfef6986adf`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.1`
- channels(root): `"home-manager, nixos, nixpkgs"`
- channels(hades): `""`
- nixpkgs: `/home/hades/.nix-defexpr/channels/nixpkgs`
Priorities
Add a :+1: reaction to issues you find important.
The problem might be that the CHROME_WRAPPER environment variable in /opt/brave.com/brave/brave-browser contains the absolute path:
export CHROME_WRAPPER="`readlink -f "$0"`"
I might be wrong, but I believe that this is used in the exec line of the PWAs .desktop files. So any updates with new versions or hashes of brave breaks those paths. Manually editing the exec line in those desktop files to use the relative brave app within the current search paths is overwritten and reverted when the PWAs update, again breaking those paths after the next brave package update.
The chrome package has:
--set CHROME_WRAPPER "google-chrome-$dist" \
So maybe the brave package should do something similar and just use the relative application name as opposed to the absolute path?
The chrome package has:
--set CHROME_WRAPPER "google-chrome-$dist" \So maybe the
bravepackage should do something similar and just use the relative application name as opposed to the absolute path?
Thank you for your PR! Lovely