Persistent Storage Issues with PasswordSafe and localStorage Across Different IntelliJ IDEA Versions


I have encountered an issue related to persistence of stored data using PasswordSafe and JBCefBrowser's localStorage across multiple versions of IntelliJ IDEA.

In IntelliJ IDEA 2021, I observed that neither PasswordSafe values nor localStorage data are retained after restarting the IDE; all previously stored values reset to null. Moving to IntelliJ IDEA 2022, it seems that stored values in PasswordSafe still reset upon restart while localStorage data began to persist correctly. However, with the 2023-2024 versions, both PasswordSafe and localStorage appear to retain their values persistently after a restart.

Here is how I set and retrieve a secretSetting using PasswordSafe:

import com.intellij.credentialStore.CredentialAttributes
import com.intellij.credentialStore.Credentials
import com.intellij.ide.passwordSafe.PasswordSafe

fun saveSecret(secretValue: String) {
    val credentialAttributes = CredentialAttributes("pw")
    val credentials = Credentials("", secretValue)
    PasswordSafe.instance.set(credentialAttributes, credentials)

fun getSecret(): String? {
    val credentialAttributes = CredentialAttributes("pw")
    return PasswordSafe.instance.getPassword(credentialAttributes)

And here is how I store data in localStorage on the web:

localStorage.setItem('data', data);

Could anyone help clarify why these differences in behavior across versions occur? Specifically, I am interested in understanding any underlying changes in how IntelliJ IDEA handles data persistence in PasswordSafe and localStorage in these different releases.

Thank you in advance for any insights you can provide!



First, PaswordSafe and localStorage are different functionalities, independent of each other.

It sounds like you faced bugs in both functionalities in older versions, which are fixed now. I don't understand why you need this information. It will be time-consuming to find it. I suggest trying to find related issues on or