glushchenko / fsnotes

Notes manager for macOS/iOS
https://fsnot.es
MIT License
6.29k stars 465 forks source link

Sync issue overwrote my note #1251

Closed nth-chile closed 2 years ago

nth-chile commented 2 years ago

Description

A syncing error between iOS and mac app caused the latest version of my note to get lost

To Reproduce

This is what I did, but I'm sure it's not consistently reproducable.

  1. Edit a note on mac app, close computer
  2. Later, open the note with iOS app. The note is not up to date
  3. Edit
  4. Later, open the note with mac app. It reflects the phone version, and what you wrote in step 1 has been lost

Expected behavior

Any way to ensure that changes will never be lost

FSNotes version

5.1.3

macOS/iOS version

4.8.5

Additional context

No response

gingerbeardman commented 2 years ago

Sync is managed by iCloud, it should create a second file when there is a conflict. So there would be two files and you'd have to resolve the clash yourself. Please confirm.

nth-chile commented 2 years ago

I've seen that before, but this time it didn't happen

nth-chile commented 2 years ago

Out of curiosity, when you say that sync is managed by iCloud, do you mean that iCloud creates the conflict file?

gingerbeardman commented 2 years ago

https://github.com/glushchenko/fsnotes/blob/d113f9e0aa36b44fd66362ed4df38e539d1c3170/FSNotes%20iOS/CloudDriveManager.swift#L312-L350

nth-chile commented 2 years ago

That's cool/good to know. We can close this since it's not easily reproducible and because it might be out of our hands, unless you guys think there is a possibility that the FSNotes code is to blame.

@glushchenko

makesmallprogresseveryday commented 2 years ago

When the notes are encrypted, the BUG will reproduce. This BUG is not an iCloud BUG.

  1. Both the computer and the phone unlock the encrypted notes.
  2. Then the iOS app edits the notes, by which time iCloud has synced the encrypted files to the computer.
  3. However, the Mac app will not reload the updated files, this time still display the old files, and then use the computer editing will lose the contents of the phone changes.
nth-chile commented 2 years ago

Today, this happened: I updated a note on my mac. Left the house, opened the iOS app which was already running in the background. I saw the old version of the note appear immediately (it was already the selected note from earlier) but it didn't update. I knew that editing it might cause the newest version to be lost, so I just quit the app (double tap home button, swipe up to quit) and relaunched and the new version of the note was there.

nth-chile commented 2 years ago

Another thing that just happened: I opened the desktop app from my other laptop and I saw yesterday's version of the note. I clicked around to different notes to try to get it to refresh, but no success. When I edited the note, I looked over to my other computer and watched the note get replaced with yesterday's version

EDIT: looks like a conflict file was created this time

glushchenko commented 2 years ago

Hi, guys!

I made some improvements for sync conflicts, no more overwrites for encrypted notes. I think the bugs have been resolved in FSNotes 5.2.0.

https://github.com/glushchenko/fsnotes/releases/download/5.2.0/FSNotes_5.2.0.zip