- Do you have your bookmarks backed up somewhere?
Yes - as I noted above, I managed to get my bookmarks exported back to Chrome when I gave up on Brave.
- Are you using a VPN connection when you attempt(ed) to Sync?
No
- Do you have any AV software running in the background?
Not at the time I was attempting to sync - just had Brave, Apple Mail, and a couple other minor apps like TextEdit and Messages open.
If you have you bookmarks backed up somewhere, I would recommend backing up your wallet as well and then doing a fresh install of Brave (wiping the associated profile data folder in Application support --> BraveSoftware --> Brave Browser
and trashing the app).
I downloaded and re-installed Brave (with my existing Brave-browser folder in place).
Launched Brave - Result: crash.
I then zipped a backup copy of the Brave-Browser folder in Application Support, and trashed the Brave-browser folder. After trashing that folder, Brave launched - appearing normal like a first time install.
Further, an additional test may be to backup/copy the entire Brave-browser
folder there, reinstall, then paste and replace the freshly installed Brave-browser
folder with your saved copy.
Does not work. Something is corrupt in my Brave-Browser folder which crashes Brave every time.
Ok…I was troubleshooting while writing this reply, and I have determined which file is causing Brave to crash:
/Users/username/Library/Application Support/BraveSoftware/Brave-Browser/Default/Preferences
When I trash that ./Default/Preferences file from my original Brave-browser folder, then Brave will launch, and my bookmarks, wallet, etc are intact.
Examining that Preferences file in Sublime, I see now that it is filled with what appears to be many of my bookmarks, browsing history, etc.
For example:
“https://www.domain.com:443,*”:{“last_modified”:“13199750222108423”,“setting”:{“lastEngagementTime”:13199582967272164.0,“lastShortcutLaunchTime”:0.0,“pointsAddedToday”:2.1,“rawScore”:2.1}}
There are about 27500 lines in the Preferences file when I split lines on commas - so roughly 4400 of the above JSON/dictionary entries - each representing data for a different bookmark or site visited, plus hundreds of lines of other prefs for other settings, zoom settings, etc.
I can’t send you the Preferences file as it appears to contain a lot of browsing history information that is private.
Somehow, the syncing procedure I described at the beginning of this post corrupted that Preferences file and caused the crashing issue.
Why did syncing put so much data related to my bookmarks in the “Preferences” file? That seems like a bad idea. Or maybe I’m assuming incorrectly, and syncing had nothing to do with all that data being in the “Preferences” file? I’m not sure. My assumption is that syncing caused this, and the file ended up corrupt as a result.
I can tell that the file definitely contains malformed JSON, as when I set the syntax to javascript while viewing the file in Sublime, the syntax is not highlighting properly, indicating that somewhere in there is a problem, like a non-matching set of curly braces or some other issue that would cause parsing the Preferences file to fail.
I would suggest:
- Test syncing a huge # of bookmarks (5000 - 15000)
- Test Brave’s startup behavior by intentionally corrupting/malforming the JSON in the Preferences file
- Do not store bookmarks or sync-related data in the Preferences file
- Make syncing a safe threaded background process that can be started, paused, continued at next launch, etc, so there’s no issues related to locking up the GUI when there’s tons of data to sync, and less risk of data corruption if syncing is interrupted.
- Don’t sync using JSON - use a database to write records, so if syncing is interrupted, presumably there will be less risk of corruption (I don’t know what kind of databases are implemented in Chrome/Brave for these purposes) (edit: on second thought, I know what I wrote here sounds ignorant as no-sql databases like Mongo do write JSON files - I just meant implement the syncing in separate database records or files vs in a Preferences file which is presumably shared with other threads - I really don’t know…I should not make any assumptions about the architecture here…)
- Please implement a stronger feature for saving and restoring previous sessions when Brave shuts down improperly. I would really like to have a keyboard shortcut for “Save Session” that would write out all open tabs/windows to a file which could be restored at any subsequent point (ie in the History menu - History > Restore Previous Session
Thanks!