Android Talk upload results in 0 B files when using S3 primary storage on Nextcloud 31.0.9 (and 31.0.10) — works fine on 30.0.16

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.9 (also reproduced on 31.0.10)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 22.04 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • HAProxy 2.6 (acting as SSL termination + load balancer)
  • PHP version (e.g, 8.3):
    • 8.2.29
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After upgrading from 30.0.16 → 31.0.9
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Manual archive install (bare metal)
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

When using Android Talk v22.0.2 on Nextcloud 31.x configured with Amazon S3 as primary storage, all uploads (images, PDFs, etc.) appear as 0 B files and can’t open even though the upload completes.

The exact same configuration works perfectly on Nextcloud 30.0.16, and also when using a local data directory (/var/www/html/nextcloud/data).
→ This regression occurs only when S3 is the primary storage.

Steps

  1. Configure Nextcloud 31.0.9 (or 31.0.10) with S3 as primary storage

  2. Connect Android Talk 22.0.2 to the server

  3. Send any photo or PDF via Talk

  4. Upload finishes but file shows 0 B in Talk and Web UI

  5. Same operation via Web UI or iOS Talk → OK

Log entries

dirty table reads: SELECT fileid FROM *PREFIX*filecache
OC\Image::fixOrientation(): No image loaded
userAgent: Mozilla/5.0 (Android) Nextcloud-Talk v22.0.2

The output of your Apache/nginx/system log in /var/log/____:

No Apache errors; S3 PUT requests return 200 OK.

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

'objectstore' => [
  'class' => 'OC\\Files\\ObjectStore\\S3',
  'arguments' => [
      'bucket' => '******',
      'key' => '******',
      'secret' => '******',
      'autocreate' => true,
      'region' => 'ap-northeast-1',
      'use_ssl' => false,
      'use_path_style' => true,
      'timeout' => 120,
      'uploadPartSize' => 524288000,
  ],
],
'part_file_in_storage' => false,
'tempdirectory' => '/var/www/html/nextcloud/data/tmp',

look at existing bug reports [Bug]: Expected filesize of ... bytes but read with S3 storage and special characters · Issue #55665 · nextcloud/server · GitHub looks similar to your problem

1 Like

Thanks for your comment :innocent:
I uploaded the image from the Android Talk app.
The upload succeeded on S3 — the object exists and has the correct size.
However, the file appears as 0 B in both the Web UI and the database.

Database result:

SELECT fileid, path, size, storage FROM oc_filecache WHERE fileid = 4896600;
+---------+------------------------------------+------+---------+
| fileid  | path                               | size | storage |
+---------+------------------------------------+------+---------+
| 4896600 | files/Talk/2025-11-06 10-32-17.jpg |    0 |      14 |
+---------+------------------------------------+------+---------+

S3 result:

aws s3 ls s3://test-bucket/ --recursive | grep "urn:oid:4896600"
2025-11-06 10:32:29    2183851 urn:oid:4896600

So the object is correctly stored in S3 (2,183,851 bytes), but Nextcloud reports it as 0 B.
It looks like a metadata inconsistency between S3 and the database, but I could be wrong.

I’m seeing the same issue on NC 31.0.9/31.0.10 with S3 as primary storage. Android Talk uploads complete but the files show up as 0 B, while everything works normally on NC 30.0.16. Seems like something broke in the NC31 + S3 handling. Hope the team can confirm if this is a known bug or if a fix is coming.

It looks like this issue started right after upgrading to Nextcloud 31.x, so it’s likely a compatibility bug between Android Talk v22.0.2 and the new S3 primary-storage handling. Since uploads work normally on 30.0.16, the problem isn’t your server setup — it’s something introduced in the 31.x update, and others using S3 may be running into the same thing. A fix will probably require a patch from Nextcloud.

In my environment, I am not using S3 as the primary storage.
However, I am experiencing a similar issue.
The storage I am using is ConoHa’s object storage, which is available within Japan.

By the way, it works fine on the iPhone Talk app, so it might be an issue with the Android Talk app.

1 Like