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

UserChrome modifications are not always copied when copying is not forced #165

Open
Nerpson opened this issue Jun 8, 2022 · 5 comments
Open
Labels
bug Something isn't working could not reproduce This issue could not be reproduced help wanted Extra attention is needed

Comments

@Nerpson
Copy link

Nerpson commented Jun 8, 2022

Since last update, when I try to open any PWA from Windows' start menu, it just opens the Firefox used for PWAs.
image
image

I already tried to reinstall both the extension and the software, without success.

@filips123
Copy link
Owner

filips123 commented Jun 8, 2022

Please check what Windows shows as a created and last modified date/times for C:\Program Files\FirefoxPWA\userchrome\profile\chrome\pwa\chrome.jsm and for %APPDATA%\FirefoxPWA\profiles\00000000000000000000000000\chrome\pwa\chrome.jsm (replace zeros with your profile ID if your PWA is not in a default profile). Also, please check if these two files differ in any way.

Because it seems that the program does not detect properly that a file has been modified so it does not copy a fix (see also #154). You should be able to fix it by enabling "Always patch runtime" in the extension settings, but first please check what I said above because I need that information for a proper fix.

@Nerpson
Copy link
Author

Nerpson commented Jun 8, 2022 via email

@filips123 filips123 added the bug Something isn't working label Jun 8, 2022
@filips123 filips123 moved this to To Do in PWAsForFirefox Jun 8, 2022
@filips123
Copy link
Owner

filips123 commented Jun 8, 2022

I don't know why this happened and how to fix it. Basically, PWAsForFirefox has all code necessary to modify Firefox stored in C:\Program Files\FirefoxPWA\userchrome (on Windows) or /usr/share/firefoxpwa/userchrome (on Linux). This code is updated by the installer/Linux package, and copied to %APPDATA%\FirefoxPWA\runtime (code from runtime dir) and %APPDATA%\FirefoxPWA\profiles\PROFILE-ID (code from profile dir) when you launch a PWA.

I implemented some checks that get last modified datetime of userchrome/profile/chrome/pwa/chrome.jsm both in source and target directory and only copy files (here and here) when they are different. This should work fine because that file contains version info, so when a new version is released and downloaded (by the installer/package), the last modified date will also be newer, and PWAsForFirefox will copy all files to the correct directories. This way, files should only be copied the first time a PWA is launched after an update (well, the first time for each profile).

However, something doesn't work and I'm not sure what... It appears userchrome/profile/chrome/pwa/chrome.jsm has been copied, but some other files (specifically, userchrome/runtime/_autoconfig.cfg and userchrome/profile/chrome/pwa/boot.jsm, which contain a fix for Firefox 101.0) haven't been. But because userchrome/profile/chrome/pwa/chrome.jsm has been copied, PWAsForFirefox thinks all other files have also been copied and doesn't actually copy them (unless copying is forced with that option in the extension).

First I thought it might just be some random issue, but considering at least 4 people have this issue, it's probably some actual problem. However, I cannot reproduce it. If anyone knows what this might be, I will appreciate any help.

@filips123 filips123 added the help wanted Extra attention is needed label Jun 8, 2022
@Nerpson
Copy link
Author

Nerpson commented Jun 17, 2022

I saw in the issue mentioned above that the OP has installed an extension just before. Now it reminds me that I also did. The extension was EditThisCookie2.
Hope it helps

@filips123
Copy link
Owner

Thanks for trying to help, but it's probably just a coincidence. I don't think the extension could affect something like this.

@filips123 filips123 changed the title PWAFirefox opens a blank window when starting a PWA. UserChrome modifications are not always copied when copying is not forced Jun 25, 2022
@filips123 filips123 moved this from To Do to On Hold in PWAsForFirefox Jun 25, 2022
@filips123 filips123 added the could not reproduce This issue could not be reproduced label Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working could not reproduce This issue could not be reproduced help wanted Extra attention is needed
Projects
Status: On Hold
Development

No branches or pull requests

2 participants