Closed awdwyn closed 1 month ago
I have also experienced this, in my case though I'm convinced it only occurs when I do a reboot without closing the PWA manually, in other words, when it is killed.
@awdwyn Does it happen on every fresh boot or only sometimes? I think I experienced this in the past, but not frequently, which makes it harder to fix.
There are some problems with session restore (so, maybe it's really because of killing PWAs before), so this issue might be related, but I don't know why it happens. The error in CustomizableUI
seems to be caused because PWAsForFirefox sets some preferences during startup, but I don't know why the error then occurs. (Edit: This error sometimes also happens normally, so I think it's not the issue here.) I'm also not sure why the other errors happen.
I will try to fix this in the future when I rewrite the UserChrome part, but it will probably take a while.
@filips123 It's almost a guaranteed thing on a fresh reboot. I just rebooted this machine and the first two PWAs I opened both did the open->crash->reopen->ok loop, but after that the other PWAs I opened were fine. I don't expect to see the bug again until either another reboot or extended suspend.
I have a suspicion that the error occurs when trying to restore a previous session.
In a profile where I have browser.sessionstore.max_resumed_crashes set to 0 this error does not occur.
Maybe someone else can try to reproduce the error.
Edit (workaround):
Add to prefs.js user_pref("browser.sessionstore.max_resumed_crashes", 0);
I will test this on my system
Initial test looks really good. Rebooted, loaded 10 PWAs; none had this issue. Rebooted again and tested again, same results. I think you're on to something as I absolutely would have run into this in those tests previously.
I've updated user.js in all of my profiles folders in (/home/beaker/.local/share/firefoxpwa/profiles/) and also the default profile template. Thanks for sharing you're suspicions.
Whoever implements this workaround must take into account that the session will not be restored in case of a crash.
On the other hand, the origin of the error seems to be precisely in the restoration of the session, so the session will not be restored in any case.
I've already tried to disable restoring session a few times with another pref (browser.sessionstore.resume_from_crash
) that I thought disables session, but appearently it didn't. So, I'll probably also set browser.sessionstore.max_resumed_crashes
to 0 by default.
But I'm still not sure why all those session issues/crashes even happened in the first place...
I have a suspicion that the error occurs when trying to restore a previous session.
In a profile where I have browser.sessionstore.max_resumed_crashes set to 0 this error does not occur.
Maybe someone else can try to reproduce the error.
Edit (workaround):
Add to prefs.js user_pref("browser.sessionstore.max_resumed_crashes", 0);
when attempting this the PWA still faced the same issues unfortunately, and I noticed that the prefs.js was immeditely modified apon reopening to remove the line I had added.
Whoever implements this workaround must take into account that the session will not be restored in case of a crash.
On the other hand, the origin of the error seems to be precisely in the restoration of the session, so the session will not be restored in any case.
personally I don't see this as of great loss when the alternative is the app annoyingly closing itself when trying to launch
when attempting this the PWA still faced the same issues unfortunately, and I noticed that the prefs.js was immeditely modified apon reopening to remove the line I had added.
If you modify prefs.js
while the browser is open, it will overwrite it when you close the browser.
You can also try with: user_pref("browser.sessionstore.resume_session_once", true);
when attempting this the PWA still faced the same issues unfortunately, and I noticed that the prefs.js was immeditely modified apon reopening to remove the line I had added.
If you modify
prefs.js
while the browser is open, it will overwrite it when you close the browser.You can also try with:
user_pref("browser.sessionstore.resume_session_once", true);
Yes I noticed this, the issue still occured even when editing while the browser is closed.
This fixed it for me:
browser.sessionstore.idleDelay: -1
@ccoager Did you also set the other preferences or just this one?
There are many different preferences that control the session, but I don't know what each one does, which are really needed to fix this and why it even happens.
@filips123 I did try the other preferences mentioned in this issue but none of them helped.
I've set browser.sessionstore.max_resumed_crashes=0
and browser.sessionstore.idleDelay=-1
. I hope this will fix the issue. It will be available in the next version.
@filips123 You have a conflict between this ticket and #559 as they set the same variable, browser.sessionstore.idleDelay, to different values. Since release 2.12.4 and the changing of browser.sessionstore.idleDelay, this is now crashing again for me.
Well, setting browser.sessionstore.idleDelay
to -1 broke extensions (#557), swipe gestures (#558) and closing (#559), so I reverted it. I'm not sure why it's crashing for you if browser.sessionstore.idleDelay
is not set to -1. Please check if it also crashes in a fresh web app profile.
@filips123 I did some more digging and I think I found the root cause. I have browser.startup.page
configured in user.js which you said causes problems mentioned here, #384. I removed my configuration for browser.sessionstore.idleDelay
and browser.startup.page
and the crashes have stopped. Thanks!
Description
On a fresh boot, or sometimes after the PC has been idle for a while, opening a PWA (any of them) will show the window briefly and then immediately close. Re-opening the app (almost always, but not guaranteed) will work normally.
Steps to Reproduce
Additional Information
This is from journalctl showing the result of the failure while opening my bitwarden webUI PWA. No other logs show anything.
Next I opened a terminal and used
firefoxpwa site launch 01HVTD62EA2KY9QPTGS64EBKS1 -- --jsconsole
to load my unRAID webUI. The error occured again, displaying the following in the browser console:Environment
Project versions:
Other
My
user.js
automatically enables css styling within firefox, and turns off the tabs:and
userChrome.css
centers the title and turns off the hamburger menu button: