Brave not starting anymore after crash

after a crash brave won’t start for me anymore. No window is opening - but also no error on the console - just hangs. I can get brave to start again by setting another “-user-data-dir” - but I would like my old config back. Is there any way to “repair” the old data dir? Is there a way to debug where exactly it hangs.
Also already deleted the cache - unfortunately this did not help

I am running:
Version 1.16.68 Chromium: 86.0.4240.111 (Official Build) (64-bit)
on Ubuntu 20.04.1 LTS

Hello @ligi

when you use --user-data-dir do you give it a location to folder or not?
like this --user-data-dir=/path/to/foo

and have a nice day

Yes I give it a location. It also works when giving a location - but I would like my old environment back

could you check that there no process running of brave before using this way?
do you create the folder for the location you provide before starting it?

i know you want your old profile

and i always use this method that you mentioned when things go crazy

@justsomeone1: yea did a killall -9 brave before and also restarted my computer
But IMHO it is also to expect to get a new environment when using “-user-data-dir” - the question is how to get brave running again with the old user-data-dir

yep when you use that way it start new profile on the path you provided

sorry but could i ask that you send me the full command that you start brave with

to check in my laptop i am linux user also but centos

not working command:
$> brave

working command:
$> brave --user-data-dir=brave_userdata

could you replace brave_userdata with the full path to your folder and also after running it and close it check that there some files and folder created on that folder

there are files in brave_userdata and it is working this way. Really not sure what the full path would bring. The problem is with the old path - not the new one.

go to your old profile it will be under /home/yourusername/.config/BraveSoftware/Brave-Browser/Default

notice that .config is hidden folder

then copy the default folder content to the default folder inside the folder that you just created which is “brave_userdata”

then start brave using the same --user thing and see if it able to start your profile or not

thanks for the sugestion - but when doing this (copyng the content of ~/snap/brave/current/.config/BraveSoftware/Brave-Browser into ~/brave_userdata) I get the same behavior of a non starting brave.

oh thanks for this line

"~/snap/brave/current/.config/BraveSoftware/Brave-Browser "

just to make sure when you first install brave you install it using snap not throught the official way this one https://brave.com/linux/#linux

am i right?

correct - brave is installed via snap

i saw some people complain about some issue when they install it via snap

so let me ask one of the team if he can help us here @fmarier

please notice it still weekend so maybe you get you response later

and have a nice day both of you

1 Like

@ligi Thanks for the report, this is definitely a problem we’d like to fix. Before I can file an issue for it though, I need more information about the specific cause of the hang you are experiencing.

The only problem is that the profile directory which triggers the problem (i.e. the ~/snap/brave/current/.config/BraveSoftware/Brave-Browser directory) is not something you can send to us for further debugging because it includes all kinds of personal data (the websites you visited, the passwords you saved in the browser, the active sessions you have with websites, etc.). What you could do however is to use a technique called bisecting or binary search to narrow it down to a specific file or directory within your profile.

Bisecting the problem

It’s a little tedious to go through, but here are the steps:

  1. Copy your ~/snap/brave/current/.config/BraveSoftware/Brave-Browser into a new brave-testing directory.
  2. Delete half of the files from brave-testing/Default.
  3. Start brave with --user-data-dir=brave-testing to see if it works or not.

If it works, it means that the problematic file was in the half that got deleted in step 2. If it still hangs, then the problematic file is in the half that was preserved after step 2.

The next step is to take the half that contains the problematic file and then repeat steps 1-3, deleting half of the files in the half that was identified as problematic (i.e. we’re now deleting only a quarter of the total files). Again, that will tell you which of these two “quarters” contain the problematic file. You can then continue the process until you’re down to just 1 file to delete. The answer to that step will tell you which exact file is a problem.

Example

For example, if I look in my profile (~/.config/BraveSoftware/Brave-Browser-Nightly/Default/), I see the following files and directories:

000003.log
AutofillStrikeDatabase
blob_storage
BudgetDatabase
Cookies
Cookies-journal
CURRENT
databases
data_reduction_proxy_leveldb
Extensions
Extension State
Favicons
Favicons-journal
Feature Engagement Tracker
GCM Store
GPUCache
heavy_ad_intervention_opt_out.db
heavy_ad_intervention_opt_out.db-journal
History
History-journal
History Provider Cache
Local Extension Settings
Local Storage
LOCK
LOG
Login Data
Login Data-journal
MANIFEST-000002
Media History
Media History-journal
Network Action Predictor
Network Action Predictor-journal
Network Persistent State
Platform Notifications
Preferences
previews_opt_out.db
previews_opt_out.db-journal
QuotaManager
QuotaManager-journal
README
Reporting and NEL
Reporting and NEL-journal
Secure Preferences
Sessions
Session Storage
shared_proto_db
Shortcuts
Shortcuts-journal
Site Characteristics Database
Sync Data
Top Sites
Top Sites-journal
TransportSecurity
VideoDecodeStats
Visited Links
Web Data
Web Data-journal

and so my first attempt would be to delete these files/directories:

000003.log
AutofillStrikeDatabase
blob_storage
BudgetDatabase
Cookies
Cookies-journal
CURRENT
databases
data_reduction_proxy_leveldb
Extensions
Extension State
Favicons
Favicons-journal
Feature Engagement Tracker
GCM Store
GPUCache
heavy_ad_intervention_opt_out.db
heavy_ad_intervention_opt_out.db-journal
History
History-journal
History Provider Cache
Local Extension Settings
Local Storage
LOCK
LOG
Login Data
Login Data-journal
MANIFEST-000002

If that fixes the problem, then I know that the problematic file is one of the above. If it doesn’t, then it’s one of the files in the half I didn’t delete:

Media History
Media History-journal
Network Action Predictor
Network Action Predictor-journal
Network Persistent State
Platform Notifications
Preferences
previews_opt_out.db
previews_opt_out.db-journal
QuotaManager
QuotaManager-journal
README
Reporting and NEL
Reporting and NEL-journal
Secure Preferences
Sessions
Session Storage
shared_proto_db
Shortcuts
Shortcuts-journal
Site Characteristics Database
Sync Data
Top Sites
Top Sites-journal
TransportSecurity
VideoDecodeStats
Visited Links
Web Data
Web Data-journal

So assuming the bad file was in the second half, then my next step would be to delete brave-testing and copy my original profile again. Then I would delete the following files/directories:

Secure Preferences
Sessions
Session Storage
shared_proto_db
Shortcuts
Shortcuts-journal
Site Characteristics Database
Sync Data
Top Sites
Top Sites-journal
TransportSecurity
VideoDecodeStats
Visited Links
Web Data
Web Data-journal

If that doesn’t solve the hang, then I know that the problematic file is one of:

Media History
Media History-journal
Network Action Predictor
Network Action Predictor-journal
Network Persistent State
Platform Notifications
Preferences
previews_opt_out.db
previews_opt_out.db-journal
QuotaManager
QuotaManager-journal
README
Reporting and NEL
Reporting and NEL-journal

and so I’m going to keep narrowing it down deleting half of the remaining files each time until I’m just deleting a single file.

The end result of this process is that I would know which single file/directory is the source of the problem. Once we have that, we’ll have something that can be shared with Brave to reproduce this hang and fix it.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.