B2 authentication error from GUI after using CLI

I have a backup job created and running in the GUI, which backs up my Windows home directory to B2. It was working fine, but failed after I used the CLI to list the backups. The only command I issued from the CLI was

C:\Users\username> duplicacy list

This was successful, but I do see that it caused the C:\Users\username.duplicacy\keyring file to change. The same three entries remained, gui1_b2_id, gui1_b2_key and gui1_password, but the file size decreased.

After doing that, the next backup by the GUI failed, with the messages:
gui1_b2_id is not found in Keychain/Keyring
gui1_b2_key is not found in Keychain/Keyring
Failed to load the Backblaze B2 storage at b2://Backup*: Authorization failure

I then had to stop the GUI job, go into the storage setup, and reenter the ID, key and password. After that it works again, but I wonder if this is a known feature or bug–it seems like a problem to me, though I am new to the software. I couldn’t find any mention of this on the forum or documentation.

I’m using version 2.1.1 of both the GUI and CLI on Win10.

This is actually caused by two issues. First, the CLI always reads the password and then saves it back, even if the password hasn’t been changed. Second, the password saved by the CLI can only be read by the same user, while the password saved by the GUI can be read by any user on the same machine. Therefore, you only run into this problem if you run the CLI and GUI as different users.

I’ll fix the first issue. The second issue will not be an issue in the new web-based GUI.

1 Like

And I guess that this fix will solve this, right?

Right. The fix has been checked in: Do not update the Windows keyring file if the password remains unchanged · gilbertchen/duplicacy@9d10cc7 · GitHub