PWAsForFirefox icon indicating copy to clipboard operation
PWAsForFirefox copied to clipboard

Arch Linux firefox package does not turn into PWA

Open Megver83 opened this issue 2 years ago • 6 comments

Description

I want to use the firefox distribution of Arch Linux, so I followed the steps of manual installation from package manager and when launching webapps, they look like this (Instagram webapp):

ff-arch

Instead of (this is using the portable upstream firefox):

firefox

The Arch firefox gets kinda the look and window size of the webapp, but looks like the heavy modifications don't get injected. Also, there is no "Progressive Web App" section in the settings.

Steps to Reproduce

  1. Copy /usr/lib/firefox into ~/.local/share/firefoxpwa/runtime
  2. Create a webapp
  3. Launch it

Environment

  • Operating system: Arch Linux
  • System architecture: x86_64
  • Desktop environment: KDE Plasma 5
  • Installation method: AUR
  • PWAsForFirefox extension version: 1.4.2
  • PWAsForFirefox native version: 1.4.2
  • Firefox version: 102.0.1

Megver83 avatar Jul 20 '22 06:07 Megver83

Does it work if you enable "Always patch runtime and profile" in the extension settings and then re-launch PWA?

filips123 avatar Jul 29 '22 09:07 filips123

Just did it. Nothing changed.

Megver83 avatar Jul 29 '22 18:07 Megver83

You wouldn't happen to be symlinking anything in the runtime would you?

spfanning avatar Jul 30 '22 01:07 spfanning

Maybe there are some problems with permissions? You can try to manually copy files from /usr/share/firefoxpwa/userchrome/runtime/ (just contents of that folder). to ~/.local/share/firefoxpwa/runtime.

Also, can you check logs before that as described here in step 4 to see if they contain "Patching the runtime"?

filips123 avatar Jul 30 '22 11:07 filips123

firefoxpwa-stderr.log firefoxpwa-stdout.log firefoxpwa.log

Here are some log files. I created the webapp with the Arch firefox and then with the upstream one. By comparing them, looks like this is the relevant part:

Missing chrome or resource URL: resource://gre/modules/UpdateListener.jsm
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs
JavaScript error: resource://gre/modules/TerminatorTelemetry.jsm, line 87: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]
JavaScript error: resource://gre/modules/TerminatorTelemetry.jsm, line 87: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]
JavaScript error: resource://gre/modules/TerminatorTelemetry.jsm, line 87: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
Missing chrome or resource URL: resource://gre/modules/UpdateListener.jsm
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs

I also noticed that the config changes made by autoconfig.js do not take effect in the Arch FF. I manually added them but it did not affect too.

Megver83 avatar Aug 01 '22 20:08 Megver83

I tried to reproduce this on Arch with KDE Plasma (inside VM, installed using archinstall), but it works fine for me, so I don't know what could cause this for you. I think those errors in logs are also just some random things from Firefox.

filips123 avatar Aug 04 '22 20:08 filips123

this is using the portable upstream firefox

What does this mean? How do you have firefox installed (the main one)?

  1. Copy /usr/lib/firefox into ~/.local/share/firefoxpwa/runtime

Can you share the exact command you used to copy? I used

$ rsync -r /usr/lib/firefox/ ~/.local/share/firefoxpwa/runtime/
skipping non-regular file "firefox-bin"
$

and everything worked for me: Screenshot_2023-08-10_08-50-55

I'm using XFCE4

My guess would be either something didn't copy right in your "step 1" or there's a problem specific to the "portable firefox from upstream" that you're using. The only "portable firefox" I'm aware of is a Windows application (*.exe).


In my setup I installed Firefox from the main repositories (pacman -S firefox) and I installed the firefox-pwa aur package. I haven't needed to use the "always patch" configuration option.

  1. Copy /usr/lib/firefox into ~/.local/share/firefoxpwa/runtime

If you install the firefox-pwa package from AUR, then you don't need to do this. You can just click the button to install the runtime: Screenshot_2023-08-10_08-48-23

For what it's worth, I had problems when I first set up PWA back in Dec and followed the manual instructions under "Advanced Options" on that setup screen and I resolved it by deleting ~/.local/share/firefoxpwa/runtime/ and just clicking the button to install the runtime. But using rsync as above worked today with a fresh archlinux user profile. It might be I ran into the same issue, but it's since been resolved?

pklapperich avatar Aug 10 '23 13:08 pklapperich

Does anyone still have this issue? If not, I will close this issue soon because I couldn't reproduce it and it doesn't seem to affect many users.

filips123 avatar Jan 24 '24 16:01 filips123

I'll close this issue for the reasons mentioned above.

filips123 avatar Feb 20 '24 14:02 filips123