Nextcloud 13 chunking upload not working

Hi,

I am having trouble with chunked uploads in nextcloud 13. It doesn’t seem to work from web ui & sync client.
If I change the sync client chunkSize setting on my mac os client then I am able to upload files by effectively disabling chunking when setting chunk size to something larger than the file to be uploaded.

I also upgraded nextcloud to version 13 from 12 a few weeks ago using the webui.

I should also not that my php settings are correct and in line with https://docs.nextcloud.com/server/13/admin_manual/configuration_files/big_file_upload_configuration.html. I have confirmed this using a phpinfo page on the installation.

Could someone please help me to try and troubleshoot this?

Relevant details:

Nextcloud version (eg, 12.0.2): 13.0.0.14
Operating system and version (eg, Ubuntu 17.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.18
PHP version (eg, 7.1): 7.0.25

The issue you are facing:

Chunked uploading fails with the following error message:

file-upload.js:274 MOVE https://{url}/remote.php/dav/uploads/{user}/web-file-upload-41fb9a29f46486d4f8d24f9ff0318bab-1520776283884/.file 404 (Not Found)

I’ve confirmed that if I configure the client (OSX Sierra) with larger chunkSettings than the file to upload then uploads work correctly.

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

Steps to replicate it:

  1. Upload file larger than 10Mb
  2. Check log or developer tools in browser for error message

The output of your Nextcloud log in Admin > Logging:

rewinddir(): 76 is not a valid Directory resource at /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#31

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

<?php
$CONFIG = array (
  'debug' => 'true',
  'instanceid' => {instanceid}
  'passwordsalt' => {salt}
  'secret' => {secret}
  'trusted_domains' =>
  array (
    0 => {domain}
  ),
  'datadirectory' => '/mnt/datadirectory',
  'overwrite.cli.url' => {overwriteurl}
  'dbtype' => 'mysql',
  'version' => '13.0.0.14',
  'dbname' => {dbname}
  'dbhost' => {dbhost}
  'dbport' => '', 
  'dbtableprefix' => {prefix}
  'dbuser' => {user}
  'dbpassword' => {password}
  'logtimezone' => 'UTC',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
);

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

PASTE HERE
3 Likes

can confirm.

/var/www/nextcloud/data/hgfhgfhh/uploads/web-file-upload-73a5f92f475241e0578465f2c1d981fa-1520858443103# ls -all
total 11380
drwxr-xr-x 2 www-data www-data 4096 Mär 12 13:40 .
drwxr-xr-x 8 www-data www-data 4096 Mär 12 13:40 …
-rw-r–r-- 1 www-data www-data 10485760 Mär 12 13:40 0
-rw-r–r-- 1 www-data www-data 1158661 Mär 12 13:40 10485760

from browser tools:
MOVE
XHR
https://gfdgfdgfdgdfg.de/remote.php/dav/uploads/sgfdgfdgdfd/web-file-upload-73a5f92f475241e0578465f2c1d981fa-1520858443103/.file [HTTP/1.1 404 Not Found 1ms]

apache log:

access.log:199999999.9 - - [12/Mar/2018:13:40:44 +0100] “PUT /remote.php/dav/uploads/hfghfghfghfg/web-file-upload-73a5f92f475241e0578465f2c1d981fa-1520858443103/10485760 HTTP/1.1” 201 674 “-” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0”

access.log:19999999.9 - - [12/Mar/2018:13:40:44 +0100] “MOVE /remote.php/dav/uploads/hgfhgfhfgh/web-file-upload-73a5f92f475241e0578465f2c1d981fa-1520858443103/.file HTTP/1.1” 404 636 “-” "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0

tried to find that “.file” within remote.php but i am no developer

I can confirm the problem in my Nextcloud instance too.

Hi, same problem for me.
Debian 9, Nextcloud 13.0.0.14, php 7.1.13, Nginx 1.13.8

Log is:
[error] 13573#13573: *8 access forbidden by rule, client: xxxx, server: cloud.xxx, request: “MOVE /remote.php/dav/uploads/user/web-file-upload-9853df0e2ea83e9e8b527afd3d00d995-1521101660086/.file HTTP/2.0”, host: “cloud.xxx

Just for reference, I’m linking the corresponding github issue here:

2 Likes

For information, as a workaround I increased the max_chunk_size directly into the database (to 500Mb files):
INSERT INTO oc_appconfig (appid, configkey, configvalue) VALUES (‘files’, ‘max_chunk_size’, ‘524288000’);

2 Likes

Good workaround @jisse44

@JimmyKater This ticket is marked as solved but it isn’t. The max_chunk_size change is a temporary workaround

1 Like

ya. this ticket here is marked as solved b/c there is an open github-issue. so it IS going to be solved there… and there is nothing we can do about it here.

this means for us here in the forum: solved. but not in a positive way.

1 Like

Ah ok, makes sense. Thank you for clarifying.

1 Like

uhm, this is not solved at all :slight_smile:

@davideapvde you are repeating what grahamsk already stated and that was already explained by JimmyKater.

Reading the posts is useful sometimes :wink:

1 Like

@Schmu sorry for that, anyway the workaround is not working for me, could this be a cached value somewhere?

EDIT: reloading the php pool fixed the “caching” issue.

1 Like

Hm, I’m not sure. You could restart your server after the changes to the database just to be sure.

However I don’t understand the intention of the workaround. If the intention was to set the chunk size to a value bigger than all the files you will every upload, then you need to check if the file (that you want to upload) is not bigger than that.

Edit: oh, alright. Awesome! :slight_smile:

Hi I am having the same problem but its unclear to me how to apply this workaround. When trying to execute the command in the mysql nextcloud database I got:

MariaDB [(none)]> use nextcloud;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [nextcloud]> INSERT INTO oc_appconfig (appid, configkey, configvalue) VALUES (‘files’, ‘max_chunk_size’, ‘524288000’);
ERROR 1054 (42S22): Unknown column ‘‘files’’ in 'field list’
MariaDB [nextcloud]>
ERROR 1054 (42S22): Unknown column ‘‘files’’ in 'field list’
MariaDB [nextcloud]>

Hi, this is a quote problem, typo is not good , you have to put VALUES between simple quotes '
(the typo is not good in this forum)

1 Like

I managed to do this now, I hope it helps other people too. Here is what I put:

INSERT INTO oc_appconfig ( appid , configkey , configvalue ) VALUES (‘files’, ‘max_chunk_size’, ‘524288000’);

But I must say that it didn’t work and the error still occurs, even after server reboot

1 Like

I confirm the bug also in 13.02

The workaround works for me

I too confirm the bug in 13.02.
Centos 7
nginx
php-fpm
php 7.0
mariadb

By the way the workaround worked.
INSERT INTO oc_appconfig ( appid , configkey , configvalue ) VALUES (‘files’, ‘max_chunk_size’, ‘524288000’);

Unfortunately this just solves the issue when the file is uploaded through a browser (drag and drop or upload button)

The desktop client which uploads through DAV has still the same issue. This is the error I get:

The item is not synced because of previous errors: Error transferring https://nc.example.com/remote.php/dav/uploads/user/3596292820/.file - server replied: Not Found

Perhaps the DAV app also has some parameter that should be added to the “oc_appconfig” table?

1 Like