encryptic-team / encryptic

An encryption-focused open source note taking application
Mozilla Public License 2.0
348 stars 40 forks source link

Dropbox .json file not read #27

Open glocalglocal opened 5 years ago

glocalglocal commented 5 years ago

I do have the Dropbox file structure (LavernaNG\user\notes\xxxx.json , run Encrypt 0.0.1 and it tells me "You opened Encryptic for the first time on this device" which is not true. I try Import, select the file above and nothing happens. I try Next and I am asked to create a new account.

daed commented 5 years ago

Background

I'm seeing a recurring problem with the way laverna/encryptic are designed:

The software only reads the dropbox file structure when it is syncing to/from dropbox. All of the working data is stored in the browser. You can't import it or interact with the dropbox files until you have it set up, but you can't exactly import the profile by itself in order to do that either.

The problem is that user expectation is that the dropbox files mean something in the context that you should be able to just 'link up' with them. That's not bad, but that's not how it's currently designed.

From a technical point of view, the profile contains the private key, so there's no practical reason why you shouldn't just be able to import it by itself, however, you don't want to store the profile in Dropbox, because we don't trust Dropbox (and don't want to). So then how to you get set up on a new computer? By exporting your old data to zip and then importing it on the other computer/browser/app.

So by design you'd have to have your profile exported in addition to your key in order to get back into dropbox, assuming there is a method of importing a profile (we don't to profile alone, but you can import the backup zip file).

A future option would be a 12 word seed phrase like bitcoin wallets and lastpass have. I'm not entirely certain how to go about doing that, or if our encryption library would support it.

And now the actual issue

To get to your exact issue, do you have another browser/device that has your information on it? Can you export that and then import it into the other browser/device?

glocalglocal commented 5 years ago

I reported this as a bug in case it helps but I don't really need to recover the data because I don't have important data in there yet. I've been trying things out but Encryptic will be useful to me when/if there is a mobile app syncing with the desktop. I can follow the steps you gave me to recover the data if it helps you debug though, but it sounds like you know what is happening in the code.

daed commented 5 years ago

That's good. I have a sense of eagerness for people to start using it, but a certain amount of horror at the idea that someone would put something important in it right now and then can't get it out. I migrated my laverna stuff to encryptic, but you gotta eat your own dog food so to speak.

This looks almost identical to what ghosttie reported, so I've got a good understanding of how to fix it, but i'm not sure what causes the profile to disappear in the first place, and it's a little worrying that two people have now reported it.

daed commented 5 years ago

There were issues with sync/import that have been fixed in the latest release. If you're still interested in the project, I would be glad you had a look at it to see if it resolved some of the issues.

Also, I've created a wiki page on the proper way to get two different devices synced to a dropbox account.