Søg i Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

My session cookies were deleted after I upgraded from 73.0.1 to 74. How can I restore them?

more options

After upgrading to 74 from 73.0.1 I noticed that although my session (tabs) was restored, several cookies were either missing, overwritten, or cannot be read by the host website. For example, when I attempt to browse the youtube homepage, it is as if I never visited the site before; the recommended videos are random and the site defaulted back to the ugly new design. I never log into youtube so restoring that session is the only way to get the algorithm to recommend the random junk I like to watch lol.

My facebook account was also logged out.

The session cookies come up when I search for them from the options menu, but the session ID or whatever has likely been changed. Is there any way I can restore the old session cookies from a backup/earlier FF session? Where are individual cookies even stored now? Seems like they're all dumped into some obscure local database within an obscure folder with thousands of files that ordinary users cannot service themselves.

I miss the old .txt file approach. I know the security issues but then again I have a separate machine for watching funny videos on the internet and browsing facebook. I pity the fool that wastes any time hacking this thing lmao.

After upgrading to 74 from 73.0.1 I noticed that although my session (tabs) was restored, several cookies were either missing, overwritten, or cannot be read by the host website. For example, when I attempt to browse the youtube homepage, it is as if I never visited the site before; the recommended videos are random and the site defaulted back to the ugly new design. I never log into youtube so restoring that session is the only way to get the algorithm to recommend the random junk I like to watch lol. My facebook account was also logged out. The session cookies come up when I search for them from the options menu, but the session ID or whatever has likely been changed. Is there any way I can restore the old session cookies from a backup/earlier FF session? Where are individual cookies even stored now? Seems like they're all dumped into some obscure local database within an obscure folder with thousands of files that ordinary users cannot service themselves. I miss the old .txt file approach. I know the security issues but then again I have a separate machine for watching funny videos on the internet and browsing facebook. I pity the fool that wastes any time hacking this thing lmao.

Alle svar (17)

more options

Using a database for cookies is not new.

Perhaps an add-on or third party utility could read cookies from your older cookies.sqlite database.

Losing session cookies in a regular update is unusual. They usually are preserved in a session history snapshot so they can be restored after the upgrade.

I don't know whether that snapshot is any easier to work with than cookies.sqlite, but you would find it as follows:

You can open your current Firefox settings (AKA Firefox profile) folder using either

  • "3-bar" menu button > "?" Help > Troubleshooting Information
  • (menu bar) Help > Troubleshooting Information
  • type or paste about:support in the address bar and press Enter

In the first table on the page, click the "Open Folder" (or "Show in Finder") button to launch Windows Explorer.

In your profile folder, double-click into the sessionstore-backups folder. The snapshots have file names like this:

upgrade.jsonlz4-build_id

Since they are compressed with Mozilla LZ4, they first need to be decompressed. If the file is a moderate size, you can use my webapp at

https://www.jeffersonscher.com/ffu/scrounger.html

If it's a huge file, you can use a script in the Browser Console:

https://gist.github.com/jscher2000/4403507e33df0918289619edb83f8193

Each page recorded in the file may have its own "state" with cookie information.

more options

jscher2000 said

Using a database for cookies is not new. Perhaps an add-on or third party utility could read cookies from your older cookies.sqlite database. Losing session cookies in a regular update is unusual. They usually are preserved in a session history snapshot so they can be restored after the upgrade. I don't know whether that snapshot is any easier to work with than cookies.sqlite, but you would find it as follows: You can open your current Firefox settings (AKA Firefox profile) folder using either
  • "3-bar" menu button > "?" Help > Troubleshooting Information
  • (menu bar) Help > Troubleshooting Information
  • type or paste about:support in the address bar and press Enter
In the first table on the page, click the "Open Folder" (or "Show in Finder") button to launch Windows Explorer. In your profile folder, double-click into the sessionstore-backups folder. The snapshots have file names like this: upgrade.jsonlz4-build_id Since they are compressed with Mozilla LZ4, they first need to be decompressed. If the file is a moderate size, you can use my webapp at https://www.jeffersonscher.com/ffu/scrounger.html If it's a huge file, you can use a script in the Browser Console: https://gist.github.com/jscher2000/4403507e33df0918289619edb83f8193 Each page recorded in the file may have its own "state" with cookie information.

Thanks for the webapp, at least now I can decode the session files. Unfortunately I cannot find any relevant cookie data in them at all. Not in cookies.json, not in cookies.bak or whatever it is called, and not in any of the various sessionstore-json-backup files that seem to be created after every update. They literally contain everything BUT the cookie data that I need.

Looks like I will have to use your webapp to literally decode every one of these json files in my possession (I have lots of backups) and then use forensics software to literally keyword search all of them.... just to get the youtube homepage to display properly.

Nothing quite like doing hours of unpaid labor to restore basic functionality to a web browser in 2020. I appreciate all the new features and whatnot but the whole Apple-esque idiot proofing and nigh-unserviceable overcomplicated session stores kind of defeat the purpose IMO. I thought FF was supposed to be an alternative to browsers like Safari and IE that you need to either know assembly language in your sleep to fix or pay the company $$$ so their product can then immediately break again as soon as your coverage expires lol.

I did find an article on how to change the youtube style back to the old one by modifying a single cookie parameter. At least that works now, but all the recommended videos that show up are still the same pop garbage on TV nowadays and I think I'm going to vomit. Literally.

Also tried using third party extensions (ie cookiebro) but all they do is display existing info and are useless for loading cookies from those json or session files. Oh and yes I have one called session resurrection that was supposed to backup my entire session. Tried restoring from that and of course the backups are gone. Pretty sure that is due to the extension itself being trash rather than a FF problem though.

more options

One possible reason for state not to be included in a session history file is this preference:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box above the list, type or paste sess and pause while the list is filtered

(3) Check the value of the browser.sessionstore.privacy_level preference:

  • 0 => store for HTTP and HTTPS (default)
  • 1 => store for HTTP only, not HTTPS
  • 2 => don't store state data for any site

Perhaps this would be efficient:

New Profile Test

This takes about 3 minutes, plus the time to switch the cookies database and test YouTube.

Inside Firefox, type or paste about:profiles in the address bar and press Enter/Return to load it.

Click the "Create a New Profile" button, then click Next. Assign a name like OldCookies, ignore the option to relocate the profile folder, and click the Finish button.

After creating the profile, scroll down to it and click the Open Folder button on the Root Directory line. Drop in the old cookies.sqlite database from your backup.

Back on about:profiles, click the Launch profile in new browser button.

Firefox should open a new window that looks like a brand new, uncustomized installation. (Your existing Firefox window(s) should not be affected.) Please ignore any tabs enticing you to connect to a Sync account or to activate extensions found on your system so we can get a clean test.

Does YouTube remember you in this profile?

If so, you could try to extract out the relevant cookie data.

When you are done with the experiment, you can close the extra window without affecting your regular Firefox profile. (OldCookies will remain available for future testing.)

Note: if this test changed your default profile, use the Set as Default Profile button for your regular profile to set it back to normal.

more options

I think I found what I was looking for in the cookies.sqlite.bak file.

There are two parameters of interest within the youtube cookie that probably identify the session: VISITOR_INFO1_LIVE and YSC. I tried using your site to decode the contents but it appears those files use a different encoding than the session backups.

I can find the keyword "VISITOR_INFO1_LIVE" for instance but not the value, which appears as a string of random numbers and mixed caps letters in the firefox cookie editor. In a hex editor those value do not appear at all although the parameters (eg YSC and VISITOR_INFO1_LIVE) do.

EDIT: I will give the method you just posted a try as well and report back.

Ændret af greg.ravitsky den

more options

I just noticed my cookies.sqlite file is 96KB while cookies.sqlite.bak is much larger. For whatever reason this update must have deleted all my cookies.

Figured I should try simply renaming the cookies.sqlite.bak to cookies.sqlite as that would fix sessions problems like this in the past. Of course this merely causes Firefox to erase my cookies again and reduce the renamed backup back to 96KB lol.

  • cue Curb Your Enthusiasm music*
more options

Are you on Windows 7 (not a later version masquerading as Windows 7)?

In that case, try to recover an older version of the cookies.sqlite database file using the Previous Versions tab. Right-click the file, Properties, Previous Versions. Windows should display available shadow copies of the file from recent system updates. Anything worth trying?

more options

jscher2000 said

Are you on Windows 7 (not a later version masquerading as Windows 7)? In that case, try to recover an older version of the cookies.sqlite database file using the Previous Versions tab. Right-click the file, Properties, Previous Versions. Windows should display available shadow copies of the file from recent system updates. Anything worth trying?

Yes, but I don't have shadow volume copies enabled on that drive unfortunately.

Cookies.sqlite.bak seems to contain the data I need, but Firefox does not want to load it. If I exit the browser, delete cookies.sqlite, and rename the .bak file to cookies.sqlite and restart, the .bak file just gets blanked again.

What encoding does cookies.sqlite use? If I can decode that file I can probably just use a hex editor to manually find the values and then paste them into the FF cookie editor.

more options

It's a SQLite database file. Try opening it using this tool, it will at least let you see whether any tables have readable data. Assuming the database can be opened.

https://inloop.github.io/sqlite-viewer/

more options

This article is for a different SQLite database file but perhaps the same technique can rescue your file:

https://developer.mozilla.org/docs/Mozilla/Tech/Places/places.sqlite_Database_Troubleshooting

more options

Hi! I Also have the same exact problem, right after updating to 74. The backup file is also bigger than the new one. I had to log in to all my accounts.

more options

jscher2000 said

This article is for a different SQLite database file but perhaps the same technique can rescue your file: https://developer.mozilla.org/docs/Mozilla/Tech/Places/places.sqlite_Database_Troubleshooting

Tried it and it did nothing. Copied the "fixed" cookies.sqlite to the firefox profile folder and it was reduced to 96KB again. Screenshots of results enclosed.

If others are having this issue, perhaps someone else will file a bug report and get this fixed because I do not have the time or patience for that sh!t.

Seems like even if I find an older cookies.sqlite it is simply not compatible with this broken updated version (74).

Looks like I will have to treat Firefox x64 like an Android app from now and manually audit every single update to ensure it works and does not remove any useful features. I doubt FF will start forcing ads on their users like Android developers do, but this is not the first time an update broke my installation like this and I had to wait days for a fix.

Remember the cert revocation thing where every SSL site was essentially broken after updating FF? Guess this is round two.

Basic browser functionality folks, not rocket science. We're not trying to derive Pi in 6 dimensions in order to build a doomsday device capable of triggering false vacuum decay here.

more options

I have come up with a temporary workaround for the youtube issue that may help others. Note that this does NOT restore any login cookies or change anything outside of youtube.

Follow these instructions to get the old youtube style back:

   Open a Youtube page
   Press Control+Shift+I (that is an I as in information)
   Application tab on top (may have to click the arrows to view more tabs)
   On the left, in Storage, expand "cookies"
   Click on the cookie for Youtube
   On the right, you should see columns for "Name" and "Value"
   In the Name column, there should be one called "PREF". If this is missing, do something on the Youtube page to create it. Just disable autoplay on a video or change the sort order if you are viewing someone's videos in their profile
   For PREF, double-click the Value to edit it and replace it with f6=8 or add it to what is already there with &f6=8
   Click off of the Value or press enter to save it and then refresh the page. All Youtube pages will now use the old layout

(Thanks to Abhinav Mahto @ https://www.quora.com/How-do-I-restore-the-old-YouTube-layout#)

If you cannot find the PREF parameter, download an extension such as Cookiebro and search for "youtube".

Click on "*.youtube.com" to first expand the tree, then right click "*.youtube.com" and select "Create a cookie for this domain".

Configure the new cookie exactly as shown in the attached screenshot and click the Update button when finished. If the value in the screenshot doesn't work, try setting it to just "f6=8". That worked for me every time.

In order to get the unethically profit-driven pop garbage off your homepage, you will now have to essentially retrain the youtube algorithm for your new session ID.

I have hundreds of videos bookmarked for just such an occasion lol so I just opened them all at once let them play lol. Then I searched for random things of interest and opened a bunch of those videos as well. Took a while but now youtube is once again recommending semi-relevant content.

FYI, the whole point of doing this is to avoid creating a permanent youtube account. I periodically flush my google/youtube cookie UIDs and start over like this all the time, except I always kept the parameter that enabled the old yt homepage. I'm glad I figured out exactly which one it was ("PREF") so now I know that is the only one I need to keep between refreshes.

Naturally this update bug happened on my day off and right after I had already recently reset those UIDs. I work in IT... and am in the middle of contract negotiations on top of that. Instead of much needed rest here I am still working on this problem, hence all the frustration on my part. Hope this helps, although a real fix that actually restores login cookies should be released ASAP. How did they not catch this bug in testing?

Ændret af greg.ravitsky den

more options

I think the title of this thread is wrong: the problem was not with session cookies but with persistent cookies. (Judging from your screenshot, they don't expire for two years.) So cookies.sqlite is the only relevant file.

That said, I don't know what combination of circumstances caused the problem on your Firefox. We will need to gather more reports and compare configurations and situations.

more options

jscher2000 said

I think the title of this thread is wrong: the problem was not with session cookies but with persistent cookies. (Judging from your screenshot, they don't expire for two years.) So cookies.sqlite is the only relevant file. That said, I don't know what combination of circumstances caused the problem on your Firefox. We will need to gather more reports and compare configurations and situations.

Thanks yeah a more accurate title would probably be "All persistent cookies (containing session IDs) were deleted after I upgraded from 73.0.1 to 74 thus logging me out of all websites and resetting my preferences. How can I restore them?"

Has anyone else reported this problem or is it just me and tomerjoy?

more options

greg.ravitsky said

Has anyone else reported this problem or is it just me and tomerjoy?

I can't read every thread, but so far, I've only seen the two.

more options

Hi greg.ravitsky, did you install the Facebook Container extension before, during, or after your update? Some users reported their cookies were deleted when they installed it.

more options

I've had that extension installed ever since it came with an update years ago. Haven't touched it since.