Graphite-Docs / graphite

Encrypted, secure, user-owned productivity suite
https://graphitedocs.com
GNU General Public License v3.0
583 stars 90 forks source link

Graphite either deleted or just won't load my document #123

Closed CloverFeywilde closed 5 years ago

CloverFeywilde commented 5 years ago

I don't really know where to begin with this one. But in general graphite seems to have a difficult time with version control. For example: One time I worked on a document at work, then came back home, opened my laptop with graphite running, and it actually overwrote the progress I had made on said document with an earlier version.

I don't know if that's what's happened here. But suddenly a document I've been working on for hours vanished, and there are two documents that just won't load. Here is a screenshot of the console error I'm getting for both documents that won't load.

errorgraphite

I adore graphite and want very badly to use it. But unfortunately my cutoff point is data loss and time loss. I simply can't afford to lose my sense of security while working.

polluterofminds commented 5 years ago

Hey Bryan,

Graphite does not have version control. If you create a document on one machine, it is created and stored to your storage hub. You can then access it from another machine. However, if you were already logged into the other machine and had that document open and didn't refresh, then it's absolutely going to overwrite your changes that you made at work.

I'm not saying that's what you did, but it's not clear to me what the exact order of events were. If you can help me with that, I can better understand what's happening.

If you are saying that the document is not loading at all when you click the title from the main /documents page grid, then let's also try something else:

Click your avatar, click export all data, click Explore Your Files, then in the search box, search for 1541615445813

You should see a file returned in the results. Click on that and see if the JSON includes your content.

CloverFeywilde commented 5 years ago

So I believe I'm talking about two separate issues here, and would like to focus on just the missing files. I did what you mentioned and searched the files for that one. A result came up, but it was a blank JSON file.

I did some browsing of my files and realized more of my files had suddenly vanished. I'm now a bit mortified as I realize several important files are missing that had critical things in them that I needed to remember. After scouring through my files I found them... but.... They're really messed up looking.

corruptfile1 corruptfile2

Here are two of the missing files. I really don't have a detailed story on why these went missing. One moment they were there, the next time I logged in they weren't, and still aren't anywhere to be found in my Graphite Docs console. If you happen to know of why this happened, or how I can go about recovering the data in these, I'd deeply appreciate it.

I'm also interested in knowing: What is this garbled mess of text that is obscuring the content of my documents? Is this some sort of compression or encryption? Because almost every single one of my files when I download them -including the currently working ones- are coded in this mess.

polluterofminds commented 5 years ago

@bryanwillis7 The jumbled text you see is definitely because of compression, but you should not see that jumbled text when you open a doc. So, when you say you see that when you "download" the file, is that when you're exporting it to JSON? If so, I can put in a simple decompression on the export. But if you're seeing it in the actual document when you load it up, something else is wrong.

On to the more pressing issue: Data loss is absolutely unacceptable. The file you loaded up that had an empty JSON object seems especially strange, because any possible "data loss" would not actually be a loss. What it would be is the index file (the thing that drives the user interface to show your documents collection on the document grid) get corrupted somehow. This would make it seem like your files are gone simply because there are no links to them. But as I think I'm interpreting from your message, you've found some of these missing files using the explorer.

I can absolutely help you recover those so that they show up on the document grid again. But I can only hammer on my test environment to try to make that specific error happen again in an effort to try to fix whatever the root cause was. I can't replicate this through simple interactions. Any details you can provide will help track down the issue, but regardless, I'll be trying anything I can throw at my tests to try to force-replicate it.

Now, to recover those files, I need to push a code update. I will post here when that's pushed.

CloverFeywilde commented 5 years ago

It's not the actual document, it's definitely the JSON file that's garbled. So you're probably right and it's likely compression that's not letting me see what's in the JSON file.

As far as the file that had a blank json file. Upon closer inspection I think this other file might be a file that I accidentally created at one point and then immediately deleted. It has a title called "blank" so maybe that's what happened? The more pressing issue for me is within these garbled json files. They're where my missing data appears to have gone.

Thanks for helping me try to recover these files; I'll wait for your next reply before messing with anything further. As far as what might have happened to cause this? I honestly have no idea. I have a work laptop that runs linux and firefox, and a desktop that runs windows 7 and chrome. I often jump between the two as I move between my work setup and my home setup. I'll admit, Graphite runs a bit buggy on my work laptop. It is an old machine that lags pretty badly. It also has a weird issue that when I'm editing a document and hit the backspace button, the document will jump down to the bottom of the document, forcing me to scroll back up and find my place again. It's a bizarre issue. I don't think it's relevant to this though.

polluterofminds commented 5 years ago

Thanks for the additional info. I think the safer long-term solution is a re-architecturing of Graphite's storage mechanisms. Since I can't replicate the issue, the plan will be to implement a new process for storing data that will use libraries that are more tested. It will all still go into your Gaia storage, but it just needs to have a proven framework built around it.

I'm sorry you experienced this. But I did just deploy the update that will allow you to restore documents from the file explorer. So if you go back into the file explorer (might need refresh the browser first), then find one of the files that needs to be restored, you should see a "Restore or Re-Add" button. Click that and after a second you should be redirected to the Documents page where the file will be listed and accessible again. Let me know if you have trouble!

I'll be tracking the improved storage elsewhere, so I'm going to close this issue now, but if this Restore button doesn't work for you, let me know and I'll re-open.

CloverFeywilde commented 5 years ago

The restore feature worked to perfection. Thank you very much for your swift response and timely action. I deeply appreciate it.

polluterofminds commented 5 years ago

Hey Bryan, had a quick question about this:

The files that were removed from the doc grid, were they all files you had either shared publicly or shared with another contact? Or were these completely private files?

Trying to narrow down where the ultimate error may have happened.

polluterofminds commented 5 years ago

Or, one other question: had you been accessing shared files from others when you noticed the doc grid remove your files?

CloverFeywilde commented 5 years ago

@jehunter5811 No I haven't ever accessed other people's shared graphite files before.