All tabs groups lost after updating to Firefox 57.0 Quantum

I have restored my tabs from inactive groups by installing the Sync Tab Groups extension.


If you're a Ubuntu user, or similar, you should be able to find the latest backup at

~/.mozilla/firefox/ro51nwle.default/sessionstore-backups/upgrade.jsonlz4-[timestamp of upgrade]

I didn't know anything about the file format, but this gist was basically enough to get me started

With the gist saved to the backup folder, you can export to json with:

$ sudo pip3 install lz4
$ python3 ./mozlz4a.py -d upgrade.jsonlz4-[timestamp of backup] backup.js

There's a lot of data in there (including each tab's entire history) but at least it's not lost!

If you just want to save the most recent url from each tab like I did, something like the following python should do the job:

#!/usr/bin/env python3

import json

with open('backup.js') as infile:
    read_data = infile.read()

json_data = json.loads(read_data)

tab_groups = json.loads(json_data['windows'][0]['extData']['tabview-group'])

groups = {int(k): {'title': tab_groups[k]['title'], 'tabs': []} for k in tab_groups.keys()}

for tab in json_data['windows'][0]['tabs']:
    url = tab['entries'][-1]['url']
    group_id = json.loads(tab['extData']['tabview-tab'])['groupID']
    groups[group_id]['tabs'].append(url)

with open('tabs_backup.json', 'w') as outfile:
    json.dump(groups, outfile, indent=4)

If you're freaking out about losing your tabs, and simply want quick assurance that they're not gone forever, the easiest thing is to install the Tree-Style Tabs extension, as suggested by @trrocket. I can verify that after installing it, I was able to find the "lost" tabs in the sidebar.

That said, I just hope that I didn't miss out on any tabs. (If I can't tell the difference maybe it doesn't matter all that much... :P) I have also backed up my sessionstore files, and will take my time to process them to verify that I have indeed recovered all my tabs.

PS: All credit to @trrocket, but I thought it was was worth putting this as an answer instead of having someone panic on looking at the other answer, without reading the comments. +1 to @trrocket :-)