SkepticMystic / graph-analysis

Analyse the structure of your Obsidian graph using various analysis techniques
GNU General Public License v3.0
400 stars 19 forks source link

data loss from graph analysis possible? #59

Closed daxmonson closed 2 years ago

daxmonson commented 2 years ago

First off, thanks for the great plugin, it gets a lot of use here. Yesterday, I had a couple of panes open and one of them had an existing note titled "evergreen notes" open. In the other pane, I was reading a note and the Evergreen Notes note vanished without touching the keyboard or mouse. I found it in the trash and it had an added time-stamp "Evergreen Notes 10.38.38 AM.”

I checked the Obsidian Development Console and graph analysis was in there. It says "not found" for that note, but maybe GA checked it after it was deleted or somehow GA deleted it? The only other thing I can think of is Obsidian (native) sync deleted it. Might GA delete and add a time-stamp to the note title?

Here's the info from the console: Uncaught (in promise) NotFoundGraphError: Graph.forEachInNeighbor: could not find the “Evergreen Notes.md” node in the graph. at MyGraph.Wt.t. [as forEachInNeighbor] (graphology.umd.min.js:1:33933) at MyGraph.eval (MyGraph.ts:187:12) at Generator.next () at eval (tslib.es6.js:76:71) at new Promise () at _awaiter (tslib.es6.js:72:12) at Object.Co-Citations (MyGraph.ts:179:37) at Object.$$self.$$.update (CoCitations.svelte:86:37) at update (index.mjs:760:12) at flush (index.mjs:732:13) graphology.umd.min.js:1 Uncaught (in promise) NotFoundGraphError: Graph.forEachInNeighbor: could not find the " :white_large_square: Sort Now Roam Export/Evergreen Notes 10.38.38 AM.md" node in the graph. at MyGraph.Wt.t. [as forEachInNeighbor] (graphology.umd.min.js:1:33933) at MyGraph.eval (MyGraph.ts:187:12) at Generator.next () at eval (tslib.es6.js:76:71) at new Promise () at __awaiter (tslib.es6.js:72:12) at Object.Co-Citations (MyGraph.ts:179:37) at Object.$$self.$$.update (CoCitations.svelte:86:37) at update (index.mjs:760:12) at flush (index.mjs:732:13)

Also, this was listed under issues in console.

Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform

A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced.

To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData.

SkepticMystic commented 2 years ago

Hey dax, thanks for informative issue.

It's difficult to say with 100% certainty that GA didn't cause this. But that error makes sense even if GA isn't at fault. Something deleted the note, and then GA could no longer find it in the graph, which is true.

Also, there isn't too much that could go wrong with the GA code to cause this, so I don't even think it's possible for GA to delete a note.

Which version of Obsidian are you on? Perhaps it will be helping to ask for advice on the #sync channel on the Discord.

daxmonson commented 2 years ago

I do have a feeling it was sync related but figured I'd shoot you that info about GA in there first. That was my next stop, I'll let you know if I hear anything that might be of interest to you. I'm using the current build 0.15.9 Thanks again

HEmile commented 2 years ago

I agree with @SkepticMystic , GA should not be editing your files in any way.

daxmonson commented 2 years ago

It probably isn't GA and more likely sync related. Hard to debug since I didn't look at sync logs until they deleted that date/time and started afresh. The only other thing I could see in console was GA so had to ask.