"File cannot be saved" on Onedrive

Hi,

I’m trying to edit ODS files on Onedrive. But whenever I try to save them, the changes are not uploaded. After some time, Collabora says “file cannot be saved”.

Is this a typical known issue with Onedrive?

Also, if I can get this working, I would also like to use Collabora office with Cryptomator, also on Onedrive. Is this a use case where I can expect issues?

Mobile device is on Android 16. Installed Collabora version is 26.04.3.1

Hi @webbie2k2

Thanks for the details. So here’s how saving works on Android. Collabora Office edits a local copy of the document. When you save, it hands the file back to the app it came from, in your case OneDrive, and that app has to upload it. If OneDrive doesn’t accept the write, Collabora has no other way to get the file back, and after a while you get “file cannot be saved”.

A few things to try:

  1. Open the file from inside Collabora Office, not from the OneDrive app. Tap Open, go to OneDrive in the Android file picker, and pick the file there. Opening it with “Open with…” from the OneDrive app can give Collabora a copy it isn’t allowed to save back to.
  2. Make the file available offline in OneDrive before you edit it. Also check that OneDrive is allowed to run in the background (Settings → Apps → OneDrive → Battery → Unrestricted). Android 16 is quite aggressive about stopping background uploads.
  3. Workaround: use Save As to put a copy on the device, then upload it with the OneDrive app. That at least keeps your changes safe.

If none of that works, a log would help us find out where it fails. With USB debugging on, run adb logcat | grep -i -E “LOActivity|onedrive” while you open, edit and save the file, and post the output here.

Cryptomator: it works the same way. Collabora saves back to Cryptomator, which encrypts the file and uploads it to OneDrive. So there’s one more app in the chain, and it still depends on OneDrive accepting the upload. I’d get plain OneDrive working first before adding Cryptomator.

Hi, thanks for your reply. I tried the steps you suggested:

1 and 2 didn’t work. Onedrive was already allowed to use the battery in the background so that didn’t change something.

3 did work, but tbh, I don’t really consider that as a solution. My objective to start using Collabora in the first place was as a replacement for Google Office on my mobile, with the idea that using Collabora + a cloud backend would be as “user-friendly” as Google Office. I can understand that there are technical challenges behind this, but for me that would really be the solution of last resort.

I created a log, but I cannot seem to upload it as new user. How an I best share it?

@webbie2k2 Can you please send me on my mail ? darshan.upadhyay@collabora.com

Thanks, I’ve just sent it.

Thanks for the log, that was very useful. It shows two different things.

Your save did work, as far as Collabora Office can tell. When you left edit mode, the document was saved and the new version (8271 bytes) was handed to OneDrive through Android’s storage interface. OneDrive accepted it without error. Whether OneDrive then uploads it is up to the OneDrive app, and the log can’t see that part. Could you check two things after a save:

  1. Open the file in the OneDrive app itself (not Collabora). Does it show your change? If yes, OneDrive has the new version locally and just hasn’t uploaded it.
  2. Look at the file’s modified date on onedrive.live.com in a browser.

If the OneDrive app has the change but the website doesn’t, the upload is being held back by OneDrive on your device. If the OneDrive app doesn’t have it either, OneDrive’s storage interface discarded the write, and we’d like to know that;

Hi Darshan, thanks for your quick follow up. I did the test as you requested.

  1. If I open the file in Onedrive app, the change does not appear.
  2. The modified date did not change.

So, it seems that Onedrive on the phone does not accept the change?