Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Loss without Manually Triggered Sync #223

Closed
simonspa opened this issue Jun 2, 2017 · 3 comments
Closed

Data Loss without Manually Triggered Sync #223

simonspa opened this issue Jun 2, 2017 · 3 comments

Comments

@simonspa
Copy link

simonspa commented Jun 2, 2017

There is a considerable chance of data loss since the app does not sync notes when opening them. I edit my notes both from the app and on my computer.

After changing the note on the PC, it is synced to my nextcloud instance. When opening the same note in the notes app, the locally cached version is displayed and even if I leave the note without editing, this version is then synced up and overwrites the other data.

The sync protocol really needs to check for changes (timestamps or similar) and then force a re-sync before to allow editing.

The situation can only be circumvented, when manually triggering a sync by "pulling" the list of notes in the main view.

Let me know if I can help with additional information.

@simonspa
Copy link
Author

simonspa commented Jun 2, 2017

I also found some error messages in the log, in case this is helpful:

{"reqId":"oyfBRBcw0MXepww8YG8W","level":3,"time":"2017-05-29T21:03:57+00:00","remoteAddr":"178.xxx.xxx.xxx","user":"me","app":"PHP","method":"PUT","url":"\/index.php\/apps\/notes\/api\/v0.2\/notes\/42973","message":"Undefined offset: 42973 at \/var\/www\/nextcloud\/apps\/notes\/service\/notesservice.php#182","userAgent":"Dalvik\/2.1.0 (Linux; U; Android 7.1.2)","version":"12.0.0.29"}
{"reqId":"oyfBRBcw0MXepww8YG8W","level":3,"time":"2017-05-29T21:03:57+00:00","remoteAddr":"178.xxx.xxx.xxx","user":"me","app":"PHP","method":"PUT","url":"\/index.php\/apps\/notes\/api\/v0.2\/notes\/42973","message":"in_array() expects parameter 2 to be array, null given at \/var\/www\/nextcloud\/apps\/notes\/service\/notesservice.php#182","userAgent":"Dalvik\/2.1.0 (Linux; U; Android 7.1.2)","version":"12.0.0.29"}

@korelstar
Copy link
Member

Did you read #161? I think that goes in the same direction. I thought about a good solution for this problem and wrote some ideas down: see nextcloud/notes#56 (this requires changes in the server API). Please have a look and feel free to comment.

Regarding your log in the second posting: This is a known bug of the server app (see nextcloud/notes#68) which has been fixed in nextcloud/notes#85. Unfortunately, there is no release containing the fix, yet.

@simonspa
Copy link
Author

simonspa commented Jun 5, 2017

Okay, great, I browser through the issues before opening this one but somehow missed #161. I guess we can close this here as duplicate.

Thanks also for the pointer concerning the other error.

@simonspa simonspa closed this as completed Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants