Can no longer start Brave, can in Icognito

Thank you everybody for continuing to troubleshoot :slightly_smiling_face: I had to drop off there for a bit to get some sleep :joy: Downside of being a human sometimes. But super excited to see the Local State and also the profile section of the Local State. I had a hunch it was related to the avatar - but didnā€™t think to look in Local State.

BTW - for anybody moving the profile directory out of the way, that is only a temporary fix. That helped us narrow down it was something in the profile. Definitely you should put back your data! Your bookmarks, cookies, etc are important :slightly_smiling_face:

It seem like Local State is where there is something broken. I wonder for folks experiencing the issue who are adventurous, if you navigate directly to chrome://theme/IDR_PROFILE_AVATAR_28 does the browser crash?

Iā€™ve shared the updated info here with the team - weā€™ll continue investigating along with everybody here.

1 Like

This worked for me kinda, lol.

I had to do the opposite of what he said. I left all the files and added my folders instead. He says leave the files and dont put the folders but when I tried that it still didnt work.

I have lost all my tabs and current open tab history which is a lot but I still have my history so I should be able to rebuild what I had from that.

I also lost my settings like dark mode.
Still have autofill and bookmarks.
I did lose my passwords =/.

Because I started over, I thought my bookmarks were goneā€”then I remembered I have Brave on my phone. And my bookmarks were still there. It took a bit of exploring but I was able to export them and send them to my PC. Just imported them into Brave. It will take some moving them around but I have them. :smiley:

1 Like

Wow - special thanks to @lieuwe_berg - I now have a way to reproduce this 100% of the time.

BTW - we are tracking on GitHub here:

Stay tuned please - thanks to everybody who has helped troubleshoot and provide information

2 Likes

Until we have a fix - here is exactly what you can do.

  1. Close Brave
  2. Go to your profile folder. This should be like %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\
  3. Open the Local State file in the editor of your choice
  4. Search to find avatar_icon
  5. change the value to chrome://theme/IDR_PROFILE_AVATAR_26
  6. Save the file
  7. Relaunch Brave
3 Likes

so itā€™s caused by the Icon?!

I think the root cause might be that the icon resources were shuffled around / deleted / modified by Chromium. This icon is also referenced in the Preferences file and maybe they need to match?

Definitely something suspicious

That worked!!! Thank you very much!!

DG

OK we have a fix! Just need to clean it up, submit a patch, and review it. This is a P1 issue meaning weā€™ll get a fix out as soon as possible.

Thanks for your patience folks!

BTW - the root cause seems to be: folks who picked a Chromium icon a long time ago. If youā€™ve responded here, please let us know if youā€™ve been a Brave user for a while. For example, the IDR_PROFILE_AVATAR_28 is a picture of a Corgi. We used to display the Chromium profile icons in Brave and let folks pick them. Then, we hid them.

The root cause is that folks with those old icons set are now hitting a code path which breaks. But only on Windows.

4 Likes

My Brave installation is from 2019, Iā€™ve always backed up when I reinstalled windows. I donā€™t exactly remember picking an Icon, but this could very well be the case. My icon number was 32.
Thanks for the quick fix!

1 Like

Yes that works, nice job !

OK I have a fix for the code here:

Itā€™s pending review. Weā€™ll get this reviewed and merged ASAP - then weā€™ll get the fix released to everybody.

2 Likes

Worked for me. If you have multiple profiles like I did make sure to change profile IDā€™s for all of them.

I just tried this. After reattempting to launch Brave, all of my profiles with an old chromium icons are now completely wiped to a fresh blank state. The folders in User Data for these profiles are brand new with no traces of my old profiles. Profiles without an old icon are untouched.

Is there anyway I can recover my old profiles? I have important bookmarks that I do not have a backup of stored in profiles that vanished.

Hi - yes @kingzombie2, everything should be recoverable as long as you didnā€™t delete anything.

What steps did you take? Please let me know what changes you made and I can help you undo them :smile:

Booted my second pc, brave ofc not starting.
After butchering the profile with deleting extensions, cache, whatever i could. Still wont start. Launching in private window does work, but crashes as soon as i open settings.

So for a test, i copied my BraveSoftware folder from main Program files pc to second pc and replaced original folder there, bam, Brave loaded fine. All tabs, extensions, everything works.

Scared to restart main pc till this is fixed.

All I did was change the avatar icon from different numbers to 26 in the Local State.

After restarting Brave it launched and said ā€œYour preferences failed to loadā€ or something similar, I donā€™t remember the exact message.

All of my profiles I made in 2020 had their folders replaced with fresh empty profiles. I can not find any trace of my old profiles and their bookmarks, history, etc. in the trash.

ah interesting. OK that happens when the Local State thinks its corrupt. There should be a file called Local State.bad or something like this. That is the backup of the file before it clears itself. You can open that in an editor and try to change it back like it was. Itā€™s going to be in JSON format - you can paste the contents into a JSON validator. I bet there was a missing character like [ or ] or } or {

Please let me know if you have that - the profiles you created should still be there. If you go to %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data you should see the folders inside there - with the name of the profile being the folder name. Or if you didnā€™t set one, itā€™ll be Profile 1, Profile 2, etc. The default profile is Default.

Hope this helps!

Yes, the profile folders have been completely replaced with folders of brand new profiles.

My profiles were Profile 2 and Profile 6. Both folders for those profiles have a creation date of when I reopened Brave after changing the Local State. Nothing from before changing the Local State is still there.

Hi everybody

We just released the fix! Itā€™s live. You can either way a day for the update to happen automatically OR you can go to https://brave.com/download/ and install over your current Brave. This wonā€™t affect your profile so itā€™s safe to do and youā€™ll be fixed.

Thanks! Let us know how this works for you :smile:

1 Like