"HTTP error 409 Conflict" when autouploading from iPhone

A relative has an iphone, and uses the Nextcloud app to autoupload the picture she takes. She uploads them into a folder that she chose, inside an external storage. So far, it has been working more or less fine, but for a few weeks, no more pictures are uploaded. Actually, NC creates a folder for each month, and the month for october (10) has never been created.

Checking the logs, I see that each upload attempt ends up with a HTTP 409 error.

For instance, this was earlier today:

193.123.xx.xx  - User [22/Oct/2021:00:12:10 +0000] "PUT /remote.php/webdav/PersonalUser/Iphone%20Upload/2021/10/21-10-01%2007-45-42%207764.png HTTP/1.1" 409 3078 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.0.6"


193.123.xx.xx - User [22/Oct/2021:00:12:10 +0000] "PUT /remote.php/webdav/PersonalUser/Iphone%20Upload/2021/10/21-10-01%2007-47-03%207765.png HTTP/1.1" 409 3070 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.0.6"


193.123.xx.xx- User[22/Oct/2021:00:12:10 +0000] "PUT /remote.php/webdav/PersonalUser/Iphone%20Upload/2021/10/21-10-01%2007-48-11%207766.png HTTP/1.1" 409 3066 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.0.6"


193.123.xx.xx - User [22/Oct/2021:00:18:12 +0000] "PUT /remote.php/webdav/PersonalUser/Iphone%20Upload/2021/10/21-10-01%2007-47-03%207765.png HTTP/1.1" 409 2560 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.0.6"


193.123.xx.xx  - User [22/Oct/2021:00:18:12 +0000] "PUT /remote.php/webdav/PersonalUser/Iphone%20Upload/2021/10/21-10-01%2007-45-42%207764.png HTTP/1.1" 409 2560 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.0.6"


193.123.xx.xx - User [22/Oct/2021:00:18:12 +0000] "PUT /remote.php/webdav/PersonalUser/Iphone%20Upload/2021/10/21-10-01%2007-48-11%207766.png HTTP/1.1" 409 2560 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.0.6"


193.123.xx.xx - User [22/Oct/2021:15:35:35 +0000] "PUT /remote.php/webdav/PersonalUser/Iphone%20Upload/2021/10/21-10-01%2007-45-42%207764.png HTTP/1.1" 409 3066 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.0.6"


193.123.xx.xx - User [22/Oct/2021:15:35:35 +0000] "PUT /remote.php/webdav/PersonalUser/Iphone%20Upload/2021/10/21-10-01%2007-48-11%207766.png HTTP/1.1" 409 3064 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.0.6"

Nextcloud version (eg, 20.0.5): 22.1.0
Operating system and version (eg, Ubuntu 20.04): Debian Buster

Is this the first time you’ve seen this error? (Y/N): Y

EDIT: I have created this bug report: Pictures are no longer auto-uploaded if folder could not be created the first time · Issue #1725 · nextcloud/ios · GitHub

409 is a code for conflicts. Do you have redis for file-locking? Any hints in your nextcloud logs for file-locking problems?

Since the client tries to upload into the october (10) folder, perhaps it helps to create it? If yes, that could be a bug in the ios app.

Quota is not full (or your disk), so user still can login on webinterface and manually upload files.

Hi, thanks for your answer.

I don’t think I have redis enabled. I use the docker version of nextcloud, and mysql 8.0.

I don’t see anything else on the logs, just the lines I have pasted. On the iphone, I think it doesn’t show any error messages either.

I check the database for locked files automatically every week, so I have cleared them several times since this problem started.

Is it possible that, at some point, the app could not create the folder for october (due to permissions), and now it’s trying to autoupload the pictures to the inexistent folder? I’ll try to create it manually this time, but I think the app should realise that something failed and try again later, or at least warn the user.

For quota, if it is not shared, external storage, acl conditions of the acl app, users have full access to their own files.

There are no user quotas in my setup (and there is almost a TB of free space), and I think users have write permissions on their own folders in the external storage, so the problem must be somewhere else…

I manually created the folder for october, told the user to logout and login again in the iPhone app, and set autoupload again (it automatically disabled). It seems that now a couple of recent pictures have been uploaded, but the pictures from the rest of october are not being uploaded.

But at least new ones are being written.