deltachat / deltachat-desktop

Email-based instant messaging for Desktop.
GNU General Public License v3.0
951 stars 170 forks source link

No private key found when trying to import keys #864

Closed nicodh closed 5 years ago

nicodh commented 5 years ago

If I export keys to a folder and try to import them again, I get an error "No private keys found in ..." although I can see them in the folder as "private-key-default.asc" etc...

Might be a core issue...?

Happens on current master with latest rust core on Mac

Jikstra commented 5 years ago

Haha I got that error yesterday too. I guess it's a core issue, as it works on 0.104.0 but not on the newer versions with rust core: https://github.com/deltachat/deltachat-core-rust/issues/150

And now we're both trying to fix backups ^^ Seems like our brains chose a similiar thinking path ^^

oe1rsa commented 5 years ago

deltachat-desktop 0.104.0 stable: cannot import a backup created with android client, also cannot activate autocrypt message issued from android - > results in message "File does not contain a valid private key"

oe1rsa commented 5 years ago

Oh, I forgot: Ubuntu 18.10 deb package.

Jikstra commented 5 years ago

@oe1rsa i'm a bit suprised that you're getting this bugs with 0.104.0. It should be a bug in the new rust libdeltachat and that got introduced with version 0.105.0. Can you tell me the core version you're using? You can figure this out by clicking in the menu on Help -> About Deltachat -> Copy JSON and post it here. This bug got fixed already, so if you upgrade to the 0.105.0-pre2 release you shouldn't face this one anymore. But be careful, the new rust core isn't as stable as the c one, so you will definetly face bugs.

oe1rsa commented 5 years ago

The version numbers are multiple. In the top bar it claims to be 0.104.0 in the about box it says 0.103.0 and the core is v0.43.0

I am a little reluctant in posting the complete json, since I can see that there is some private details in there. So I hope the bits posted still make sense to you.

--


| Roland Schwarz |)( | | __) | mailto:roland.schwarz@blackspace.at ____| http://www.blackspace.at

Jikstra commented 5 years ago

@oe1rsa oh sorry, yes the json contains private details, sorry for recommending that, version number is more than enough for us. I thought this got introduced with the rust core, but maybe it's actually rpgp and/or a c core and early rust problem. @oe1rsa if you have the time for this, can you try out the 0.105.0-pre2 release and test if it happens with that release too? But please do a backup of your dc config before (just duplicate/backup your ~/.config/DeltaChat folder somewhere) and than you can switch back to 0.104 if that's more stable for you. @hpk42 i think you fixed this bug (at least for asm) in rust, can you give some insights?

oe1rsa commented 5 years ago

@Jikstra I certainly would like to give the 105 pre release a try, but at current I cannot afford the time figuring out of how to build the desktop app from source.

oe1rsa commented 5 years ago

@Jikstra oh, sorry I just found the deb. I will try and report back.

oe1rsa commented 5 years ago

@Jikstra sorry to have to say that: The behaviour is exactly the same as before :-( I issue sending the autocrypt from my android phone. Interestingly I have to shutdown the delta chat client and restart it until I see the message in the desktop version. Then I enter the key, resulting in the same message as before stating the missing key in the file. Perhaps I am doing something wrong? What I would have expected from reading the docs is, that once I start the desktop app I would have the opportunity to import the backup file I have created in the android client. Instead I am asked to log in (after having entered my credentials). So, without having tried to import the backup I tried to sync the both devices, android and desktop.

oe1rsa commented 5 years ago

Oops, now I tried to import the backup, with a totally unexpected result: The delta chat app just dies without any message or whatsoever.

oe1rsa commented 5 years ago

Starting the program from the command line issues the message: /opt/DeltaChat/resources/app.asar/src/main/index.js:28 throw err ^

TypeError: dc.backupImport is not a function at EventEmitter. (/opt/DeltaChat/resources/app.asar/src/main/ipc.js:137:50) at EventEmitter.emit (events.js:194:13) at WebContents. (/opt/DeltaChat/resources/electron.asar/browser/api/web-contents.js:390:13) at WebContents.emit (events.js:194:13)

Jikstra commented 5 years ago

Importing doesn't work (yet, this pr will fix it https://github.com/deltachat/deltachat-desktop/pull/863) but with the 0.105.0-pre2 at least autocrypt setup message should work. But i will try it out tomorrow with a fresh setup, maybe something weird happend. Thanks for your efforts!

hpk42 commented 5 years ago

just verified, it's a core bug and i reported it here: https://github.com/deltachat/deltachat-core-rust/issues/596