ios icon indicating copy to clipboard operation
ios copied to clipboard

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!

Open MarkusKepert opened this issue 5 years ago • 26 comments

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

  • got new ipad pro

  • Installed Nextcloud app a week ago and synced ~20GB of data with the option "offline available favourites"

  • installed Word, Outlook, Teams etc and activated product with company license (onedrive and sharepoint storage is enabled, but not used)

  • Created a new word document in Word, add some lines of text and save with "save", then select the "Files App", then nextcloud, the folder of choice and chnage the filename. Then press the button "move". Wifi was enabled and the file was synced to nextcloud server. Swipe back to "desktop" and close ipad. Autosave was enabled in Word

  • Next day, open ipad withour wifi or mobile connectivity. Open Word. Add some other text (4 hours, was a lot of text)

  • Former Windows User: Try to save and press in menu bar the "left arrow" to open the menu with file history, open file etc.

  • the file history did NOT show the current edited file

  • user did nothing else, closed ipad cover

  • user went home, opened ipad (with wifi connectivity) and asked my "my file is gone". I know....not really a good error message

  • me opened files app, searched the file and opened it. Content was same content then in the evening before. All text created was not there.

  • Checked Nextcloud synclog. The file with the issue was synced in the same time i

Then: played around much and figured out:

  • Open documents from word, from files app etc, save documents, edit, close (and really close) word app, etc all with some new created files in nextcloud folders
  • Try to test every action in online and /or offline mode Results:
  • found 2 or 3 times word crashing (try to open and closed after that)
  • Now the nextcloud issue i think i found: 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!
  • 1 time i got same issue: new docx, edit text, switch to flight mode, edit again, open same docx from files app and got the old content. But i didn't find a reason the reproduce this again.

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 avatar Aug 13 '20 19:08 MarkusKepert

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?

MarkusKepert avatar Aug 15 '20 09:08 MarkusKepert

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.

marinofaggiana avatar Aug 25 '20 08:08 marinofaggiana

@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

MarkusKepert avatar Aug 25 '20 08:08 MarkusKepert

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

marinofaggiana avatar Aug 25 '20 08:08 marinofaggiana

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.

MarkusKepert avatar Aug 25 '20 09:08 MarkusKepert

Always in Files app ?

marinofaggiana avatar Aug 25 '20 09:08 marinofaggiana

Yes, tried several times.

MarkusKepert avatar Aug 25 '20 10:08 MarkusKepert

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

marinofaggiana avatar Aug 25 '20 10:08 marinofaggiana

Let me test this on afternoon! Thanks

MarkusKepert avatar Aug 25 '20 12:08 MarkusKepert

@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

MarkusKepert avatar Aug 26 '20 19:08 MarkusKepert

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.

heluca avatar Sep 09 '20 11:09 heluca

@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...)

MarkusKepert avatar Sep 09 '20 11:09 MarkusKepert

Has this been solved or is this still under investigation?

arnogramatke avatar Sep 28 '20 16:09 arnogramatke

Has this been solved or is this still under investigation?

From my point of view this issue is not resolved.

MarkusKepert avatar Sep 28 '20 17:09 MarkusKepert

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.

heluca avatar Sep 28 '20 17:09 heluca

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

MarkusKepert avatar Sep 28 '20 17:09 MarkusKepert

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.

heluca avatar Sep 28 '20 18:09 heluca

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.

MarkusKepert avatar Sep 29 '20 06:09 MarkusKepert

"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).

marcopenhacking avatar Mar 25 '21 21:03 marcopenhacking

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

Slug-V avatar Mar 26 '21 04:03 Slug-V

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.

MarkusKepert avatar Mar 26 '21 07:03 MarkusKepert

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).

Slug-V avatar Mar 26 '21 09:03 Slug-V

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.

mrburns-42 avatar May 02 '24 13:05 mrburns-42

@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.

MarkusKepert avatar May 02 '24 13:05 MarkusKepert

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.

mrburns-42 avatar May 02 '24 14:05 mrburns-42

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

MarkusKepert avatar May 03 '24 11:05 MarkusKepert