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

Warn if document is not saved when closing - Data loss #3373

Open
internethering opened this issue Dec 22, 2023 · 11 comments
Open

Warn if document is not saved when closing - Data loss #3373

internethering opened this issue Dec 22, 2023 · 11 comments

Comments

@internethering
Copy link

Describe the bug
If, for whatever reason, the document is not saved automatically when editing, the modified content is irrevocably lost after closing the tab or document.

Expected behavior
If the document has not yet been saved, a pop-up message should warn you when closing that it still needs to be saved.

Client details:

  • OS: Windows/Linux
  • Browser: Firefox
  • Version: 120.0.1
  • Device: desktop

Server details

Operating system: Gentoo Linux

Web server: Apache 2.4.57

Database: MariaDB 10.11.5

PHP version: 8.1.26

Nextcloud version: 28.0.1

Version of the richdocuments app 8.3.0

Version of Collabora Online 23.5.604

@juliushaertl
Copy link
Member

Did you encounter any data loss? Would be good to check the Collabora logs then. In general this should not be a problem with Collabora as the file state is always managed on the server so even if the browser window is killed the changes are persisted on the server.

@internethering
Copy link
Author

internethering commented Jan 10, 2024

Did you encounter any data loss?

yes, a filled document was empty.

the changes are persisted on the server.

in this case not and It would be nice to popup a message: not saved

@juliushaertl
Copy link
Member

In that case it would be interesting to see any logged errors still. Even if the failure occurs once the document should still be on the Collabora server and available to open again with the content i think.

@juliushaertl
Copy link
Member

FYI @pedropintosilva as the autosaving and a possible manual save blocking dialog is probably something more on the online side, though I'd rather prefer to fix the root cause instead of having a blocking operation that could still lead to failures on saving.

@pedropintosilva
Copy link
Contributor

Thanks @internethering for testing and taking the time to report. This is very valuable.

Yes I agree @juliushaertl . @internethering are you able to gather those logs?

@Ashod
Copy link
Collaborator

Ashod commented Jan 11, 2024

@internethering, thanks for your report.

Describe the bug If, for whatever reason, the document is not saved automatically when editing, the modified content is irrevocably lost after closing the tab or document.

The document is always automatically saved upon closing/unloading the document. Of course there is no expectation that the user must be there and invoke the save command for the server to save; this is done automatically, in the background.

If, for whatever reason, saving and uploading to storage cannot be accomplished, error logs will clearly indicate data-loss.

As a last-resort, there is a feature to quarantine documents that aren't uploaded to storage. This needs enabling from the config, and the files are only accessible by an admin on the server, but the feature is there as a last resort.

Indeed, if you open a text document, make a change and close the browser without saving, the document should still be saved and no data loss should occur.

Expected behavior If the document has not yet been saved, a pop-up message should warn you when closing that it still needs to be saved.

The pop-up message will not be very helpful, I'm afraid. For one, because the user can close the browser and we cannot stop them.

It would be very interesting to have steps to reproduce, if indeed you have found a reproducible data-loss case. Similarly, would be very helpful to get trace-level logs from coolwsd, to see exactly what is happening.

Thank you.

@artfulrobot
Copy link

Hmmm. I'm having trouble with not saving unless manually saving, too. Will see if I can reproduce reliably.

@artfulrobot
Copy link

  1. Create new document (optional, can use existing)
  2. Open it
  3. put in some text
  4. close it with the × in the top right
  5. open it.
  6. document is blank!

What's odd is that if I open the document in a 2nd user on a 2nd browser at step 2, then on step 3 I get the collaborative experience; each user can see what the other writes. Yet when it's closed - without saving - data seems lost.

nextcloud-bug.webm

I will look for any logs.

@juliushaertl
Copy link
Member

Yes, this is definitely something that should not happen. The Collabora server logs would be very helpful in that case.

@artfulrobot
Copy link

There's nothing in the nextcloud logs. Some stuff about can't find a OCA\Circles\CirclesManager class, but doesn't look relevant.

I'm using "CODE" - where would I find the server logs for that?

@timur-g
Copy link

timur-g commented Feb 1, 2024

By version of Online, that should not be CODE but Built-in CODE Server and that issue is CollaboraOnline/richdocumentscode#238.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants