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

Startup option 'Open previous windows and tabs' not persisting over web app restart #384

Closed
reillymc opened this issue Aug 17, 2023 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@reillymc
Copy link

Description

Firefox is not persisting startup option 'Open previous windows and tabs' (browser.startup.page) after a closing and relaunching of web apps.

Steps to Reproduce

  1. Go to Preferences
  2. Turn on 'Open previous windows and tabs'
  3. Close web app
  4. Reopen web app. This startup will resume any previous tabs, however in preferences the setting is reset to unchecked.
  5. Close and reopen web app again and previous tabs are not restored.

Additional Information

I noticed this after a recent update in the past few weeks (I believe the 116 Update). The option no longer works for any of my existing web app installations (~10 various sites). I have tried reinstalling the native driver, updating the web apps, and tried adding a new web app, with unfortunately none persisting the setting. I tested toggling a few other settings on the preferences page and they all seemed to persist over a restart. The prefs.js file shows the 'browser.startup.page' entry being removed when the web app is launched.

Environment

  • Operating system: Pop!_OS 22.04
  • System architecture: x64
  • Desktop environment: Gnome
  • Installation method: deb
  • PWAsForFirefox extension version: 2.7.3
  • PWAsForFirefox native version: 2.7.3
  • PWAsForFirefox runtime version: 116.0.3
  • Firefox version: 116.0
@reillymc reillymc added the bug Something isn't working label Aug 17, 2023
@reillymc reillymc changed the title Startup option 'Open previous windows and tabs' not persisting ofter web app restart Startup option 'Open previous windows and tabs' not persisting over web app restart Aug 17, 2023
@filips123
Copy link
Owner

Some preferences are currently being reset on startup as they can cause problems when set to incorrect values and were often incorrectly synced from normal Firefox profiles. Specifically, browser.startup.page and browser.startup.homepage are reset because they could cause issues like #253 and #349.

Considering that most users have already upgraded to versions with this reset, I will probably remove it (or at least for some preferences) in the next version. You can also manually remove this reset:

  1. Edit file /usr/share/firefoxpwa/userchrome/profile/chrome/pwa/content/browser.jsm.
  2. Remove xPref.clear('browser.startup.page'); (should be line 1861) and potentially other resets.
  3. In the extension settings, enable "Always patch runtime and profile".
  4. Launch all your web app profiles.
  5. Disable back "Always patch runtime and profile".
  6. Set the preferences.

@reillymc
Copy link
Author

Thanks for responding so quickly and explaining context around the issue. Was interesting to explore a bit more into the project. Following those steps has fixed the issue for me - all of my web apps are back starting up with previous tabs as they were before. Thanks again!

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
Status: Done
Development

No branches or pull requests

2 participants