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

PWAs just open a new firefox window #395

Closed
MaskMan191 opened this issue Sep 6, 2023 · 23 comments
Closed

PWAs just open a new firefox window #395

MaskMan191 opened this issue Sep 6, 2023 · 23 comments
Labels
bug Something isn't working

Comments

@MaskMan191
Copy link

Description

Whenever I open a PWA that I've made, it just opens a new, normal firefox window.

Steps to Reproduce

  1. open a PWA

Additional Information

Affected Websites

  • ...
  • ...

Environment

  • Operating system: Windows 10 Professional
  • System architecture: x64?
  • Desktop environment: N/A
  • Installation method: MSI
  • PWAsForFirefox extension version: current
  • PWAsForFirefox native version: current
  • PWAsForFirefox runtime version: current
  • Firefox version: current
@MaskMan191 MaskMan191 added the bug Something isn't working label Sep 6, 2023
@Dolyfin
Copy link

Dolyfin commented Sep 8, 2023

I have the same issue. Used to work with youtube music fine. Now its just a new firefox window.

@filips123
Copy link
Owner

This is probably duplicate of #388, You can run "Update web apps" from the extension settings to apply the fix.

@MaskMan191
Copy link
Author

This is probably duplicate of #388, You can run "Update web apps" from the extension settings to apply the fix.

This is not a duplicate of #388 as I updated to FireFox 117 well before my PWAs stopped working and every update and fix I've tried (including that one) does not work.

@MaskMan191
Copy link
Author

MaskMan191 commented Sep 11, 2023

Did not mean to close, sorry, I am not used to GitHub's UI.

@filips123
Copy link
Owner

filips123 commented Sep 12, 2023

Does it work if you install a new web app into a new profile?

Also, please follow these steps to obtain native and runtime logs and provide them here.

@ggplayer0
Copy link

ggplayer0 commented Sep 13, 2023

I have the exact same problem: A regular, vanilla-looking Firefox window opens with a new tab every time I try to open a web app. After some testing, this bug seems to occur after choosing "Reinstall runtime" in the extension settings. (Maybe this has to do with originally using the .msi file to install PWAsForFirefox? It seems like the profiles are corrupted, idk.)

A fix/workaround that works for me is to create a new profile, and use that for web apps instead of the default one.

After "removing" the Default profile (which apparently only clears its web apps and data), web apps installed through the Default profile now open a window with PWAsForFirefox's custom layout... but the entire page is blank, labelled "New Tab", and I cannot access any pages, including the settings. Neither reinstalling the extension, nor reinstalling manually with the .msi file, nor choosing "Update Web Apps" fixes this problem.

I've attached a runtime log of the Default profile before I "removed" it. I have not been able to open developer tools in it after clearing it.
console-export-2023-9-12_19-42-15.txt

@DasBabyPixel
Copy link

Same problem here, creating new profiles does not help in my case

@filips123
Copy link
Owner

Please try to launch your web app from console with:

firefoxpwa site launch SITE-ID -- --jsconsole

You can get the site ID with:

firefoxpwa profile list

This should display runtime logs, regardless if startup is broken.


You can try to remove chrome directory from each of web app profiles, and files _autoconfig.cfg and defaults/pref/autoconfig.js from the runtime directory. You can see where these directories are here.

@DasBabyPixel
Copy link

Problem still there
image
image

@MaskMan191
Copy link
Author

MaskMan191 commented Sep 14, 2023

Please try to launch your web app from console with:

firefoxpwa site launch SITE-ID -- --jsconsole

You can get the site ID with:

firefoxpwa profile list

This should display runtime logs, regardless if startup is broken.

You can try to remove chrome directory from each of web app profiles, and files _autoconfig.cfg and defaults/pref/autoconfig.js from the runtime directory. You can see where these directories are here.

Still happening with command line for me as well
image

@filips123
Copy link
Owner

Can you send the content of _autoconfig.cfg and defaults/pref/autoconfig.js inside your runtime directory, and chrome/pwa/boot.jsm and chrome/pwa/chrome.jsm inside your web app profile directory?

@HeatherComputer
Copy link

Can confirm I had this after updating, choosing update web apps did not fix it, using a new profile did. To avoid losing my data though, I managed to fix it with always patch runtime and profile enabled - this fixed it and all apps remained fixed even after disabling this option.

@filips123
Copy link
Owner

filips123 commented Sep 15, 2023

Yeah, this makes sense. I thought "Update all web apps" will also re-patch the runtime, but it doesn't. So, if anyone else has this problem, try enabling "Always patch runtime and profile" and launch web apps. You can later disable it.

I still don't know why runtime isn't automatically patched when needed for some users, but that is probably #165.

@HeatherComputer
Copy link

Yeah, that makes sense - so question is, what does always patch runtime and profile do that update all web apps doesn't?

@filips123
Copy link
Owner

It always calls runtime.patch (which copied some files to runtime directory) and profile.patch (which copies some files to profile directory) when launching a web app. Normally, the native program should detect when these files have changed (when a new version is installed) and only copy them if needed, but for some reason, it doesn't always detect it for some users.

@HeatherComputer
Copy link

It always calls runtime.patch (which copied some files to runtime directory) and profile.patch (which copies some files to profile directory) when launching a web app. Normally, the native program should detect when these files have changed (when a new version is installed) and only copy them if needed, but for some reason, it doesn't always detect it for some users.

Perhaps the update all web apps feature should also call these then?

@filips123
Copy link
Owner

filips123 commented Sep 17, 2023

Maybe, but it's not really updating web apps. A separate "Patch all profiles (and runtime)" button might be better.

Also, in the next major release (which I don't know yet when will happen), I will probably rewrite how loading works so pitching won't be needed anymore. But I'm not sure yet.

@filips123
Copy link
Owner

I'll close this issue. If you still have problems after trying this solution, please let me know. I'll probably also add "Patch all profiles (and runtime)" button in the next release.

@MaskMan191
Copy link
Author

I'll close this issue. If you still have problems after trying this solution, please let me know. I'll probably also add "Patch all profiles (and runtime)" button in the next release.

Yeah, it's still not working for me.

@filips123
Copy link
Owner

Please send the content of _autoconfig.cfg and defaults/pref/autoconfig.js inside your runtime directory, and chrome/pwa/boot.jsm and chrome/pwa/chrome.jsm inside your web app profile directory.

Also, can you go to the extension settings and to about this project, and copy all version information?

@AxelTerizaki
Copy link

Hello.

I have a similar issue, except it just opens the PWA twice (or more) no matter how many times I click on the icon.

I have several PWAs and they're all fine. When I click on their icon they switch to their window if they're already open.

However, with a PWA I made for deck.blue, everytime I click on the app in my dock, it doesn't switch to it, but launches a new window. A new PWA window though, not a new firefox window.

What can I provide to help diagnose the issue?

@filips123
Copy link
Owner

So, this happens only with one specific PWA, while others are fine? Well, the first thing you can do to diagnose this is to check if "When launching a web app that is already opened" is set to "Focus the existing window" in the settings. You may also need to restart PWAs to apply the setting. If that is set correctly but doesn't work, I'll check if there are any other things you can diagnose.

@AxelTerizaki
Copy link

Well, nevermind.

There must have been an update somehow or maybe I restarted my system and it fixed it, but the issue isn't there anymore.

Sorry for the trouble :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants