Open Brave-Matt opened 2 months ago
Row 15
here — issue on Brave Community (reported by mlchatnoir
):
ReadPassword()
was falsely assumed to return a bool
, whereas it returns a KWalletDBus::Error
— and !ReadPassword()
is not the same as ReadPassword() != KWalletDBus::SUCCESS
, since enum Error { SUCCESS = 0, CANNOT_CONTACT, CANNOT_READ };
)mlchatnoir
reported it on April 30, 2023)1.51.x
)mlchatnoir
also reported on May 18, 2023 that after an upgrade, passwords came back ✅ Per discussion via https://bravesoftware.slack.com/archives/CHGKGMHDJ/p1723569829908629?thread_ts=1723127438.506119&cid=CHGKGMHDJ, removed OS/Windows
as the associated PR is only for macOS and Linux.
Added release-notes/include
as well.
cc @rebron @kjozwiak
Issue to follow which help in some cases - filed upstream in Chromium: https://issues.chromium.org/u/1/issues/365913981
Description
This issue is a continuation of a previous and ongoing issue that was recently closed. Previous issue description:
The issue itself is largely unchanged — users are seeing different data types in the browser "disappear" due to know discernible reason/intentional action taken by the user. This includes any kind of data held in the browser, as shown in the sheet linked above. While I believe that most of these cases are not due to user error/behavior, there are a few caveats where there are known reasons in which this occurs.
Known occurrences (will continue to add to this list)
Scenarios in which data loss is expected include:
Keychain deleted or inaccessible For macOS users, the secret used to encrypt/decrypt is stored in the macOS Keychain. If this Keychain gets deleted, permission is lost (rendering the Keychain inaccessible), or if the [user's] profile folder is moved to a new machine (which doesn't have that keychain), then the new machine will not be able to read the secret and decrypt the data and data loss would be expected.
Corrupted, deleted or moved
Local State
file For Windows users, the secret key is stored in theLocal State
file. If this file (or the entire profile folder) is copied and moved to a new machine, the new machine will be unable to decrypt the secret and a new key would be generated, resulting in data loss.Additionally, if the
Local State
file is corrupted (or if this file is deleted) this will likely result in a loss of data as well, as the secret will not be able to be decrypted and a new key will be created.Troubleshooting Steps/Helpful information
At this time, troubleshooting and relevant information that users (or devs) can share on this is a bit scattered, so I will use this section to reorganize and highlight what information can help resolve this issue. For now, please refer to the "Actions users can take" section in the Community thread for basic troubleshooting and information gathering.
Additional troubleshooting:
Local State.bad
file (Windows only): If yourLocal State
file gets corrupted for any reason, it will move itself out of the way and change its name toLocal State.bad
and replace itself with a "fresh"Local State
file (which, again, would present as a loss of data). You would be shown an error when launching into Brave:You can look for this in your
User data
directory by going to%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data
on your PC. There, you should see theLocal State.bad
and the newLocal State
.This error might happen if you edited the
Local State
file. It's in JSON format - you can try pasting theLocal State.bad
content into a JSON validator to ensure there isn't something wrong with the formatting. The encryption key will be stored under the JSON objectos_crypt
. If you're up for some text editing, you can copy this node over from theLocal State.bad
into the newLocal State
.Steps to reproduce
N/A
Actual result
N/A
Expected result
Data stays safe and intact in browser
Reproduces how often
No steps to reproduce
Brave version (brave://version info)
Issue has been present since v1.50x up to the most recent release.
Channel information
Reproducibility
Miscellaneous information
No response