nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.89k stars 4.02k forks source link

Browserupload fails with net::ERR_NETWORK_CHANGED #20699

Closed loelkes closed 3 years ago

loelkes commented 4 years ago

How to use GitHub

Steps to reproduce

  1. Create 5GB, 10GB, 20GB dummy files
  2. Upload these files with a browser to a shared folder over a normal household internet connection.
  3. Renew your IP-Address from DHCP. This will trigger a net::ERR_NETWORK_CHANGED and crash the upload (even if the IP and everything remains the same).

Expected behaviour

The file should upload without issues.

Actual behaviour

After a random amount of time the upload fails. There is a generic message for the user about the failed upload. The JS Console in the Browser says net::ERR_NETWORK_CHANGED

My device (laptop) is connected over wifi and it is not clear where the ERR_NETWORK_CHANGED comes from. Nothing was changed.

It seems that this is not handled properly and crashes the upload. This only appears with HTTP/2 enabled. I've disabled it for now but it would be nice to use HTTP/2 at some point.

Server configuration

Operating system: Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

Web server: Server version: Apache/2.4.38 (Debian) Server built: 2019-10-15T19:53:42 mod_reqtimeout (see #15095 and #9471) is disabled.

Database: Server version: 10.3.22-MariaDB-0+deb10u1 Debian 10

PHP version: PHP 7.3.14-1~deb10u1 (fpm-fcgi) (built: Feb 16 2020 15:07:23)

Nextcloud version: (see Nextcloud admin page) 18.0.4

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 18.0.3 but this problems persists since several versions.

Where did you install Nextcloud from: Source from nextcloud.com

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ``` Enabled: - accessibility: 1.4.0 - calendar: 2.0.3 - cloud_federation_api: 1.1.0 - dav: 1.14.0 - deck: 0.8.2 - 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_versions: 1.11.0 - files_videoplayer: 1.7.0 - flowupload: 0.1.8 - groupfolders: 6.0.6 - impersonate: 1.5.0 - logreader: 2.3.0 - lookup_server_connector: 1.6.0 - notifications: 2.6.0 - oauth2: 1.6.0 - onlyoffice: 4.1.4 - photos: 1.0.0 - polls: 1.3.0 - provisioning_api: 1.8.0 - serverinfo: 1.8.0 - settings: 1.0.0 - spreed: 8.0.8 - tasks: 0.12.2 - theming: 1.9.0 - twofactor_backupcodes: 1.7.0 - user_ldap: 1.8.0 - viewer: 1.2.0 - workflowengine: 2.0.0 Disabled: - activity - admin_audit - comments - contacts - encryption - files_downloadactivity - files_trashbin - firstrunwizard - metadata - nextcloud_announcements - password_policy - previewgenerator - privacy - recommendations - sharebymail - support - survey_client - systemtags - text - updatenotification - workflow_script ```

Nextcloud configuration:

Config report ``` { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***", "overwriteprotocol": "https", "dbtype": "mysql", "version": "18.0.4.2", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "Europe\/Berlin", "installed": true, "ldapIgnoreNamingRules": false, "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory", "filelocking.enabled": true, "auth.bruteforce.protection.enabled": "false", "memcache.locking": "\\OC\\Memcache\\Redis", "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0 }, "maintenance": false, "log_type": "file", "logfile": "\/var\/log\/nextcloud\/nextcloud.log", "loglevel": 2, "logdateformat": "F d, Y H:i:s", "updater.release.channel": "stable", "app.mail.accounts.default": { "email": "***REMOVED SENSITIVE VALUE***", "imapHost": "***REMOVED SENSITIVE VALUE***", "imapPort": 993, "imapSslMode": "ssl", "imapUser": "%USERID%", "smtpHost": "***REMOVED SENSITIVE VALUE***", "smtpPort": 465, "smtpSslMode": "ssl", "smtpUser": "%USERID%" }, "theme": "", "app_install_overwrite": [ "calendar", "groupfolders" ], "mysql.utf8mb4": true, "preview_max_x": "2048", "preview_max_y": "2048", "jpeg_quality": "60", "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp" } } ```

Are you using external storage, if yes which one: local

Are you using encryption: no

Are you using an external user-backend, if yes which one: None

Client configuration

Browser: Chrome Version 81.0.4044.122 (Official Build) (64-bit) Firefox Version 75 (64-bit)

Operating system: macOS 15.0.4

Logs

Web server error log

Web server error log ``` No entries in php or apache2 error log. ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` [webdav] Fatal: Sabre\DAV\Exception\BadRequest: Expected filesize of 10737418240 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 7020544 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. at <> 0. /srv/nextcloud/www/apps/dav/lib/Connector/Sabre/Directory.php line 156 OCA\DAV\Connector\Sabre\File->put(null) 1. /srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/Server.php line 1096 OCA\DAV\Connector\Sabre\Directory->createFile("10g-test.file", null) 2. /srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525 Sabre\DAV\Server->createFile("10g-test.file", null, null) 3. <> Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {}) 4. /srv/nextcloud/www/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105 call_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }]) 5. /srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/Server.php line 479 Sabre\Event\EventEmitter->emit("method:PUT", [Sabre\HTTP\Requ ... }]) 6. /srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/Server.php line 254 Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {}) 7. /srv/nextcloud/www/apps/dav/appinfo/v1/publicwebdav.php line 109 Sabre\DAV\Server->exec() 8. /srv/nextcloud/www/public.php line 81 require_once("/srv/nextcloud/ ... p") PUT /public.php/webdav/10g-test.file from xxx.xxx.xxx.xxx at 2020-04-28T01:08:58+02:00 ```

Browser log

Browser log ``` QMIGRATE: Migrate is installed, version 1.4.1 OCA.Viewer initialized TypeError: OCA.Files.App is undefined OC.requestToken changed [...] [...Warnings about deprecated libraries, several thousand....] Failed to load resource: net::ERR_NETWORK_CHANGED /public.php/webdav/20g-test.file:1 ```
szaimen commented 3 years ago

Thank you for taking the time to report a bug! 👍

As this seems to be a setup issue I would like to ask you to raise your question in the forums: https://help.nextcloud.com If you wish support with setup issues from Nextcloud GmbH we offer this as part of the Nextcloud subscription. Learn more about this at https://nextcloud.com/enterprise/