Previous session not restored, all opened Tabs are lost

User Help for Mozilla Firefox
glfire
Posts: 36
Joined: June 4th, 2017, 9:59 am

Previous session not restored, all opened Tabs are lost

Post by glfire »

More and more often I'm experiencing that FF doesn't restore the Tabs opened in the previous session, but starts with a blank page. It used to happen to me a lot with Win8.1 and now with Win10.

Before closing FF I delete all the history, while before shutting down the pc a script makes a 1 to 1 backup of the FF profile with the command "robocopy C:\Firefox c:\FFProfileBackup /MIR".

If, after the problem occurs, I look for sessionstore.jsonlz4 and *.jsonlz4 files inside the \sessionstore-backups folder of the backup profile, I see that these files are not present, so I can't procede with a manual recovery of the lost tabs like suggested here.

Any suggestions on what seems to be an unsolved bug already reported over time by other users ?
glfire
Posts: 36
Joined: June 4th, 2017, 9:59 am

Re: Previous session not restored, all opened Tabs are lost

Post by glfire »

Anyone ?

Having done some searches, I understand that the problem I encountered has been reported by many other users and that the absence of *.jsonlz4 files can almost certainly be considered a FF bug.

What should I do in this case: fill the report of possible bug or join a request already opened if any ?
TheVisitor
Posts: 5472
Joined: May 13th, 2012, 10:43 am

Re: Previous session not restored, all opened Tabs are lost

Post by TheVisitor »

Have your go the latest version , 96.0.3 ? Very early on, 96a1 had an issue with lost sessions. I am pretty sure the issue was found and fixed before release. Perhaps you still using an early beta > ?
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Previous session not restored, all opened Tabs are lost

Post by jscher2000 »

glfire wrote:Before closing FF I delete all the history
What method do you use the delete all the history? If you use the "Clear Recent History" dialog, that also removes your session history files.
glfire
Posts: 36
Joined: June 4th, 2017, 9:59 am

Re: Previous session not restored, all opened Tabs are lost

Post by glfire »

TheVisitor wrote:Have your go the latest version , 96.0.3 ? Very early on, 96a1 had an issue with lost sessions. I am pretty sure the issue was found and fixed before release. Perhaps you still using an early beta > ?
Yes, I have the latest version installed, 96.0.3, since Firefox automatically updates itself via the Firefox service, while I never use beta versions.

The problem reported has been occurring sporadically for years, and is therefore not limited to the latest FF versions.
jscher2000 wrote:What method do you use the delete all the history? If you use the "Clear Recent History" dialog, that also removes your session history files.
That's right, I always clear the history manually before closing FF, using the "Clear recent history..." feature accessible by clicking on the clock icon on the FF toolbar and then selecting the option to delete everything, leaving unchecked only "Web site settings".

But I want to reiterate that the problem occurs only sporadically and not always: it can happen a few times in a row, or even just once every two or three months.
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Previous session not restored, all opened Tabs are lost

Post by jscher2000 »

glfire wrote:
jscher2000 wrote:What method do you use the delete all the history? If you use the "Clear Recent History" dialog, that also removes your session history files.
That's right, I always clear the history manually before closing FF, using the "Clear recent history..." feature accessible by clicking on the clock icon on the FF toolbar and then selecting the option to delete everything, leaving unchecked only "Web site settings".

But I want to reiterate that the problem occurs only sporadically and not always: it can happen a few times in a row, or even just once every two or three months.
Firefox can start writing new session history files after deletion if there is a relevant change, such as closing a tab or changing the page in a tab. These updates are written to disk as often as every 15 seconds. However, if no new file is written, it seems likely that if Firefox doesn't shut down perfectly normally, there are no session history files to fall back on.
glfire
Posts: 36
Joined: June 4th, 2017, 9:59 am

Re: Previous session not restored, all opened Tabs are lost

Post by glfire »

jscher2000 wrote:What method do you use the delete all the history? If you use the "Clear Recent History" dialog, that also removes your session history files.
Just out of curiosity, what altenative method can be used to delete browser history that doesn't removes my session history files ?
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Previous session not restored, all opened Tabs are lost

Post by jscher2000 »

If you open the Library window (Ctrl+Shift+H) you could literally Select All (Ctrl+A) > Delete (Del key) to remove browsed URLs. Downloads are on a separate list.
glfire
Posts: 36
Joined: June 4th, 2017, 9:59 am

Re: Previous session not restored, all opened Tabs are lost

Post by glfire »

jscher2000 wrote:If you open the Library window (Ctrl+Shift+H) you could literally Select All (Ctrl+A) > Delete (Del key) to remove browsed URLs. Downloads are on a separate list.
This only clears the list of visited urls, without deleting temporary browsing files, cookies and everything else.
User avatar
dickvl
Posts: 54161
Joined: July 18th, 2005, 3:25 am

Re: Previous session not restored, all opened Tabs are lost

Post by dickvl »

Using the "Clear Recent History..." dialog to clear the browsing history manually shouldn't affect session restore.
Only if the use "Clear history when Firefox closes" to clear the history then this includes not creating a sessionstore.jsonlz4 file.

Are there recovery.jsonlz4 and recovery.baklz4 files created and updated in the sessionstore-backups folder in the Firefox profile folder?
glfire
Posts: 36
Joined: June 4th, 2017, 9:59 am

Re: Previous session not restored, all opened Tabs are lost

Post by glfire »

dickvl wrote:Using the "Clear Recent History..." dialog to clear the browsing history manually shouldn't affect session restore.
I totally agree
dickvl wrote:Are there recovery.jsonlz4 and recovery.baklz4 files created and updated in the sessionstore-backups folder in the Firefox profile folder?
recovery.jsonlz4 and recovery.baklz4 are created inside the \sessionstore-backups\ folder contained in the FF profile directory and updated accordingly to the browser.sessionstore.interval variable (every 15 seconds by default)
User avatar
dickvl
Posts: 54161
Joined: July 18th, 2005, 3:25 am

Re: Previous session not restored, all opened Tabs are lost

Post by dickvl »

You can check sessionCheckpoints.json in the profile folder after you closed Firefox to see if there are problems reported.
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Previous session not restored, all opened Tabs are lost

Post by jscher2000 »

glfire wrote:
jscher2000 wrote:If you open the Library window (Ctrl+Shift+H) you could literally Select All (Ctrl+A) > Delete (Del key) to remove browsed URLs. Downloads are on a separate list.
This only clears the list of visited urls, without deleting temporary browsing files, cookies and everything else.
Those are not in the Browsing History category, so you would clear them however you want to clear cache, etc.
glfire
Posts: 36
Joined: June 4th, 2017, 9:59 am

Re: Previous session not restored, all opened Tabs are lost

Post by glfire »

jscher2000 wrote:Those are not in the Browsing History category ...
The "Clear Recent History..." feature considers them all as part of the browsing history. See image below.


Image
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Previous session not restored, all opened Tabs are lost

Post by jscher2000 »

glfire wrote:
jscher2000 wrote:Those are not in the Browsing History category ...
The "Clear Recent History..." feature considers them all as part of the browsing history. See image below.
Image
History is a meta label that includes numerous categories (listed in the screenshot). Browsing History is the URL list (first category). If you uncheck that first box, you can clear all the other data without clearing URLs.
Post Reply