Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't upload file > 1M - Webdav - External Storage #20248

Closed
Bushrider opened this issue Mar 31, 2020 · 5 comments
Closed

Can't upload file > 1M - Webdav - External Storage #20248

Bushrider opened this issue Mar 31, 2020 · 5 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: external storage needs info stale Ticket or PR with no recent activity

Comments

@Bushrider
Copy link

Bushrider commented Mar 31, 2020

[reaction]#12728 (comment)

Steps to reproduce

1.Connect external storage with webdav
2.Upload File > 1M to external storage

Expected behaviour

Should upload to external storage

Actual behaviour

Client error: PUT http://xxx.xxx.fr/webdav/Nuage/Emilie/logofacture.png.ocTransferId37033970.part resulted in a 417 Expectation Failed response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt (truncated...)

Server configuration

Operating system:
Debian 8 jessie
Web server:
nginx 1.15.12-1
Database:
mysql 5.5.62
PHP version:
php7.4-fpm
Nextcloud version: (see Nextcloud admin page)
18.0.3.0
Updated from an older Nextcloud/ownCloud or fresh install:
fresh install
Where did you install Nextcloud from:
Web Installer
Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.4.0
  - activity: 2.11.0
  - bruteforcesettings: 1.5.0
  - calendar: 2.0.2
  - cloud_federation_api: 1.1.0
  - comments: 1.8.0
  - contacts: 3.2.0
  - dav: 1.14.0
  - documentserver_community: 0.1.5
  - federatedfilesharing: 1.8.0
  - federation: 1.8.0
  - files: 1.13.1
  - files_external: 1.9.0
  - files_pdfviewer: 1.7.0
  - files_rightclick: 0.15.2
  - files_sharing: 1.10.1
  - files_trashbin: 1.8.0
  - files_versions: 1.11.0
  - files_videoplayer: 1.7.0
  - firstrunwizard: 2.7.0
  - logreader: 2.3.0
  - lookup_server_connector: 1.6.0
  - mail: 1.1.4
  - nextcloud_announcements: 1.7.0
  - notifications: 2.6.0
  - oauth2: 1.6.0
  - onlyoffice: 4.1.4
  - password_policy: 1.8.0
  - photos: 1.0.0
  - privacy: 1.2.0
  - provisioning_api: 1.8.0
  - recommendations: 0.6.0
  - serverinfo: 1.8.0
  - settings: 1.0.0
  - sharebymail: 1.8.0
  - support: 1.1.0
  - survey_client: 1.6.0
  - systemtags: 1.8.0
  - text: 2.0.0
  - theming: 1.9.0
  - twofactor_backupcodes: 1.7.0
  - updatenotification: 1.8.0
  - viewer: 1.2.0
  - workflowengine: 2.0.0
Disabled:
  - admin_audit
  - encryption
  - spreed
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nuage.informatdom.fr"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "18.0.3.0",
        "overwrite.cli.url": "https:\/\/nuage.informatdom.fr",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud.log",
        "logfilemode": 416,
        "loglevel": "2",
        "logdateformat": "F d, Y H:i:s"
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
Webdav
Are you using encryption: yes/no
no

Browser:

74.0
Firefox Release
March 10, 2020

Web server error log

error.log

Nextcloud log

nextcloud.log

Browser log
a) PUT 500
b) The humanFileSize library is deprecated! It will be removed in nextcloud 19.
@Bushrider Bushrider added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Mar 31, 2020
@kesselb
Copy link
Contributor

kesselb commented Mar 31, 2020

Client error: `PUT http://orange.soubeyran.fr/webdav/Nuage/Anthony/logo%20d%C3%A9grad%C3%A9.png.ocTransferId645717793.part` resulted in a `417 Expectation Failed` response:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "htt (truncated...)

That's the response form your NAS. As start I would try to list and upload files with another webdav client.

Index: apps/dav/lib/Connector/Sabre/File.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- apps/dav/lib/Connector/Sabre/File.php	(revision f5e81749901ae7a5c6db91bfd61c886b2c644592)
+++ apps/dav/lib/Connector/Sabre/File.php	(date 1585663702290)
@@ -415,6 +415,9 @@
 			try {
 				$res = $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
 			} catch (\Exception $e) {
+				if ($e instanceof \GuzzleHttp\Exception\ClientException && $e->getResponse() !== null) {
+					\OC::$server->getLogger()->debug('Response from dav endpoint: ' . $e->getResponse()->getBody()->getContents());
+				}
 				$this->convertToSabreException($e);
 			}
 			if ($res === false) {

As second step to log the complete response from the NAS.

@Bushrider
Copy link
Author

Client error: `PUT http://orange.soubeyran.fr/webdav/Nuage/Anthony/logo%20d%C3%A9grad%C3%A9.png.ocTransferId645717793.part` resulted in a `417 Expectation Failed` response:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "htt (truncated...)

That's the response form your NAS. As start I would try to list and upload files with another webdav client.

As described here : [relation]#12728 (comment)
I can upload the same file to the Nas using File explorer's webdav connection without any problem.

> Index: apps/dav/lib/Connector/Sabre/File.php > IDEA additional info: > Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP > <+>UTF-8 > =================================================================== > --- apps/dav/lib/Connector/Sabre/File.php (revision f5e8174) > +++ apps/dav/lib/Connector/Sabre/File.php (date 1585663702290) > @@ -415,6 +415,9 @@ > try { > $res = $this->fileView->fopen(ltrim($this->path, '/'), 'rb'); > } catch (\Exception $e) { > + if ($e instanceof \GuzzleHttp\Exception\ClientException && $e->getResponse() !== null) { > + \OC::$server->getLogger()->debug('Response from dav endpoint: ' . $e->getResponse()->getBody()->getContents()); > + } > $this->convertToSabreException($e); > } > if ($res === false) { > ``` >
> As second step to log the complete response from the NAS.
Log WebUI
Fatal webdav Sabre\DAV\Exception: Client error: PUT http://orange.soubeyran.fr/webdav/Nuage/Emilie/logofacture.png.ocTransferId1267903985.part resulted in a 417 Expectation Failed response: convertToSabreException()/var/www/nuage/apps/dav/lib/Connector/Sabre/Directory.php - line 156: OCA\DAV\Connector\Sabre\File->put()/var/www/nuage/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096: OCA\DAV\Connector\Sabre\Directory->createFile()/var/www/nuage/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525: Sabre\DAV\Server->createFile()<>Sabre\DAV\CorePlugin->httpPut()/var/www/nuage/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array()/var/www/nuage/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit()/var/www/nuage/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod()/var/www/nuage/apps/dav/appinfo/v1/webdav.php - line 82: Sabre\DAV\Server->exec()/var/www/nuage/remote.php - line 165: require_once("/var/www/nu ... p")Causé parGuzzleHttp\Exception\ClientException: Client error: PUT http://orange.soubeyran.fr/webdav/Nuage/Emilie/logofacture.png.ocTransferId1267903985.part resulted in a 417 Expectation Failed response: run()/var/www/nuage/3rdparty/guzzlehttp/promises/src/Promise.php - line 223: GuzzleHttp\Promise\Promise->invokeWaitFn()/var/www/nuage/3rdparty/guzzlehttp/promises/src/Promise.php - line 267: GuzzleHttp\Promise\Promise->waitIfPending()/var/www/nuage/3rdparty/guzzlehttp/promises/src/Promise.php - line 225: GuzzleHttp\Promise\Promise->invokeWaitList()/var/www/nuage/3rdparty/guzzlehttp/promises/src/Promise.php - line 62: GuzzleHttp\Promise\Promise->waitIfPending()/var/www/nuage/3rdparty/guzzlehttp/guzzle/src/Client.php - line 131: GuzzleHttp\Promise\Promise->wait()/var/www/nuage/lib/private/Http/Client/Client.php - line 251: GuzzleHttp\Client->request()/var/www/nuage/lib/private/Files/Storage/DAV.php - line 513: OC\Http\Client\Client->put()/var/www/nuage/lib/private/Files/Storage/DAV.php - line 420: OC\Files\Storage\DAV->uploadFile()/var/www/nuage/lib/private/Files/Storage/DAV.php - line 411: OC\Files\Storage\DAV->writeBack()<>OC\Files\Storage\DAV->OC\Files\Storage{closure}("*** sensiti ... *")/var/www/nuage/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php - line 121: call_user_func()<>Icewind\Streams\CallbackWrapper->stream_close()/var/www/nuage/lib/private/Files/Storage/Common.php - line 862: fclose()/var/www/nuage/lib/private/Files/Storage/Wrapper/Wrapper.php - line 630: OC\Files\Storage\Common->writeStream()/var/www/nuage/lib/private/Files/Storage/Wrapper/Wrapper.php - line 630: OC\Files\Storage\Wrapper\Wrapper->writeStream()/var/www/nuage/apps/dav/lib/Connector/Sabre/File.php - line 192: OC\Files\Storage\Wrapper\Wrapper->writeStream()/var/www/nuage/apps/dav/lib/Connector/Sabre/Directory.php - line 156: OCA\DAV\Connector\Sabre\File->put()/var/www/nuage/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096: OCA\DAV\Connector\Sabre\Directory->createFile()/var/www/nuage/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525: Sabre\DAV\Server->createFile()<>Sabre\DAV\CorePlugin->httpPut()/var/www/nuage/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array()/var/www/nuage/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit()/var/www/nuage/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod()/var/www/nuage/apps/dav/appinfo/v1/webdav.php - line 82: Sabre\DAV\Server->exec()/var/www/nuage/remote.php - line 165: require_once("/var/www/nu ... p")
Nextcloud Log
"reqId":"h6FsWPiHuamkZpR5CI2f","level":4,"time":"March 31, 2020 15:41:14","remoteAddr":"86.207.213.220","user":"Bushrider","app":"webdav","method":"PUT","url":"/remote.php/webdav/Nuage/Emilie/logofacture.png","message":{"Exception":"Sabre\\DAV\\Exception","Message":"Client error: `PUT http://orange.soubeyran.fr/webdav/Nuage/Emilie/logofacture.png.ocTransferId1912597708.part` resulted in a `417 Expectation Failed` response:\n<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n         \"htt (truncated...)\n","Code":0,"Trace":[{"file":"/var/www/nuage/apps/dav/lib/Connector/Sabre/File.php","line":244,"function":"convertToSabreException","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nuage/apps/dav/lib/Connector/Sabre/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nuage/3rdparty/sabr$
{"reqId":"2Z9Lyw05XjvaaRtoDdnW","level":3,"time":"March 31, 2020 15:43:28","remoteAddr":"86.207.213.220","user":"Bushrider","app":"remote","method":"PUT","url":"/remote.php/webdav/Nuage/Emilie/logofacture.png","message":{"Exception":"ParseError","Message":"syntax error, unexpected 'if' (T_IF)","Code":0,"Trace":[{"file":"/var/www/nuage/lib/composer/composer/ClassLoader.php","line":322,"function":"Composer\\Autoload\\includeFile"},{"function":"loadClass","class":"Composer\\Autoload\\ClassLoader","type":"->"},{"file":"/var/www/nuage/apps/dav/lib/Connector/Sabre/Directory.php","line":150,"function":"spl_autoload_call"},{"file":"/var/www/nuage/3rdparty/sabre/dav/lib/DAV/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nuage/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"function":"httpPut","c$
{"reqId":"2Z9Lyw05XjvaaRtoDdnW","level":3,"time":"March 31, 2020 15:43:28","remoteAddr":"86.207.213.220","user":"Bushrider","app":"no app in context","method":"PUT","url":"/remote.php/webdav/Nuage/Emilie/logofacture.png","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"calendar.view.index\" as such route does not exist.","Code":0,"Trace":[{"file":"/var/www/nuage/lib/private/Route/Router.php","line":339,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/var/www/nuage/lib/private/URLGenerator.php","line":82,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nuage/lib/private/NavigationManager.php","line":293,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nuage/lib/private/NavigationManager.php","line":114,"function":"init",$
{"reqId":"2Z9Lyw05XjvaaRtoDdnW","level":3,"time":"March 31, 2020 15:43:28","remoteAddr":"86.207.213.220","user":"Bushrider","app":"no app in context","method":"PUT","url":"/remote.php/webdav/Nuage/Emilie/logofacture.png","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"photos.page.index\" as such route does not exist.","Code":0,"Trace":[{"file":"/var/www/nuage/lib/private/Route/Router.php","line":339,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/var/www/nuage/lib/private/URLGenerator.php","line":82,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nuage/lib/private/NavigationManager.php","line":293,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nuage/lib/private/NavigationManager.php","line":114,"function":"init","c$
{"reqId":"FAAEXbSnjipS6Ak8JYC0","level":3,"time":"March 31, 2020 15:44:15","remoteAddr":"86.207.213.220","user":"Bushrider","app":"no app in context","method":"PUT","url":"/remote.php/webdav/Nuage/Emilie/logofacture.png","message":{"Exception":"GuzzleHttp\\Exception\\ClientException","Message":"Client error: `PUT http://orange.soubeyran.fr/webdav/Nuage/Emilie/logofacture.png.ocTransferId1267903985.part` resulted in a `417 Expectation Failed` response:\n<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n         \"htt (truncated...)\n","Code":417,"Trace":[{"file":"/var/www/nuage/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":66,"function":"create","class":"GuzzleHttp\\Exception\\RequestException","type":"::"},{"file":"/var/www/nuage/3rdparty/guzzlehttp/promises/src/Promise.php","line":203,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","$
{"reqId":"FAAEXbSnjipS6Ak8JYC0","level":4,"time":"March 31, 2020 15:44:15","remoteAddr":"86.207.213.220","user":"Bushrider","app":"webdav","method":"PUT","url":"/remote.php/webdav/Nuage/Emilie/logofacture.png","message":{"Exception":"Sabre\\DAV\\Exception","Message":"Client error: `PUT http://orange.soubeyran.fr/webdav/Nuage/Emilie/logofacture.png.ocTransferId1267903985.part` resulted in a `417 Expectation Failed` response:\n<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n         \"htt (truncated...)\n","Code":0,"Trace":[{"file":"/var/www/nuage/apps/dav/lib/Connector/Sabre/File.php","line":244,"function":"convertToSabreException","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nuage/apps/dav/lib/Connector/Sabre/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nuage/3rdparty/sabr$
{"reqId":"qjbgJZe1PQPOZVXRLrX5","level":3,"time":"March 31, 2020 15:44:48","remoteAddr":"86.207.213.220","user":"Bushrider","app":"PHP","method":"GET","url":"/apps/logreader/get?offset=0&count=50&levels=11111","message":"Trying to access array offset on value of type null at /var/www/nuage/apps/logreader/lib/Log/LogIterator.php#78","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0","version":"18.0.3.0"}
{"reqId":"qjbgJZe1PQPOZVXRLrX5","level":3,"time":"March 31, 2020 15:44:48","remoteAddr":"86.207.213.220","user":"Bushrider","app":"PHP","method":"GET","url":"/apps/logreader/get?offset=0&count=50&levels=11111","message":"Trying to access array offset on value of type null at /var/www/nuage/apps/logreader/lib/Log/LogIterator.php#78","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0","version":"18.0.3.0"}

@kesselb
Copy link
Contributor

kesselb commented Mar 31, 2020

You may change the loglevel to 0 in config.php to log the message.

@Bushrider
Copy link
Author

Ok thx !
Here it is ...
nextcloud.log

@ghost
Copy link

ghost commented Apr 30, 2020

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Apr 30, 2020
@ghost ghost closed this as completed May 14, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: external storage needs info stale Ticket or PR with no recent activity
Projects
None yet
Development

No branches or pull requests

2 participants