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

How to restore lost tabs for people who are looking for a solution #1313

Open
andrewprofile opened this issue Feb 4, 2021 · 14 comments
Open

Comments

@andrewprofile
Copy link

andrewprofile commented Feb 4, 2021

NOT REMOVE OLD BEFORE

  1. install "TheGreatSuspender" extension from github source https://github.com/greatsuspender/thegreatsuspender#install-as-an-extension-from-source 1.7.6 version

  2. go to TheGreatSuspender - setting - session management

  3. export all your tabs, including tabs suspended by TheGreatSuspender. You can save urls as txt
    4. open txt, exchange all klbibkeccnjlkjkiokjodocebajanakg to dcfbmakmhgdbikhkhnoodjjdkcamgkcj(on my computer but I'm not sure if it will always be the same, you can find the name in the tab with the list of extensions)

  4. open txt editor, replace all klbibkeccnjlkjkiokjodocebajanakg to [your id here] (find the id of installed extension in the tab with the list of extensions)

  5. import session by thegreatsuspender from txt
    now you get all your tabs

@Kiina
Copy link

Kiina commented Feb 4, 2021

What worked for me for 2000+ tabs to restore most of them after all got closed by Chrome:

  1. Install something like The Marvellous Suspender and export your current session in case something goes wrong
  2. Cut your Internet Connection and close Chrome
  3. Open Chrome again. TheGreatSuspender is now working and under "Session management" you should see a recent session that shouldn't be that old
  4. Export that one and do "open and load"
  5. After it all loaded, just remove TheGreatSuspender and switch to another extension if you like. You can now enable your Connection again

Alternatively you could also just import that session.txt

You might loose a few tabs you could search for in the history if you like, but my recent sessions was only a few hours old.

@TomasHurtz
Copy link

Actually - here seems to be the easiest way:

You install the clone (safe) of Great Suspender - the clone is called MarvellousSuspender

You'll need to have notepad++ or a similar text editor with regex search and replace.

install the marvellous suspender, open its options
export the session into a text file
open the text file with notepad++
open search and replace and set "search mode" to "regular expression", then replace chrome-extension.*uri= with an empty string
save the text file
close all your tabs
import the session from the saved file with "open and suspend"

@Kiina
Copy link

Kiina commented Feb 4, 2021

@TomasHurtz actually that method won't work if the removal of the extension closed all your suspended tabs. I have no idea what causes some users to keep these tabs but as soon as Chrome disabled the extension all tabs that were suspended closed. Therefore this method won't work and you have to rely on one I outlined above if you don't want to do stuff manually with your history for 5 hours.

@Nubbie
Copy link

Nubbie commented Feb 4, 2021

Worked for me by:

  • Turning off internet
  • Activate the extension "The Great Expander" in Chrome again and go to -> Settings -> Session management -> Open and load
  • Remove the extension "The Great Expander"
  • Turn on internet

@andrewprofile
Copy link
Author

@Kiina thegreatsuspender has created a tab backup in the session management tab before closing chrome tabs, you can download them from there

@alexei-osipov
Copy link

alexei-osipov commented Feb 4, 2021

For people that do understand JavaScript and Chome extensions here is a snippet that can be added to an extension to update all browser tabs of current window to use new extension version instead of old (banned) extension:

  const legacyExtensionId = 'klbibkeccnjlkjkiokjodocebajanakg';

  function isLegacyUrl(url) {
    return url.indexOf(legacyExtensionId) >= 0;
  }

  function fixOldExtensionTabs() {
    getCurrentlyActiveTab(function(activeTab) {
      if (!activeTab) {
        gsUtils.warning(
          'background',
          'Could not determine currently active window.'
        );
        return;
      }
      chrome.windows.get(activeTab.windowId, { populate: true }, curWindow => {
        for (const tab of curWindow.tabs) {
          const url = tab.url || tab.pendingUrl;
          if (isLegacyUrl(url)) {
            const fixedUrl = url.replace(legacyExtensionId, chrome.runtime.id);
            chrome.tabs.update(tab.id, {url: fixedUrl});
          }
        }
      });
    });
  }

@patrickkon
Copy link

Thanks mate @andrewprofile ! This worked flawlessly.

In conjunction, I used:

  1. Pre-existing "session buddy" chrome extension to retrieve previously closed tabs (8 days ago).
  2. Another version of thegreatsuspender with no tracking as mentioned in this thread by @aciidic, instead of v1.7.6 of this repo.

@TomasHurtz
Copy link

@Kiina

@TomasHurtz actually that method won't work if the removal of the extension closed all your suspended tabs. I have no idea what causes some users to keep these tabs but as soon as Chrome disabled the extension all tabs that were suspended closed. Therefore this method won't work and you have to rely on one I outlined above if you don't want to do stuff manually with your history for 5 hours.

I am not sure what you mean. It worked perfectly for me and I had all my tabs closed (happened after chrome update). I simply installed new app, followed instructions then all tabs came back. TGS was disabled from Chrome, so I had little choice. But I am sorry if it not work for you.

@Kiina
Copy link

Kiina commented Feb 5, 2021

@TomasHurtz Well no idea how it worked for you since the "Current session" will be empty if the tabs all closed, so there isn't anything to export and "Recent sessions" will be empty since MarvellousSuspender won't be able to read data from a different extension for obvious security reasons.

@vladistan
Copy link

Here is the way do to it if your cannot export Great Suspender session anymore because Google disabled the extension this morning. This is a small build-up to @TomasHurtz method above

  1. Find your History file. On Mac OS X it is under ~/Library/ApplicationSupport/Google/Chrome/Default

  2. Copy History file to separate directory

  3. Open the file with SQL lite client

    sqlite History

  4. Run the following commands to export suspended tabs

    .mode list
    .output saved-sess.txt
    select url from urls where url like '%klbibkeccnjlkjkiokjodocebajanakg%' ;
    .quit

  5. Open the saved file with an editor that can do search replace

  6. Replace the string klbibkeccnjlkjkiokjodocebajanakg with noogafoofpebimajpfpamcfhoaifemoa

  7. Install MarvellousSuspender from Chrome Store

  8. Import the session file you created above

  9. PROFIT

@moki
Copy link

moki commented Feb 5, 2021

Here is my 5 cents on how to backup your "locked" tabs.

https://github.com/moki/thegreatsuspender-recovery

@mkrier
Copy link

mkrier commented Feb 16, 2021

Ok I got everything back, my method isn't as good as @vladistan's, but I couldn't remember sqlite syntax (is it the same as MySQL and MariaDB? It doesn't use straight up normal sql right? I don't know the ".mode" stuff.)

But a another method- (NOT the one I used but it came to mind)- very low-tech: this might be useful for people who don't have a ridiculous amount of tabs (I have 900+), and it's easier for non-technical types: You can also just use Session Buddy (or your chrome history), to restore the suspended tabs you cared about before the disaster, and they won't work of course, but you can just go into the url and manually select the url at the end after "uri=". For example:

chrome-extension://noogafoofpebimajpfpamcfhoaifemoa/suspended.html#ttl=35%2B%20Free%20Public%20APIs%20to%20Improve%20Productivity&pos=0&uri=https://blog.idrisolubisi.com/35-free-public-apis-to-improve-productivity

the origin url there is "https://blog.idrisolubisi.com/35-free-public-apis-to-improve-productivity"

But what I did is a combination of the ones prescribed above:

I didn't have to turn the internet off or compile an older Great Suspender version.

First I just restored from an old Session Buddy session from right before the exploit. (Or you use chrome history I guess).

Then I installed Marvelous Suspender as well use another (awesome simple, 5 star) extension called "Copy URL's to Clipboard"

So I used it copy all the windows tabs and pasted them into a text file (separating the lines of each window with carriage returns so they don't all blend together and I can tell them apart later.

So then do the search and replace klbibkeccnjlkjkiokjodocebajanakg with noogafoofpebimajpfpamcfhoaifemoa as mentioned above by @vladistan, (the first one is the extension UID of the contaminated Great Suspender, the second is Marvelous Suspender. They both use the same pattern in their urls.)

Make a bunch of new chrome windows. For each window, select the chunk of lines from the text file (see- that's why I was telling you to use line breaks after each window's urls, you'll see what I mean), and use the "Copy URL's to Clipboard" extension to pasted in the modified tabs.

Voila!

Lastly- after you do, for hell's sake, go back into session buddy and save all of this as a new session. I called it "afterthemarvelousrestoration" haha.

Anyway though- @vladistan's method is better if you know sqlite- in fact, it's possible to write a bash script (or perl or php or python), (well or in windows an exe or whatever) that basically does all of this for someone who's not as technical as us, right?

@nyansensei
Copy link

nyansensei commented Apr 1, 2021

Hoping it hasn't been too late to add on to this, but I was in despair when I opened up chrome today and saw all my tabs were gone. I was too late to hear about this, as Chrome has already disabled the extension and my tabs disappeared with it.
What I would like to know is if these solutions listed above are also able to reclaim the back-button history that's tied to each of the tabs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests