Roam-Research / issues

Roam Research - A note-taking tool for networked thought.
https://roamresearch.com/
304 stars 7 forks source link

Unable to sync; "Cannot add ... because of unique constraint" #103

Open bruab opened 4 years ago

bruab commented 4 years ago

Describe the bug

My sync indicator has been stuck on orange all day.

When I delete blocks in my Daily Notes, they reappear.

I've seen empty blocks show up in my Daily notes and on other Pages.

In the console, I see a couple errors:

ERROR [relemma.fire.link.core:218] - [DEFAULT] - error while applying confirmed tx #error {:message "Nothing found for entity id [:block/uid \"3tdgq58DX\"]", :data {:error :entity-id/missing, :entity-id [:block/uid "3tdgq58DX"]}}

and

sentry.js:2 ERROR [relemma.fire.link.core:257] - 
#error {:message "Cannot add #datascript/Datom [25508 :block/uid \"7Qu8ozf3w\" 536955026 true] because of unique constraint: (#datascript/Datom [25822 :block/uid \"7Qu8ozf3w\" 536955003 true])", :data {:error :transact/unique, :attribute :block/uid, :datom #datascript/Datom [25508 :block/uid "7Qu8ozf3w" 536955026 true]}}

I tried deleting the blocks in question, but they reappear. Tried āŒ˜-Shift-R reloading, no luck.

Screenshot: https://d.pr/i/1KMAcz

To Reproduce

Sorry, no idea šŸ˜¢

System Information:

Additional context

šŸ¤” I restarted my computer this morning. I use āŒ˜-backtick to switch windows quite a lot.

If there's a hacky way to delete or replace the blocks, I'd be excited to learn about that. Or if I can wipe my cache but know that only the error-ing blocks will be lost, šŸ‘

bruab commented 4 years ago

Forgot to mention that my āœ… DONE todo items keep unchecking themselves

bruab commented 4 years ago

Oh one more clue - I noticed this shortly after attempting to paste in an image. That image upload is the only piece of actual lost data that I observed.

Gotta get on with life, so I'm gonna clear cache and manually reconcile as best I can. LMK if I can help tho

jlongtine commented 4 years ago

I've had the same problem today. I suspect it's something to do with the overload issues Roam has been experiencing.

cdcme commented 4 years ago

Just trying out Roam and I'm also having this issue. None of my pages stick around, links are lost (like Roam forgets when a page is created), etc. Seems related to data synchronization because the data sync indicator stays orange. Also possibly related, the graph doesn't show my newly created pages.

filipesilva commented 4 years ago

Heya, we've recently fixed some synchronization bugs. Can you try force refreshing your web page to get the latest version? If you're still seeing this let me know.

bruab commented 4 years ago

šŸ™ Ty @filipesilva !

... I'm gonna clear cache and manually reconcile as best I can. LMK if I can help tho

ā˜ļø This worked for me last week and I've been fine since then šŸŸ¢.

Hope everybody else has managed to sync too šŸ¤ž