Skip to content

Files saved to Nextcloud via Android "Save as" (DocumentsProvider) are created with 0 bytes since 34.0.1 #17269

Closed

Description

@marcetto333

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. In a third-party app (e.g. Shelly), choose Export → "Save as" and pick Nextcloud as the storage location (via Android's Storage Access Framework / DocumentsProvider).
  2. Save the file into any Nextcloud folder.
  3. Open the file on the server: it exists but is 0 bytes / empty.

Expected behaviour

The file is uploaded with its real content / correct size.

Actual behaviour

The file is created on the server but stays 0 KB (empty). The source app reports "Cannot save document".

Saving the same file to local Downloads works, and a direct upload from within the Nextcloud app also produces the correct file size — so only the "Save as" / DocumentsProvider path is
broken. It affects any target folder (own folders too, not only shares). Quota and free space were ruled out (server 17% free, no maintenance mode).

Regression: worked in early June (app 34.0.0, released 2026-06-08); first failure after the app update of 2026-06-24 (34.0.1). Resembles the old #6726 (closed, 2020).

Android version

16

Device brand and model

Samsung Galaxy S24

Stock or custom OS?

Stock

Nextcloud android app version

34.0.1

Nextcloud server version

34.0.1

Using a reverse proxy?

No

Android logs

No response

Server error logs

Additional information

No app logs captured (stable build, no easy logcat access). Reproducible on every attempt via the "Save as" dialog. The file is created as a 0-byte placeholder every time; only uploads
through the app's own upload UI work correctly.

Activity

  1. nanawel commented on Jul 2, 2026

    @nanawel

    Same thing for me, although I'm on the latest 32.x on the server, and using the latest APK from F-Droid on my Samsung Galaxy A51 (Android 13).

    All I can see in th server logs is that kind of line:

    "PUT /remote.php/dav/files/user/myfile.txt HTTP/1.1" 201 1274 "-" "Mozilla/5.0 (Android) Nextcloud-android/34.0.1"
    
  2. BlueIce commented on Jul 2, 2026

    @BlueIce

    Probably a duplicate of #17258 .

  3. marcetto333 commented on Jul 3, 2026

    @marcetto333
    Author

    Thanks @nanawel and @BlueIce — confirmed, this is a duplicate of #17258 (same setup there: S24, Android 16, app 34.0.1, upload from external app via DocumentsProvider → 0-byte file).

    Root cause has already been identified there: a SecurityException: Permission Denial when reading content://org.nextcloud/capabilities in the DocumentsProvider, introduced in
    34.0.1. A fix is open in PR #17270, and downgrading the app to 34.0.0 is a confirmed workaround.

    Closing in favor of #17258 makes sense to me — happy to test the QA APK from #17270 once it's available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions