brave-browser: Brave 1.51.110 bugs out with KDE's KWallet. All sites get logged out and sync breaks.

Description

I updated Brave to 1.51.110 yesterday on my Arch Linux KDE machine and it completely broke sync and logged me out of all my sites. Sync complained that it could not access my browser’s secure storage even though KWallet shows that it contains a key called Brave Safe Storage. Relogging into all of my sites and resetting sync seemed to correct the issue, but I am able to reproduce this on a fresh install of Brave every time.

Brave was working absolutely fine with KWallet prior to the 1.51.110 update.

Steps to Reproduce

  1. Start fresh. Delete Brave Safe Storage key from KWallet. Delete app settings in ~/.config/BraveSoftware and ~/.cache/BraveSoftware
  2. Launch Brave and sign into a few sites, as well as Brave Sync.
  3. Close Brave
  4. Relaunch Brave. Notice that sites are logged out and that sync is broken.
  5. Re-sign into all of your sites and reset sync using brave://sync-internals
  6. Close Brave
  7. Relaunch Brave. Notice that it does not break.

Actual result:

Browser complains it is unable to access secure storage once, unless user settings are cleared. After that, it seems okay, although it does make me paranoid that it may not be using secure storage.

Expected result:

Browser should not complain about secure storage.

Reproduces how often:

Every time

Brave version (brave://version info)

1.51.110 Chromium: 113.0.5672.77 (Official Build) (64-bit)

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Not tested
  • Can you reproduce this issue with the nightly channel? Not tested

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? N/A
  • Is the issue reproducible on the latest version of Chrome? Not tested

Miscellaneous Information:

System Info: Operating System: Arch Linux KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.105.0 Qt Version: 5.15.9 Kernel Version: 6.3.1-arch1-1 (64-bit)

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 23
  • Comments: 35 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Hello! I also faced the same issue. After some attempts I was able to make it work with the following steps:

  1. Disable sync through brave://sync-internals
  2. Go to System settings >> KDE Wallet >> Access control and activate the option Prompt when an application accesses a wallet
  3. reboot
  4. Enable sync. When closing and reopening the browser it will ask for access to the Wallet, choose Always allow and done!

Let me know if this works on your platforms too

Brave version (brave://version):

1.51.110 Chromium: 113.0.5672.77 (Official Build) (64-bit)

Miscellaneous Information:

Operating System: Kubuntu 23.04 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8 Kernel Version: 6.2.0-20-generic (64-bit)

btw, if i try to delete brave keys using kwallet by KDE and restart brave all seems to be fine, but if i restart brave again… it breaks

Updated to 1.51.118 (Fedora 38 KDE) and sync seems to work just fine. Thanks!

Hello! I also faced the same issue. After some attempts I was able to make it work with the following steps:

  1. Disable sync through brave://sync-internals
  2. Go to System settings >> KDE Wallet >> Access control and activate the option Prompt when an application accesses a wallet
  3. reboot
  4. Enable sync. When closing and reopening the browser it will ask for access to the Wallet, choose Always allow and done!

Let me know if this works on your platforms too

Brave version (brave://version):

1.51.110 Chromium: 113.0.5672.77 (Official Build) (64-bit)

Miscellaneous Information:

Operating System: Kubuntu 23.04 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8 Kernel Version: 6.2.0-20-generic (64-bit)

This method works on my computer. Thank you.

Operating System: Fedora Linux 37 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.105.0 Qt Version: 5.15.9 Kernel Version: 6.2.14-200.fc37.x86_64 (64 bits)

Have tried to upgrade to 22.10 hoping it would resolve the d-bus issue and maybe will start working again. Didn’t help.

Then I wen to look into /usr/share/dbus-1/services directory and checked contents of the org.freedesktop.secrets.service The file was there previously but I didn’t pay much attention to it because I thought its content was wrong. This is what’s inside:

[D-BUS Service]
Name=org.freedesktop.secrets
Exec=/usr/bin/gnome-keyring-daemon --start --foreground --components=secrets

So I had the idea to try starting Brave with --store-password=gnome

And it worked - my stored passwords are back!!!

Maybe it would help to someone else as well…

@airend the current plan is May 17, 2023

Reproduced on 1.51.114, on Neon KDE 5.27 x64:

image image

Verification passed on

Brave 1.51.117 Chromium: 113.0.5672.92 (Official Build) (64-bit)
Revision b6f521170062a1fa8a82c33fb223b06fec566da1-refs/branch-heads/5672_63@{#10}
OS Neon KDE 5.27 x64

Clean install

Using the STR/Cases outlined via https://github.com/brave/brave-browser/issues/30147#issue-1696636696, ensured the following once Brave was restarted:

ensured that passwords from brave://settings/passwords were still visible/listed ensured that you’re not logged out of any websites that were logged in ensured that sync is still working and doesn’t display the Sync service could not be started, Brave Sync is not running synced several bookmarks between two devices several times and ensured sync was working as expected

image image image image

Upgrade install

ensured that passwords from brave://settings/passwords were still visible/listed ensured that you’re not logged out of any websites that were logged in ensured that sync is still working and doesn’t display the Sync service could not be started, Brave Sync is not running synced several bookmarks between two devices several times and ensured sync was working as expected

image image image

yes it was in the exact same state as when i backed it up same tabs open same passwords stored and all the website sessions were still there

@cthu1hoo

I think I rolled back to a backup made at April 26.

this, I would say, is fresh enough.

In general, should restoring ~/.config/BraveSoftware be enough to rollback Brave profile? This whole situation got me thinking that, at least this part of my profile backups is useless because I can’t really roll back for whatever reason.

Yes, it should rollback the profile. I did that several times. The only requirement is to do restore on the same computer where the backup was done.