Problem with uploading files with the android app

Nextcloud version: 22.0.0
Operating system and version: Fedora 34
Nginx version: 1.20.1
PHP version: 7.4.21

The issue you are facing:
When I try to upload a file from another app to Nextcloud or from the Nextcloud, the files do not upload and display an error “Connection error” as shown in the image below.


I can create files inside the nextcloud app, such as a text file, and this is no problem. The text file gets created and can be seen on my laptop and in the web interface. It does not appear to be a rights issue. The nextcloud client on my desktop and the web interface can write files just fine.

Downloading files through the Nextcloud app works fine as well. I can download and view any file without a problem.

Is this the first time you’ve seen this error? (Y/N):
No, I have noticed this already for a while on my phone.

Steps to replicate it:

  1. Upload a file through the nextcloud app or send from another app to the nextcloud app

The output of your Nextcloud log in Admin > Logging:
No log entries are generated when an upload fails.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => '<CENSORED>',
  'passwordsalt' => '<CENSORED>',
  'secret' => '<CENSORED>',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'trusted_domains' => 
  array (
    0 => '<CENSORED>',
    1 => '<CENSORED>',
  'datadirectory' => '/var/www/nextclouddata',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '<CENSORED>',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '<CENSORED>',
  'installed' => true,
  'maintenance' => false,
  'loglevel' => 2,

The output of your nginx log in /var/log/____:
There are no errors generated in the error log, so this is the nginx access log when I upload a file and it fails.

My nginx config is practically the same as the documentation, but here it is in case it helps:

php-fpm config:

Permissions in /var/www/nextcloud:

Permissions in /var/www/nextclouddata are for files and directories:

drwxrwx---.  2 nextcloud nginx     unconfined_u:object_r:httpd_sys_rw_content_t:s0
-rw-rw----.  1 nextcloud nginx     unconfined_u:object_r:httpd_sys_rw_content_t:s0

I suspect something is up with webdav, but I cannot imagine what. /remote.php/webdav is accessible by browser, so I suspect it also works for the app. And the fact that the app can download files but not upload suggests perhaps that there is a writing but not reading issue. I double checked all my configs and permissions, but I just do not see it. I was hoping another set of eyes could perhaps help me out.

If you have any questions, do not hesitate to ask.

I got the exact same behavior since around 16 juli 2021.
It shows connection errors. Other clients like on Windows work fine.
Also when trying to upload from the android app to Nextcloud there are no server logs being made.

It seems that only the mobile android app is having trouble uploading. It does not look to be a server problem as far as I was able to investigate .

@devices1 you are not the only one!

1 Like

The thing is that I tried the demo servers provided by nextcloud and there I could upload files to. That makes me think it is a server problem, hence my question here. What does your setup look like?

In my case I’m running:
Nextcloud: 21.0.3
OS: Ubuntu 20.04 LTS
PHP: 7.4.3

I tried uploading a file using a CLI webDAV client cadaver and that succeeded normally, so perhaps webDAV is not to blame.

dav:/remote.php/dav/files/device/> put test.txt
Uploading test.txt to `/remote.php/dav/files/device/test.txt':
Progress: [=============================>] 100.0% of 12 bytes succeeded.

Still can’t seem to find any problems with the server. Just the android app for me. Have you found a temporary solution yet?

Hopefully an update will fix this off course.

1 Like

I just updated NextCloud to 22.1. I now have new photos auto uploading, but all the photos that failed over the past month will not upload.

They keep saying “Connection Error”

I have also updated to 22.1, but sadly that did not help my issue. Any upload will continue giving me a “Connection Error” and the log says the same as always.

Since my last post, even new photos aren’t uploading.

This issue has been dragging on for over a month.

Doesn’t anyone have any advice?

I have the same issue it seems, I can get the nextcloud app to upload one of the failed files, by disabling and re-enabling WiFi. Then exactly one of the previously failed files is uploaded and all other files are again failing. By repeating this I can get one files uploaded each time…
Of course this is not ok, but it does do something at least…

I hope this works for you too… Of there is anything to help the debugging please let me know

I also am finding automatic uploads not working. For contact backup too.

It has started working again for me…
Since 20 aug, when the android app got updated to the new 3.17.0 version.
This has been the only change, no changes or updates on my server side.

Problem seems fixed with this mobile app version. Will monitor if this issue comes back.

Thank you for letting me know Thijs. The problem has also disappeared for me with that same update. I am glad it was not on the server side.