Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Learn More

Can't restore TABS from backup file

  • 23 risposte
  • 1 ha questo problema
  • 70 visualizzazioni
  • Ultima risposta di jscher2000

more options

Before shutting down Firefox I deleted history/cache/passwords etc from the past day

I do this all the time but since I had restore previous tabs selected they always get restored when I start up again

However this time they weren't restored when I restarted

Without closing Firefox I navigated to the sessionstore-backups folder to see what was there but the files were only 2KB - much too small for the number of tabs.

So I installed ShadowExplorer & Shadowcopyview to see if I could recover older versions I was able to locate jsonlz4 files from a few days ago that were around 11000KB in size so I assumed they would have most of my tabs

However when trying to use the files nothing happens - I tried 2 different steps that I read here had worked for others

1 - Renaming previous.jsonlz4 to sessionstore.jsonlz4 , moving to the profile folder (deleting the old one first) and restarting FF

2 - Deleting sessionstore.jsonlz4 and copying the recovered previous.jsonlz4 / recovery.baklz4 /recovery.jsonlz4 / upgrade.jsonlz4-20201014125134 files to the sessionstore-backups folder and restarting FF

I also repeated the steps after creating a separate profile

None of these worked so I tried examining the jsonlz4 files using https://www.jeffersonscher.com/res/scrounger.html but I got an error message 'Session history file contents could not be read?'

Now I've previously used recovered Jsonlz4 files to restore tabs with no issues but this time they won't work

I read here https://support.mozilla.org/bm/questions/1189759 that updates may cause compatibility issues and the upgrade.jsonlz4-20201014125134 file indicates they was a recent update

The recovered file sizes indicate they contain data so I want to know how I can recover it - if not through FF then through some other software

Tutte le risposte (20)

more options

Hi

You need to place this file with your session as sessionstore.jsonlz4 in the main profile folder with Firefox closed to make Firefox use the file to restore the session.

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

È stato utile?

more options

Yes I already tried this

1 - Renaming previous.jsonlz4 to sessionstore.jsonlz4 , moving to the profile folder (deleting the old one first) and restarting FF

unless you mean something else ?

As I said I've used recovered jsonlz4 files before to restore sessions but this time for some reason it's not working

È stato utile?

more options

You can look at this tool to inspect a compressed sessionstore file.

È stato utile?

more options

darkwolf573 said

Before shutting down Firefox I deleted history/cache/passwords etc from the past day

Unfortunately, the time range selector in the Clear Recent History dialog doesn't selectively filter tabs in session history files. Instead, ALL session history gets cleared whether you select Last Hour, Today, etc.

I do this all the time but since I had restore previous tabs selected they always get restored when I start up again

Perhaps in those cases you continued browsing briefly, but long enough for Firefox to create new session history files?

None of these worked so I tried examining the jsonlz4 files using https://www.jeffersonscher.com/res/scrounger.html but I got an error message 'Session history file contents could not be read?'

Did the scripts decompress the file and put its contents into the box? Usually the session history file is well-formed with lots of { [ and text. Does yours look like keyboard characters or garbage?

If it looks like keyboard characters but the "Scrounge URLs" button doesn't work, try the next button, "Unstructed URL list".

È stato utile?

more options

If the tool isn't able to decompress the sessionstore file then it is likely that the file is corrupted and that would explain why Firefox isn't able to restore the session.

You can possibly try to check the file via code in the Browser Console.


È stato utile?

more options

Unfortunately, the time range selector in the Clear Recent History dialog doesn't selectively filter tabs in session history files. Instead, ALL session history gets cleared whether you select Last Hour, Today, etc.

Would this apply even to those tabs I hadn't accessed during the session ?

Did the scripts decompress the file and put its contents into the box? Usually the session history file is well-formed with lots of { [ and text. Does yours look like keyboard characters or garbage?

When I load the file all the box shows is a blank space and when I click scrounge URLS it tells me Session history file contents could not be read?

I've also installed https://addons.mozilla.org/en-US/firefox/addon/mozlz4-edit/ in the new profile I created to see if I could open the files that way

I ran it and it was apparently loading but since it was taking so long I left it on overnight and when I came back I was greeted by a message that Firefox had crashed (only the profile that was running mozlz4 not my main one)



You can possibly try to check the file via code in the Browser Console.

/questions/1308257#answer-1357643 Firefox crashed and all session restores are gone


I currently have 4 potential files - previous.jsonlz4 - recovery.baklz4 - recovery.jsonlz4 - upgrade.jsonlz4-20201014125134 all similar sizes & dates - Which one is the best candidate and do I have to rename them to sessionstore.jsonlz4  ?

I also was able to retrieve an older sessionCheckpoints.json file . I this important or can I discard it ?

Modificato da darkwolf573 il

È stato utile?

more options

Sorry I just replied several minutes ago but the post isn't appearing is there a delay ? - if so ignore this

Modificato da darkwolf573 il

È stato utile?

more options

I split my original response into 2 parts since it wasn't displaying I managed to post the 1st part but the second isn't displaying - don't know if there's a problem with the characters etc ? I saw a message that posts must be approved before displaying but the 1st part was displayed instantly ?

I quoted cor-el's post and and asked about which jsonlz4 file to use but it wont post . I even tried editing one of my other responses with the some of the post contained inside but the entire post got deleted


  • Update* My original posts suddenly appeared all at once so but since there's no delete option I edited them out

Modificato da darkwolf573 il

È stato utile?

more options

with 1 of the files

but I get the same error message no Magic Number

On that thread the user asked if there was a way to resolve this but there's no response

I read here

https://www.reddit.com/r/firefox/comments/2ps6wg/jsonlz4_bookmark_backups/

that jsonlz4 files could be opened with Gecko and linked

here

https://dxr.mozilla.org/mozilla-central/source/toolkit/components/osfile/tests/xpcshell/test_compression.js#20

but I have no idea what I'm supposed to do with this

In this thread https://support.mozilla.org/en-US/questions/1267353#answer-1246475 the user seemed to have a similar problem with opening the files but was eventually able to do so ?

È stato utile?

more options

Posts that contain URLs are delayed due to recent problems with scammers promoting paid "support" links.

Did the scripts decompress the file and put its contents into the box? Usually the session history file is well-formed with lots of { [ and text. Does yours look like keyboard characters or garbage? When I load the file all the box shows is a blank space and when I click scrounge URLS it tells me Session history file contents could not be read?

Hmm, the box should not be blank if there are contents in the file. Is it possible there is a bunch of blank space at the beginning -- does the box have a scroll bar?

The Scrounge URLs button definitely won't work if the box is blank.

I followed the instructions here - https://support.mozilla.org/en-US/questions/1308257#answer-1357643 with 1 of the files but I get the same error message no Magic Number

In LZ4 compression, the magic number is a few bytes used to determine what method of compression was used. I think this could be related to the file appearing blank.

È stato utile?

more options

In LZ4 compression, the magic number is a few bytes used to determine what method of compression was used. I think this could be related to the file appearing blank.

So is there any way to resolve this e.g by trying different decompression methods until one works ?

Also what was the Reddit thread referring to regarding using Gecko to open the file ? Is this possible


I also updated my original post with this question regarding history but I don't know if you saw it when when you responded because of the delay

Would this apply even to those tabs I hadn't accessed during the session ?

È stato utile?

more options

You can check the file in a HEX viewing utility as it is likely that at least the first cluster only contains null bytes and no actual content, i.e. the file is corrupted.

È stato utile?

more options

does the box have a scroll bar No there isn't Just tells me size & date underneath

You can check the file in a HEX viewing utility as it is likely that at least the first cluster only contains null bytes and no actual content, i.e. the file is corrupted.

Whats this and how do I do it ? Also would the Gecko solution work if this doesn't ?

È stato utile?

more options

I found an online HEX viewing utility and loaded one of the files What am I supposed to be looking for ?

And if this doesn't work will the Gecko solution ?

Finally why would the files be corrupt in the 1st place - I've never had this problem before but I noticed this person here https://support.mozilla.org/en-US/questions/1308257 appeared to have an identical problem just a few weeks ago

Has there been a recent update that causes this i.e something relating to clearing history which you mentioned here

Unfortunately, the time range selector in the Clear Recent History dialog doesn't selectively filter tabs in session history files. Instead, ALL session history gets cleared whether you select Last Hour, Today, etc.

È stato utile?

more options

darkwolf573 said

I found an online HEX viewing utility and loaded one of the files What am I supposed to be looking for ?

This is the view from Notepad++ which may or may not look like what you see in the hex editor:

And if this doesn't work will the Gecko solution ?

That Reddit thread refers to executing Firefox code -- Gecko is the rendering engine of Firefox. The Browser Console is the most convenient way to run those commands. I think you might have tried that already.

Finally why would the files be corrupt in the 1st place - I've never had this problem before but I noticed this person here https://support.mozilla.org/en-US/questions/1308257 appeared to have an identical problem just a few weeks ago

Well, these are not Firefox's normal files, they are shadow copies made by Windows for its own purposes. Perhaps there is something about shadow copies of these files which makes them unreliable. For example, shadow copies might be made while Firefox is running and modifying the files, or Windows might be adding something to them in some cases, or the tools might not be extracting them perfectly. ??

Has there been a recent update that causes this i.e something relating to clearing history which you mentioned here Unfortunately, the time range selector in the Clear Recent History dialog doesn't selectively filter tabs in session history files. Instead, ALL session history gets cleared whether you select Last Hour, Today, etc.

This is not new. I filed a bug in August 2019: https://bugzilla.mozilla.org/show_bug.cgi?id=1497731

È stato utile?

more options

OK so I installed Notepad++ and ran the jsonlz4 and while I can see a small number of the tab URLs most of it just says 'NUL' which I assume means corrupt

Is this normal for the file to be part corrupt / part readable ? I've had corrupted text documents before but they were entirely corrupt

I guess the final question I would like to ask is do you know of any software etc that can 'De-corrupt' files I know you've recommended ShadowExplorer & Shadowcopyview previously but these only seem designed to find backups. Is there any software available that function like CHKDSK or something used by computer forensics people to recover/reconstruct damaged data ?

È stato utile?

more options

darkwolf573 said

OK so I installed Notepad++ and ran the jsonlz4 and while I can see a small number of the tab URLs most of it just says 'NUL' which I assume means corrupt Is this normal for the file to be part corrupt / part readable ? I've had corrupted text documents before but they were entirely corrupt

NUL indicates a binary 00 character. It's common for compressed files (and other types of binary files) to have non-textual characters. It does not necessarily indicate the file is corrupted. If there is a huge section of consecutive NULs (you often see that with un-deleted files), it likely indicates a problem with the file.

If you want to compare a "normal" file, you can take a look at your current previous.jsonlz4 file in your live profile. (I think this file only exists if Firefox found recovery.jsonlz4 or sessionstore.jsonlz4 to be readable.)

Either way, due to compression, you cannot tell how many URLs are in the file. For example, when I use Notepad++'s Find dialog for https:// and hit the Count button, the compressed (.jsonlz4) file has under 100 matches while the uncompressed .js file (saved from the Scrounger) has over 5,700.

I guess the final question I would like to ask is do you know of any software etc that can 'De-corrupt' files I know you've recommended ShadowExplorer & Shadowcopyview previously but these only seem designed to find backups. Is there any software available that function like CHKDSK or something used by computer forensics people to recover/reconstruct damaged data ?

Unfortunately, I do not know of a general purpose tool for this. I think you could find one for extremely common compression schemes like ZIP, but I don't know about LZ4 (or Mozilla's flavor of LZ4).

È stato utile?

more options

I just compared the files The 'normal' file has far more intelligible characters and I'm able to scroll vertically and horizontally whereas the corrupt file has a large string of nulls across the top of the screen and a few legible characters beneath but I'm only able to scroll horizontally

I also decompressed the normal file using Browser Console and this results in a similar layout to the corrupt file (no vertical scroll) but with no string of nulls across the top. As I mentioned in my earlier post I can't do this with the corrupt file due to to the no Magic Number error

Unfortunately, I do not know of a general purpose tool for this. I think you could find one for extremely common compression schemes like ZIP, but I don't know about LZ4 (or Mozilla's flavor of LZ4).

Do you have any suggestions even if it's only for ZIP since it could at least lead me in the right direction Thanks

È stato utile?

more options

It looks that the first cluster is corrupted and this makes the file rather useless. If only few bytes are corrupted like happened in the past with a floppy disk that has read errors then it might be possible to workaround, but with that much bytes missing this is not possible.

You can do a Google search for repair+zip+archive, but that won't help you with a corrupted LZ4:

È stato utile?

more options

OK thanks for the suggestions - I guess the the tabs are lost for good but at least I know now the issues surrounding deleting history so I can avoid this in future

I'll probably start using bookmarks instead of tabs in future for loading previous sessions to be on on the safe side or is the Bookmarks file also vulnerable to corruption ?

È stato utile?

  1. 1
  2. 2
Richiedi supporto

Bisogna accedere al proprio account per rispondere nelle discussioni. Se non si possiede ancora un account, inserire una nuova richiesta.