nextcloud / ios

📱 Nextcloud iOS App
https://itunes.apple.com/us/app/nextcloud/id1125420102
GNU General Public License v3.0
1.93k stars 875 forks source link

File content lost in offline mode when using microsoft word app. Potential reason: Files App does not allow access to offline synced nextcloud folders. Debugging help needed! #1387

Open MarkusKepert opened 4 years ago

MarkusKepert commented 4 years ago

Expected behaviour

File content is stored on ipad and synced with nextcloud after wifi connection recovery.

Actual behaviour

File content written in offline mode was completely lost and file was resetted to old content. I think...but i have no really facts that support my thesis: In Files App i can not open the offline synced folder from nextcloud storage. This is reproducable when turning wifi off AND activating flight mode. Activate flight mode only did not cause this issue: i was able to open the folder. Open files & folder in nextcloud app was working!

The detailled reason is not really clear. And...it was only one time reproducable and i am not 100% sure that i describe everything correct. Thats why i need help with this issue, maybe someone has some more idea to reproduce this or find some logs or maybe a shadow copy of the file change. And it was also not myself who lost the data on his ipad (i'm also an apple newbie)

Steps to reproduce

Then: played around much and figured out:

Sorry for the much details, but i am not sure what is really important to trace this issue. Maybe someone has an idea (grab a hidden log file, app crash protocol, whatever.) I don't know much about iOS troubleshooting.

Reasoning or why should it be changed/implemented?

Annoying User won't work with her new ipad until this is fixed.

iOS version

13.6

App version

3.0.4.11

Server configuration

Operating system: Debian Linux 10.5 Web server: Apache 2.4.38 (builtin) Database: mysqld 10.3.23-MariaDB-0+deb10u1 PHP version: 7.4 Nextcloud version: (see Nextcloud admin page) 19.01

MarkusKepert commented 4 years ago

Some update in investigation: Maybe the issue happens when trying to work on documents that was initially created within word and the saved in nextcloud folder.

Because: Furch such file you find 1 item in document history. When trying to access this item it shows an error: "Die Datei ist an einem leider nicht unterstützten Serverspeicherort gespeichert"

Big question: Word/Microsoft issue or nextcloud issue?

marinofaggiana commented 4 years ago

Hi @MarkusKepert we (and more customer) have several ticket open for issue with Microsoft Office and the Files App, unfortunately we are not in control of what happens.

MarkusKepert commented 4 years ago

@marinofaggiana Thanks for the answer. I havent an idea where to deep dive into this issue.

What about open my test: The folder synced for offline use i was not able to open in files app? Is this a related topic or should i open a new issue for this?

Regards, Markus

marinofaggiana commented 4 years ago

What's do you mean for "offline" folder in Files app ?

MarkusKepert commented 4 years ago

I've setup the file sync for the user in nextcloud add and choosed the option "offline available favorites". One folder is set as fav. In owncloud app i can view the content of this folder. In files app i can't view the folder content and i get the same error like i want to try to open a folder that is not synced.

marinofaggiana commented 4 years ago

Always in Files app ?

MarkusKepert commented 4 years ago

Yes, tried several times.

marinofaggiana commented 4 years ago

I have try now and works ... so download the latest version in TestFlight, then, disable Nextcloud on Files app and re-enable him.

MarkusKepert commented 4 years ago

Let me test this on afternoon! Thanks

MarkusKepert commented 4 years ago

@marinofaggiana I‘ve Tested like you described, but i have still this error with the Felder „Schule“. This folder is explizit set as offline available and is starrend with option „Favoriten offline avail“

But it is Not Accessible via Files app. I‘ve disabled and enabled Nextcloud Storage in files App After installing the TestFlight Version.

Bildschirmfoto 2020-08-26 um 21 27 33 Bildschirmfoto 2020-08-26 um 21 25 09 Bildschirmfoto 2020-08-26 um 21 26 02
heluca commented 4 years ago

I am having a similar problem with an app called Write.

In the few weeks, the iPad Write app has lost content within my notes. It’s become a big problem for me as this now happens regularly, but not consistently. A loss of network connectivity is definitely possible.

From memory today: Today, I created a note on my iPad in the morning and wrote some content. I saved it. During the afternoon, I open the file again, add more notes. Then I created a new note. From memory, the content from the previous session was still there. Finally, I opened the original note, but everything I wrote in the afternoon is gone. The only content is from the first session in the morning.

Recent files shows that the most recent document was the note, but the timestamp is from the morning. I am using Nextcloud, so I assume there is some sort of failure happening with the Apple Files, but there is no warning or error - as though the afternoon session never happened. I wrote more on the note and it worked as expected. Nextcloud has revision history, but it only has the morning session, so it seems the save never took place. Usually when this problem occurs, I didn’t change notes, the app opens to an previous version of the note.

MarkusKepert commented 4 years ago

@heluca Thats exact the behaviour we faced here (but not really reproducable). For me it seems that something is weired with the nextcloud <-> files integration and it's not related to the edit application (word, files, excel, whatever...)

arnogramatke commented 3 years ago

Has this been solved or is this still under investigation?

MarkusKepert commented 3 years ago

Has this been solved or is this still under investigation?

From my point of view this issue is not resolved.

heluca commented 3 years ago

No, I've stopped using the Nextcloud Apple Files integration as it is completely useable due to consistent data loss. I don't receive any errors or and there are no problems in the app log, so I assume it is a bug.

MarkusKepert commented 3 years ago

What is your alternate solution to have files synced on your ios device? Or do you haven't offline usage?

heluca commented 3 years ago

I still read my Nextcloud files with my iPad, but I don't write to them. Thankfully, I kept my MS Surface Go after I bought the iPad, so I am still using it. Not much of a workaround.

MarkusKepert commented 3 years ago

Thats not an option for me @heluca Thanks. I'll found similar bug description here: https://keepassium.com/articles/sync-ios-keepass-with-nextcloud/ And this is plain old....it's from 2018 when iOS 13 was released.... Very annoying.

marcopenhacking commented 3 years ago

"Favorite available offline" / "Offline verfügbare Favoriten" had been removed with version 3.2.0 as written in the version history in the iOS app store:

Removed the option "Favorite available offline", use the option "Set available offline"

I marked some folders to be offline available and it's working recursive, which is what I want. I didn't start to sync ~60GB yet, but plan to do so, if the app does not cause data loss.

Regarding original issue description:

In Files App i can not open the offline synced folder from nextcloud storage. This is reproducable when turning wifi off. Activate flight mode only did not cause this issue: i was able to open the folder. Open files & folder in nextcloud app was working!

With iOS 14.4 on iPad Pro and Nextcloud iOS app 3.3.0 I see without wifi and also with flight mode the "you are offline" message appears in the iOS Files app (open in Nextcloud app works).

Slug-V commented 3 years ago

@MarkusKepert recently we discussed close theme in #1432. Would you check some behavior when using boxcryptor's WebDAV feature?

MarkusKepert commented 3 years ago

Hi,I can do some tests, maybe this weekend, when you tell me what to test! But I don't understand the relation to boxcryptor!Am 26.03.2021 05:56 schrieb Akihisa Maruyama @.***>: @MarkusKepert recently we discussed close theme in #1432. Would you check some behavior when using boxcryptor's WebDAV feature?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

Slug-V commented 3 years ago

relation is:

  1. Nextcloud-iOS is using WebDAV internally
  2. Boxcryptor is basically SaaS-storage-encryption software, but its iOS App can be just a WebDAV client (without encryption) with Apple Files integration
  3. If there is some difference between Nextcloud-iOS's behavior and Boxcryptor's behavior, this may be similar to the stuff I discussed recently.

If you don't think this issue is related to this KeePassium official's comment, just ignore my opinion.

The file ID is interpreted by the file provider app. Some file providers internally map the ID to the full file name — so they don't care if the file was recreated (e.g. Boxcryptor). Others use the ID directly — so they would return that the file was deleted (not sure about NextCloud, but definitely iCloud Drive and pCloud).

mrburns-42 commented 4 months ago

I was able to reconstruct the problem, so it doesn't seem to be fixed.

Is there any news on this? - We are currently in a test phase to introduce Nextcloud in our school. A total of 1600 to 2000 people are working with iPads. It must be ensured that changes to Word documents are also saved.

MarkusKepert commented 4 months ago

@mrburns-42 Were you able to reconstruct it in detail with a fail-safe step-by-step guide? Because this was the problem i've had initially when creating this issue. I have only 1 user with this constellation (and very poor patience) so i told her to workaround the issue with saving file locally outside nextcloud app and uploading with app after edit.

mrburns-42 commented 4 months ago

We have now tried this out on several iPads. We had the following procedure:

  1. installation of the Nextcloud and Word app
  2. open the Nextcloud app and connect to Nextcloud
  3. open the Word app and create a new document
  4. write something in the Word document
  5. click on the left arrow at the top left
  6. press save....
  7. select Files app at the bottom
  8. select Nextcloud as storage location
  9. click on move at the top right
  10. look in the Files app and then the file has a size of 0 kB and this also applies to every change made to the open file

If you then deny Nextcloud access to the Files app and then allow it again, it works for me. Whether it always works ... I have no idea.

MarkusKepert commented 4 months ago

Let me check on my iPad, if the "remove permissions and grant again" works as well.