Android app text editor doesn't write changes to server filesystem
Describe the bug Changes from the text editor in the Nextcloud Android app don't get synced on the server filesystem. But they show up in the editor on other devices.
~~Changing a file from the webbrowser makes it sync to the server filesystem.~~
Update 2024-02-14: See https://github.com/nextcloud/text/issues/5102#issuecomment-1944185020
In short: It's about timing between step 2 and 3. And it's also reproducible in a webbrowser.
Bug is probably a regression between Nextcloud > 25.0 and 26.0.9. Didn't recognized it in Nextcloud <= 25. See also: #4100
Â
To Reproduce Steps to reproduce the behavior:
- Create a md or txt file. (should have 0 bytes)
- Open the file in the Android app and add some text.
- Close the file in the Android app.
- File will still have 0 bytes. (visible via the files view in the Android app or a webbrowser, or directly on the server filesystem)
- Open the file on another device or in the webbrowser and you'll see the text added via the Android app.
Â
Expected behavior When closing the editor changes should be written to the server filesystem.
Â
Server details: Tested with two different servers.
- server 1
- Nextcloud version: 26.0.9
- PHP Version: 8.2 (Debian-12)
- Database: MariaDB 10.11.4 (Debian-12)
- server 2
- Nextcloud version: 27.1.1.0
- PHP Version: unknown
- Database: unkonwn
Â
Client details: Tested with two different Android devices.
- Device: Fairphone 3+
- Nextcloud app: 3.26.0
- OS: /e/OS-12.3-s (LineageOS-19 based Android-12)
- Device: Nokia 1 (TA-1060)
- Nextcloud app: 3.26.0
- OS: Android-10
WORKAROUND
Tick the check mark button at top to save the file.
I'm pretty sure this happened automatically at periodic intervals before Nextcloud < 26.
Just tried - also happens on the iPhone @juliushaertl - but after a while, it seems to store the file. I now see the bites in a file appear, and it doesn't take that long. Also syncs back to mys server. And my server is quite slow, so that might be a part of it?
@kolAflash how much time do you leave between steps 3 and 4? I have the feeling there's a time-out somewhere, rather than the file getting actively saved when you close the editor. Might be that closing the editor in the mobile app isn't communicated to the server or something like that?
The time between steps 3 and 4 seems not to be relevant. Even days after step 3 the file doesn't get synchronized.
But the time between steps 2 and 3 seems to play a role!
I often open a text file from my Android phone just to add a quick note like a single word (maybe 3 seconds). And the I directly close it in less than 2 seconds. In that case nothing seems to get saved.
On the other hand, if I the keep the file open for 20 seconds, changes get written to the filesystem.
Â
Also I must revise my first message.
"Changing a file from the webbrowser makes it sync to the server filesystem."
When there's not much time between step 2 and 3 the problem also appears in a web browser. (tested Firefox-122.0.1 on Debian-12 amd64)
Side note: Last week I updated from Nextcloud-26.0.11 to Nextcloud- 27.1.6. But I think that didn't made a big difference. Tomorrow I might be able to test this with a Nextcloud-28.0.2 installation.
Â
I'm pretty sure with Nextcloud <= 25 the file was always directly saved. I didn't change my usage behavior when I updated to Nextcloud-26.
Â
P.S. Thanks for looking into this :-)
I reproduced the problem with Nextcloud-28 from Android (Fairphone-3).
https://nextcloud28.our-servers.de/
https://en.nextfiles.de/demo/
But I couldn't reproduce the problem with Nextcloud-28 from a desktop browser (Firefox).