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

Previous session lost (open tabs) - how to restore? #4416

Open
silent5am opened this issue May 13, 2019 · 62 comments
Open

Previous session lost (open tabs) - how to restore? #4416

silent5am opened this issue May 13, 2019 · 62 comments
Labels
needs-investigation A bug not 100% confirmed/fixed OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release.

Comments

@silent5am
Copy link

Description

Last session (open tabs) was lost after a regular reboot; unable to restore that session

Steps to Reproduce

Can not reproduce at this point

Brave version (brave://version info)

Version 0.63.55 Chromium: 74.0.3729.131 (Official Build) (64-bit)

Version/Channel Information:

current release

I'm sure this is a known issue but I wasn't able to figure out how to fix this myself.

I'm aware that there are session files stored both in the main directory, as well as the session storage folder (AppData\Local\BraveSoftware\Brave-Browser\User Data), however I'm not sure what to do with those files.

Firefox allows to rename those backup files and replace them with the flawed session, but this doesn't seem to work in this case (respectively not sure what I'm doing wrong).

I have old session files (.ldb) from last night that should contain my open tabs (afaik) but what do I do with them?

The sync function doesn't help because the other device was also updated to a brandnew session :(

Using the browser history is one way to "fix" this (quite tedious task tbh); copy/pasting a single file might be a bit more easier.

@silent5am
Copy link
Author

Despite not being able to restore my previous session, I decided to make a copy of the entire folder.

Today, I had the exact same issue: I started Brave, the browser insta crashes. When I opened it again, all my tabs were gone.

So I copied the folder from last week (the "backup") into the main directory and replaced all new files with the old ones. However, something seems to auto-update or auto-overwrite the old files and replace them with the corrupted "last session" or "last tabs" files.

How do I make a proper backup? What folders/files are relevant to restore the last browser session (all open tabs, etc)?

I've been comparing snapshots of the directory and trying to figure out what is what - two hours wasted so far.

It would be really nice to get some insight here.

@rebron
Copy link
Collaborator

rebron commented May 24, 2019

@silent5am

A few questions:
Are you losing your cookies as well?
When you run into this issue, can you restore your tabs under history where it says recently closed? Did the restore tabs popup show up also in the upper right hand corner when you opened the browser again?

@rebron rebron added needs-more-info The report requires more detail before we can decide what to do with this issue. needs-investigation A bug not 100% confirmed/fixed and removed needs-more-info The report requires more detail before we can decide what to do with this issue. labels May 24, 2019
@Poikilos
Copy link

Did you remove any fonts at any point since the last time it loaded correctly before each crash (and do you have the setting for On Startup: Continue where you left off)?

@mixedCase
Copy link

Hi, I've had this happen to me twice now. I do have "Continue where you left off" set and no, cookies are not lost, neither is history. In fact, the browser remembers I had two windows with different profiles open; it's just that the tabs for each window are gone.

This is honestly extremely awful for my workflow and if it happens again I'll just have to switch to another Chromium fork since it's too unreliable as a daily driver for work.

@Nerothos
Copy link

This happen to me often on two computers too (Win10 both). Nothing in the window history remain so I can't restore a session, only the browser history.

@kjozwiak
Copy link
Member

@mixedCase & @Nerothos when this usually happens, are you guys a few versions behind when upgrading or always on the current one? We've had a few reports in the past where users who miss a few releases and update sometimes run into this issue as well. Just curious if this could be the same situation or something else.

@mixedCase
Copy link

@kjozwiak I'm going to test that later, but last time it happened it wasn't the case. I maintain one of the Brave packaging scripts for Arch Linux and tend to update to stable releases the same day they are marked as such.

As a point probably worth noting, I believe last time it happened it was either first or second execution of the browser after updating, so if there's logic running to migrate the configuration schema and there was a schema change with last version it is worth investigating there.

Regardless, updating through arbitrary versions without losing state should be possible within reason. I'm sure the Chromium team has a very generous period before they break things.

@Nerothos
Copy link

My versions are Version 0.65.121 and Version 0.66.100

@Poikilos
Copy link

My previous comment may be invalid. I got the crash again without changing any fonts, but after removing nautilus, if that matters. I am still using The Great Suspender, but have been for many months and only ever got the instant disappearing silent crash and loss of tabs twice so far.

@kjozwiak
Copy link
Member

@Poikilos mind going into brave://crashes, submitting the crash reports and reporting the Crash Report ID? Example of a submitted crash report:

Screen Shot 2019-07-21 at 8 23 31 PM

@Nerothos
Copy link

I got this when I try to report then.

image

Any thing that I have to do?

@kjozwiak
Copy link
Member

You should be seeing a Send now link at the bottom of each crash, example:

Screen Shot 2019-07-22 at 9 30 51 PM

Maybe you can enable Automatically send crash reports to Brave via chrome://settings/privacy?

@Nerothos
Copy link

Apparently it uploaded them afterwards.

@kjozwiak
Copy link
Member

@Nerothos great 👍 Mind sharing the Crash Report ID for those crashes?

@Nerothos
Copy link

I'm not sure they are all relevant but here :
crashid.txt

@Poikilos
Copy link

@kjozwiak Like before, crash reporting is disabled, and there are 0 crashes. Again, I wish I could enable reports but disable sending them automatically. I enabled them for now so I'll let you know if I get anything.

@Annihilannic
Copy link

I have lost all my tabs in a similar way on at least 2 occasions. I'm running under Windows 10. While the issue is ongoing, is there a way we can back up our session? It was apparently possible under previous versions (see brave/browser-laptop#13483), but when I try to do so with version 0.69.135 some presumably critical files like 'Current Session' and 'Current Tabs' under 'C:\Users\userid\AppData\Local\BraveSoftware\Brave-Browser\User Data\Default' are inaccessble while the browser is open.

@Voronovskiy
Copy link

If you are using Chrome you can restore your tabs following these steps https://rocketfiles.com/articles/how-to-restore-tabs-on-chrome.

@Poikilos
Copy link

Poikilos commented Oct 24, 2019

@Voronovskiy, The problem is that restoring does not work after some type(s) of crash(es). The second "solution" at the link proposes looking in history for all of your tabs, which is not a solution. Some of my tabs could be for a project I started a month ago or more. Regardless, I open tabs over the course of several days. The only people who care about this issue are people who use tabs heavily. We need to enable crash reports, which is not on by default, then somehow hope to lose our data so we at least have a matching crash report number.

@NumDeP
Copy link

NumDeP commented Nov 29, 2019

Any one doing important work and spend quite a bit of effort right-clicking with dozens of tabs open on the bar. I recommend this extension called SessionBuddy, it helps in these circumstances where crashes often occur and the browser is useless in retrieving/restoring.

@SpenMillard
Copy link

This may be useful to Mac users - I closed the browser and restored a Time Machine backup of the entire directory: Application Support > Brave Software.

When I re-opened the browser, the Restore Previous Session button appeared and did indeed restore all of my tabs from the time of yesterday's backup.

This may be a clumsy way of doing it - I read above that other users had only restored specific files, but this method did appear to work.

@nick-s-b
Copy link

nick-s-b commented Dec 2, 2020

I just experienced this issue with Brave for Linux. I lost all the tabs but was able to recover them because I backed up before rebooting. I think I know what the bug was in this case.

If you don't have a whole-FS backup, make sure you backup this folder: ~/.config/BraveSoftware/Brave-Browser/Default/Sessions/ It should contain 4 (or more?) files of the type Session_<unix time> and Tabs_<unix time>. Periodically copy these files somewhere or just write a script to back it up. On macOS, these files are in ~/Library/Application Support/BraveSoftware/Brave-Browser/Default/Sessions/ folder.

After the reboot and after starting Brave, I've noticed that only one tab was open and it had some image from the local disk open. I believe the issue is that somehow a second main Brave process was started when I double-clicked that file earlier in the day and this action caused a new set of Session & Tab files to be created. In my backup, I saw the old set of files (and a new one which was only few kb in size) and just replaced the new ones with those old ones from the backup. Once the Brave process is started, it will pick the newest set of Tabs and Session files and delete the older ones. This is one way of how you lose all your tabs.

Somehow, two main processes were started (even though there should be only one main process) and that caused the issue in my case. Maybe it's the root cause for many others. Brave team should re-check how they check whether another session is running and also not just delete an older set of Session & Tab files upon start... if there are multiple ones.

@janning
Copy link

janning commented Dec 2, 2020

I just experienced this issue with Brave for Android.

  • Both the Brave-related folders ("com.brave.browser") in phone (last modified 2019-05-15) and on SD card (last modified 2020-05-24) are empty (minus the fact they each have an empty "files" sub-folder and an empty "Downloads" sub-sub-folder, but there are no files in them) ... I can look in other places for some sort of session file if I knew where else to look, but it seems rather un-intuitive to store such info elsewhere.
  • Unsure how to reproduce as I was using the app just fine previously, AFAIK, and I don't recall it crashing. Just happened to open it today (2020-12-01) and suddenly none of my tabs were there. (I don't recall specifically how many, but it was only in the double-digits.) Never had this problem before.
  • Recently Closed: only shows stackoverflow.com (Log In - Stack Overflow), then "Show Full History"
  • History:
    -- 2020-12-01 stackoverflow.com (a specific post)
    -- 2020-12-01 stackoverflow.com (Log In - Stack Overflow)
    -- 2020-11-30 cnbc.com (FCC Chairman Ajit Pai will step...) > this was from Reddit (Open-in: Brave)
    -- the rest are 2020-11-27 and prior
  • OS: Android 9; moto g(6) Build/PDS29.118-15-11-14
  • Application Version: Brave 1.17.72, Chromium 87.0.4280.66

It sucks, but these things do happen. Hoping this additional info will help, even if it only means getting Brave to store session files in a safer way for a manual restore procedure.

@costaht
Copy link

costaht commented Dec 17, 2020

Guys, I have a backup of /home/costa/.config/BraveSoftware/Brave-Browser before and after losing my tabs. Is there any information data you want me to provide that will help you to troubleshoot the problem?

I'm running:
Fedora release 33 (Thirty Three) - Linux lpt-fedora 5.9.13-200.fc33.x86_64
Version 1.10.97 Chromium: 83.0.4103.116 (Official Build) (64-bit)

@costaht
Copy link

costaht commented Dec 21, 2020

Just lost everything again... I'm about to go back to Firefox :'(
Here's the logs I got. I hope it helps
brave.log

@planet36
Copy link

I had to do a hard reset of my laptop. When I opened Brave, it prompted me to restore the pages. I clicked "Restore", but nothing happened.

I have a copy of the previous Session_##### and Tabs_##### files from the UserData/Default/Sessions/ folder. Can those be used to restore the lost session?

@costaht
Copy link

costaht commented Dec 24, 2020

I had to do a hard reset of my laptop. When I opened Brave, it prompted me to restore the pages. I clicked "Restore", but nothing happened.

I have a copy of the previous Session_##### and Tabs_##### files from the UserData/Default/Sessions/ folder. Can those be used to restore the lost session?

I think you can. Close Brave, then paste your backup files overwriting the ones that are there. Open Brave again and the restore button will appear.

@planet36
Copy link

@costaht That doesn't work.

I also have a copy of the "Session Storage" folder, and within it there's a large .ldb file with a modification time before the crash.

If I kill the brave.exe process tree, is there any kind of manual intervention to make it restore what I want it to?

@costaht
Copy link

costaht commented Dec 24, 2020

@costaht That doesn't work.

I also have a copy of the "Session Storage" folder, and within it there's a large .ldb file with a modification time before the crash.

If I kill the brave.exe process tree, is there any kind of manual intervention to make it restore what I want it to?

That's what i do:
Close Brave, make sure isnt running in background
Replace files with my backup
Open Brave.
Brave will complain because of the new files and give you the Restore button.

Just to let you know, when I do that's i restore the backup of the entire Brave browser folder.

@planet36
Copy link

planet36 commented Jan 3, 2021

I also have a copy of the "Session Storage" folder, and within it there's a large .ldb file with a modification time before the crash.

I checked again, and the modification time of the .ldb file is after the crash. My mistake.

I've since installed Session Buddy, and it's working well so far.

@cjcole
Copy link

cjcole commented Feb 21, 2021

This has just happened for me:

Version 1.20.103 Chromium: 88.0.4324.152 (Official Build) (x86_64)

Mojave 10.14.6 (18G7016)

This was after a reboot due to laptop loss of power, not a Brave crash.

The symptoms are more or less consistent with the reports above.

Please consider bumping up the priority on this since: (1) this has been outstanding and ongoing for years now and (2) for those of us who use profiles and tabs to organize, this is a huge pain in the ass when it happens. Crashes are bad, but you can usually recover quickly and move on. Bugs like this take activity built over weeks and throw it away. It's a huge demoralizer.

Please let me know if there are any files I can gather from my installation which would help to diagnose this.

@vertigo220
Copy link

Just had this happen, too, and it's clear I'm going to have to stop using Brave. I've now lost my tabs with Brave both on mobile and desktop, which is completely unacceptable. I use multiple browsers, and Brave is the worst one when it comes to recovering from crashes. Others simply restore the tabs, whereas Brave constantly gives the stupid "oops" or whatever message, requiring you to click it instead of it just doing it on its own. And when I just had to forcefully shut off my computer, when I booted back up everything was gone. No restore pop-up, no recently closed tabs, nothing. And at least with Firefox, on the rare occasion something like this happens, it stores backup files in a separate directory, making manual restoration at least somewhat painless.

The only thing that saved me was restoring the files from a backup, which meant I lost the last three days. At least that's not too bad, since I've only been using Brave as my secondary browser, so I've probably only lost maybe half a dozen tabs and had to close as many that I had previously closed. Still, a browser you can't depend on to keep your session safe is a useless browser.

And sure, maybe an extension "fixes" the issue, but that doesn't help all the people that don't install it because they assume the browser is going to have basic functionality that's existed in browsers for roughly 20 years, until suddenly they find that's not the case. Knowing about a solution after the fact does nothing to help alleviate the frustration and massive waste of time caused by such a failure. If the Brave developers really can't/won't fix this, then they should at least display a warning on first run to use a third-party session backup extension.

@rotemg69
Copy link

Help needed. Please advise. This has just happened for me:

Current Version 1.28.105 Chromium: 92.0.4515.131 (Official Build) (arm64)

MacOS: BigSur 11.5.2

Can't recall if issue started after a Brave crash or loss of power.

The symptoms are more or less consistent with the reports above.

Please let me know if there are any files I can gather from my installation which would help to diagnose this.

@ikwyl6
Copy link

ikwyl6 commented Aug 21, 2021

Version 1.27.111 Chromium: 2.0.4515.131 (Official Build) (64-bit)
History is blank. If I restart browser the session data with tabs get restored to something a lot older so I don't have the current tabs saved on next restart. It will ask to Restore but it restores something much older (whenever it listed my history, where now it just shows it as blank). At the same time if I try to install an extension it says 'Failed - Insufficient permissions" in the download bar at the bottom. Lots of room on drive.

If I try to see what I can do from the command line (to try and save my tabs so I can rebuild my tabs that are lost), I get this:
$ brave -h
[0820/223253.614686:FATAL:chrome_main_delegate.cc(350)] execlp failed: No such file or directory (2)
/snap/brave/126/opt/brave.com/brave/brave-browser: line 48: 192719 Trace/breakpoint trap (core dumped) "$HERE/brave" "$@"

@vlaidet
Copy link

vlaidet commented May 7, 2022

@steshaw Many thanks for your solution, "Tab Session Manager" saved my day

@jnthnhng
Copy link

I was fortunate enough to not have any issue with Brave browser restoring grouped tabs until today. My computer usually sleeps, but sometime last night it shut down. When I started it up, instead of opening Brave browser which usually restores my group pages and session, I clicked on a link that opened up a web page, but none of my grouped pages loaded, nor loaded my previous session.

I recovered my group pages by doing CTRL+SHIFT+T, which reopened closed tabs. Alternatively, you can access that function by right clicking on a tab which I believe is the name thing.

Hopefully this helps someone else.

@HuntingTarg
Copy link

HuntingTarg commented May 21, 2024

CONTEXT:

I came here because I was fortunate enough to find a superuser issue that shed some light on how old and chronic this unresolved issue actually is.
@silent5am @bsclifton

(PLEASE NOTE: the old GitHub issue report has been archived because it was started on a build before the transition to Chromium and is no longer applicable to the current core code).

This is an issue bump and a file monkey's workaround from reading this thread and poking around the file structure. This issue is sorely overdue for a fix, workaround, or just closure with reference to third-party resources such as mentioned above.
(EDIT: added one internal thread comment link)

OVERVIEW (of my issue)

I have had crashes in the past and just decided to deal, but this time I had multiple windows open with sorted tab groups allocated to various tasks, and was going to search for similar problems and solutions one last time before transitioning away to a different primary browser (the second time in five years for me).
What specifically occurred for me as a user was: I had a great number of tabs open as is typical for me (low 100s). Something went wrong and caused brave to crash, and I restarted Brave, but left the computer to do something else before returning to click the 'Restore' button on the prompt. When I returned and clicked the button, nothing happened. My lost session was not restored, and the dialog box went away. This has happened to me two previous times as a Brave user, and each time it is excruciatingly frustrating.
I have a rather dated computer with only 4G of RAM, and I have experienced unrecoverable crashes of Brave associated with insufficient memory, or something I can only guess is caused by or related to a memory allocation fault. (I trust there are enough crash reports available to the developers here to dig in further to see if my GUI dead-reckoning is accurate or not). Only once in my experience with crashes, both restored and unrestored, have I seen a memory error warning or dialog from Windows, but it seemed an important clue, along with the fact that I have almost always had other programs running in parallel to Brave (typically Adobe Reader loading hundreds-page documents w/ graphics, and a program here on GitHub called MegaMek, which uses the Adoptium Java runtime library - not a small application for this machine).

Brave Version 1.66.110 Chromium: 125.0.6422.60 (Official Build) (64-bit)

Windows 10 Home (64 bit), version 22H2, OS build 19045.4412
@kjozwiak
IMPORTANT DETAIL My Sessions folder was copied less than an hour after the crash, and has files that predate the crash by less than one hour.

SO... here's what I tried that worked:

SOLUTION: (manual workaround)

  1. Close Brave
  2. Copy the entire "Sessions" folder into a safe location (outside BraveSoftware/Brave-Browser/User Data); this folder is currently located under the full path
    "%drivename%/Users/%username%/AppData/Local/BraveSoftware/Brave-Browser/User Data/Default/Sessions"
    for Windows
  3. IF files starting with "Sessions_###" and "Tabs_###" that are timestamped before the crash can be identified,
    THEN compare with the working "Sessions" folder in the path identified above, and in that working folder delete all files starting with the same beginning name and timestamped after the identified files (I left "Apps_###" alone since the only occurrence was dated long before the crash and all seems to be well)
  4. Relaunch Brave; the lost session or a close approximation of it should be loaded, depending on the time and amount of activity separating the last desired session save and the occurrence of the crash.

This solution or a modification of it shouldn't be hard to procure automation for; some years ago there was 'backup version' management for Windows (before the transition to SaaS - I think it was available to users for NT and XP, but not after that if memory serves), which allowed previous configurations of Windows to be loaded if something went awry after a major change. I imagine the same functionality could be implemented here; it would likely involve changing the way that Brave handles session information, possibly to create discrete 'restore points' the way Windows did with its own configuration. Third-party tools may not work for users on shared or unowned computers where they cannot grant such tools requisite permissions.

So I hope this can lead to a final resolution of an issue that has been lurking for (too) many years.

(EDIT: corrected uploaded file link syntax, removed duplicate link)

Session Storage - post-crash, pre-recovery state (shortly before implementing solution).zip

Sessions - successful recovery state.zip

Sessions - post-crash spare.zip

Sessions - after-crash state.zip

Crash Reports (empty, in case you were wondering)

@rebron rebron added this to General May 28, 2024
@rebron rebron moved this to P1 & P2 Backlog in General May 28, 2024
@working-name
Copy link

July, 2024. Brave still taking a dump after you hit Restore button. 5 years to fix a bug. 🤦‍♂️

@working-name
Copy link

SOLUTION: (manual workaround)

Maybe this worked in 2021 Brave, but 2024 Brave simply ignores the existing Sessions_ file and creates a new one with the current epoch timestamp.

@ghost
Copy link

ghost commented Sep 2, 2024

Hiya,
Can anyone help me to restore Chrome Tab Groups on Android? After Chrome browser update it went all over the place. Some Grouped Tabs on the top are still there but the rest is all gone. Some tabs have been singled out and some tabs have disappeared. I tried to use the chrome://flags but didn't work. I had this issue ones before but for some reason after some time it all reverted back as it was.

Does anyone know how to fix this? I have lost a lot of information 😦

Any help would be much appreciated...

@vertigo220

This comment was marked as off-topic.

@ghost
Copy link

ghost commented Sep 2, 2024

Sorry.

@aimestereo
Copy link

is it just me who looses all tabs on each browser update? browser updates become more forced and annoying, but the real problem is that it now wipes open tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-investigation A bug not 100% confirmed/fixed OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release.
Projects
Status: P1 & P2 Backlog
Development

No branches or pull requests