Can't decrypt notes. FormatException: Unexpected character
Before submitting an issue, please check the following
- [x] I have searched for similar issues (both open and closed) and cannot find a duplicate
- [x] I agree to follow the Code of Conduct
Describe the bug
When I try to enter my encryption password to sync my notes, Saber throws this error:
"Something went wrong connecting to the server. Please try again later.
FormatException: Unexpected character (at character 1) HBEGIN:oc_encryption_module:0C_DEFAULT_MODULE:ciphe r:AES-256-CTR:slgned:tru..."
bug appears both in the Android and Flatpak version
To reproduce
- Login with Saber
- Enter encryption password
- Error appears
Expected behavior
Entering the right password should work and decrypt the notes. If the entered password is wrong, the error should be clearer about what's happening.
Saber version
v0.26.9 (26090)
Device
- Device: Samsung Galaxy Tab S3
- OS: Android 9
and
- Device: x64
- OS: Arch Linux
Anything else?
Assuming this is using nc.saber.adil.hanney.org, did you create the account a long time ago or recently?
I scrapped server-side encryption years ago because it was redundant and slowed the server down. If that's affecting you, I think the only option is to delete and recreate your account
Yes, I'm using nc.saber.adil.hanney.org, and the account is more than 2 years old. If the note encryption doesn't work, why does the app still prompt me to uncrypt my notes? What options do I have to recover them?
I'm also wondering why I should recreate my account, since the login works and it's just the decryption that doesn't.
If the note encryption doesn't work, why does the app still prompt me to uncrypt my notes?
It's server-side encryption that's now disabled. We only use client-side encryption now, so the app needs an encryption key.
What options do I have to recover them?
Login to the web interface and download the Saber folder if it lets you (I doubt it will). After recreating your account, upload the files back.
I'm also wondering why I should recreate my account, since the login works and it's just the decryption that doesn't.
Your account's files weren't decrypted properly in the migration for whatever reason. The error message you showed says it's looking for an encryption module that isn't there. I'm not familiar with Nextcloud's codebase so I can't say why this happened: my account wasn't affected.
I was able to download the directory with the encrypted files. Then I created a new account (which in hindsight I don’t think was necessary) and set the same encryption password as before. The only thing that changed is the config.sbc file, which now just contains one line for the key instead of what was printed in the error message. I then reuploaded all my files, but I still couldn’t decrypt my notes, as they don't appear in the app (maybe a different encryption algorithm?) Is there anything I can do from here?