-
Notifications
You must be signed in to change notification settings - Fork 135
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
Having note open across suspends or internet connection loss led to unsaved data #122
Comments
AFAIK its a known issue, talk to @LukasReschke Session or tokens seem to time out although a heartbeat is present |
I think there are two posibilities:
|
Solution should be to always store a note backup in localstorage (which could be too small in some cases, indexeddb or ask user to increase storage?) together with its modified time in unix time in milliseconds If a note update is sent to the server, the server will compare the modified timestamps of the sent one and the one on the disk. Only if the sent timestamp is greater or equal, the note will be updated, otherwise the contents of the note on disk will be returned. You could ofc also offer a diff and let the user choose which one to keep if the sent timestamp is older than the version on the server. |
That would be nice. Is there anyone who want to implement this? |
This issue with data loss on connection problems is quite important. Currently this app is not a safe home for all our data like it's stated on the main page. But I'd like it to be. |
Removed the organizational comments about Bountysource – you can now donate to this issue (and others) at https://www.bountysource.com/issues/47696500-having-note-open-across-suspends-or-internet-connection-loss-led-to-unsaved-data 👍 |
There is a similar issue in the mail app: nextcloud/mail#121 - I think the fix should be equal (currently, it is unfixed for some years). Just for the protocol: a suggested fix in the server (nextcloud/server#6360) did not improve the situation for this app. The suggested offline-mode (see #122 (comment)) would be nice, but it has another goal and should be discussed in another issue. I don't think that we need this to solve the original issue, here. |
I think we should implement a service worker for some kind of offline mode. This would also make it easier to turn this into a PWA, which I was going to suggest in another issue. |
If the request after reconnecting failed due to a CSRF token issue this should mostly be addressed now that nextcloud-axios is using the refetched token: https://github.com/nextcloud/nextcloud-axios/blob/master/lib/interceptors/csrf-token.ts @jancborchardt Do you still see this happening? 😉 |
I see this happening with the most recent update of Notes (4.92). I never had it before but it's happening all the time now. |
Still happening. Notes v4.11.0. After having the notes editor open for a while (I think 2-3 hours are enough) I can make changes in the document, which are not recognized anymore and lost on page refresh. The little checkmark does not show the "unsaved" dot and the version history is not updated anymore - even when actively clicking the save checkmark - see screenshot. |
I had the notes app open in a tab since yesterday. Today I continued on the same note and finished what I was writing. After encountering the copying issue #121 I checked in the Notes folder of Files, and found the note to be last saved 21 hours ago.
After having copied the new text somewhere else, I refreshed the page and the new text was gone. So this is quite a big issue. ;) Maybe we should have a constant heartbeat to the server, or force a reconnection? Not sure if we do something special in the texteditor app here.
cc @nextcloud/notes @nextcloud/javascript
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: