[Data Loss] File modified in Files app while offline resets on reconnect
Steps to reproduce
- Make a folder available offline
- Open the folder in the Files app
- Go offline
- Open a file in the folder from the Files app -- e.g. a PDF using markup
- The file will now show a "download" icon -- why?
- Go back online
- File syncs again
- Changes are lost
Expected behaviour
The changes should be uploaded.
Actual behaviour
The changes reset back to the server version.
Screenshots
N/A
Logs
N/A
Reasoning or why should it be changed/implemented?
Prevent data loss
Environment data
iOS version: iPadOS 16.6
Nextcloud iOS app version: 4.8.6.4
Server operating system: Irrelevant (Docker)
Web server: Apache Docker with nginx proxy
Database: Postgres
PHP version: 7.4
Nextcloud version: 27.0.2
Is the file really downloaded (original comment deleted)
Yes it is, otherwise I wouldn't be able to open it offline.
A similar problem occurs in the app: When editing with markup via the (...) menu, the app asks after pressing Done whether it should be overwritten or saved as a copy. Overwrite leads to an infinite loading spinner as long as the device it offline.
In summary, offline mode is completely unsuitable for editing files.
I also regularly experience this quite annoying issue with the following workflow:
- Edit a spreadsheet or markdown file on a computer.
- Have the file marked as offline in the Nextcloud app on an iPad.
- While travelling on a train (where the network connection is spotty at best, but mostly no network is available), open the file via iPadOS Files app. Most of the time it can be edited without issues while being offline. Note: sometimes opening the file fails immediately or on subsequent tries.
- Most of the time, changes done while being offline are not synchronized to the Nextcloud server. After synchronization the file is reset to the state it was before going offline. Very rarely synchronization works as expected, but I assume these are scenarios where connection to the Nextcloud server was temporarily working while saving the file.
What is annoying in my opinion, that there is no indication somewhere that there are issues with editing offline files (or, at least, I didn't see one). The file can be marked as offline and editing via the Files app works seemingly without issues (until it should get synchronized). Viewing files usually works fine both via the Files or via the Nextcloud app.