nextcloud / nextcloud/android

When opening txt file : "The document was saved outside the editor. The changes could not be applied."

Open
#11,508 2 comments 1 reaction 0 assignees View on GitHub
bug feature: editor
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [X] This is a **bug**, not a question or an enhancement.
- [X] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).

### Steps to reproduce

The title of this issue contains the error "The document was saved outside the editor. The changes could not be applied." which I translated from the error I get in Dutch on top of my screen when opening a txt file on my phone or on my tablet.

When I open a txt file on my phone or my tablet most of the times I get this message:
( on the right side is the file as it is stored in the server )
![Screenshot_20230406-095138_Nextcloud](https://user-images.githubusercontent.com/71119057/230318831-50cead66-e7c7-41c0-81df-001a4c7143d9.jpg)
When I click the left button nothing happens. When I click the right button the left part of the screen goes empty and nothing happens.
![Screenshot_20230406-095243_Nextcloud](https://user-images.githubusercontent.com/71119057/230318836-dda687d3-3956-4aa1-a921-a2f4f224a53a.jpg)

To reproduce:
I create a file on Windows 10 with Nextcloud client 3.8.0 or Ubuntu 20.04.6 LTS with Nextcloud client 3.5.4 and name the file test.txt and I put some text in it and save the file.
The file appears on both my Tablet and my Phone and I can make changes on my phone, save the file, make changes on my tablet, save the file, make changes on my phone, save, change on the tablet etc.
This works as until I made a change either on Windows with notepad or mousepad on Ubuntu. When I make a change there Windows and Ubuntu have no issue but the message appears on my tablet and my phone when I try to open the file for editing,

### Expected behaviour

It should be possible to edit a file just like that or the buttons on the screen with the message to use the current version ( left button) or the stored version ( button on the right ) should load the selected version for editing.

### Actual behaviour

When I click the left button nothing happens. When I click the right button the left part of the screen goes empty and nothing happens.

What works is sharing, saving it somewhere on my phone, delete in Nextcloud, (local if local and server version) and upload the shared file again from my phone folder into the same location in Nextcloud.
After that I can edit the file a couple of times on my tablet/phone before I run into the same issue after editing on my laptop so I share and upload again on my tablet /phone
It happens both on my phone and tablet so I do not think it is a device issue.
There are no messages in the log on the server ( 25.0.4 Bullseye Raspberry Pi 4 )

Leaving the screen and force a sync does not help and I get the message that it is already synced.
Renaming and renaming back does not help.
Downloading and trying to edit gives the same result.

### Android version

10

### Device brand and model

Samsung phone A06+ Model SM-A605FN, Samsung Tablet TAB A10.5 model SM-T590

### Stock or custom OS?

Stock

### Nextcloud android app version

3.24.2

### Nextcloud server version

25.0.4

### Using a reverse proxy?

Yes and No. I have the issue via Internet and directly on my LAN.

### Android logs

_No response_

### Server error logs

```bash
There are no logs in the system error log.
When I use impersonate to go to my test user I do see messages in the log so the logging is working but normally it is empty.
```

### Additional information

On my Android devices I have no storage/emulated/0/data/nextcloud.log files.
Probably because the clients are not beta or dev versions.
My reverse proxy uses standard https ports so it is a plain forwarding of the https port to my Raspberry Pi.
I am using Nextcloud on my Raspberry since version 20.something and did not have the issue before.
It just started some time ago.

What also does does not help is reinstalling the app on android.
On my Tablet I selected Setup > Apps > Nextcloud and forced the app to stop, cleared the cache and the storage and after that removed and reinstalled the app. I rconnected to my nextcloud via my domain name, tried to change the file and the same screen pops up with the same results. I did not get further.
Did the same again and connected to the IP adress on my LAN where the WiFi is in the same subnet and still the same message.

When I make changes to the file on my laptop and try to open the file again on my phone or tablet I see the message and the new file on the right so it is synced from my latoptop to nextcloud and to the android devices but I can't edit the file on android.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.