-
Notifications
You must be signed in to change notification settings - Fork 95
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
I was unlucky enough to have a video (.mp4) file on my phone with exactly 37548033 bytes. After some experimentation I discovered a pattern in the file sizes that fail to upload.
Steps to reproduce
- Create empty file with 2560000 * n + 11948033 bytes.
E.g. for n=0 -> 11948033 we can useddon linux:dd if=/dev/zero of=upload_test.bin bs=11948033 count=1 - Transfer this file to the phone
- Try to upload the file (either via automatic folder sync or share the file from another application and upload to nextcloud).
Expected behaviour
I expect the file to upload normally, like any other file. This issue does not exist for the web upload or nextcloud client on Firefox, Ubuntu
Actual behaviour
The upload in the app hangs when the progress bar nears the end. Eventually a timeout is reached and 'Connection error' is displayed.
I used adb logcat to get the app log, which displays the following exception (sensitive info removed):
Logcat output
07-01 11:42:44.039 21566 22043 E UploadFileOperation: Upload of /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/tmp/<server url>/upload_test_large.bin to /upload_test_large.bin: Socket timeout exception
07-01 11:42:44.039 21566 22043 E UploadFileOperation: java.net.SocketTimeoutException: Read timed out
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_read(Native Method)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.google.android.gms.org.conscrypt.NativeSsl.read(:com.google.android.gms@252431035@25.24.31 (260400-772615181):34)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(:com.google.android.gms@252431035@25.24.31 (260400-772615181):11)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at java.io.BufferedInputStream.fill(BufferedInputStream.java:239)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at java.io.BufferedInputStream.read(BufferedInputStream.java:258)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.owncloud.android.lib.common.OwnCloudClient.executeMethod(OwnCloudClient.java:192)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.owncloud.android.lib.resources.files.ChunkedFileUploadRemoteOperation.uploadChunk(ChunkedFileUploadRemoteOperation.java:294)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.owncloud.android.lib.resources.files.ChunkedFileUploadRemoteOperation.run(ChunkedFileUploadRemoteOperation.java:201)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:193)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.owncloud.android.operations.UploadFileOperation.normalUpload(UploadFileOperation.java:1055)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.owncloud.android.operations.UploadFileOperation.run(UploadFileOperation.java:451)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:193)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.nextcloud.client.jobs.upload.FileUploadWorker.upload(FileUploadWorker.kt:265)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.nextcloud.client.jobs.upload.FileUploadWorker.uploadFiles(FileUploadWorker.kt:215)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.nextcloud.client.jobs.upload.FileUploadWorker.retrievePagesBySortingUploadsByID(FileUploadWorker.kt:158)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at com.nextcloud.client.jobs.upload.FileUploadWorker.doWork(FileUploadWorker.kt:103)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at androidx.work.Worker$startWork$1.invoke(Worker.kt:64)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at androidx.work.Worker$startWork$1.invoke(Worker.kt:64)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at androidx.work.WorkerKt.future$lambda$2$lambda$1(Worker.kt:100)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at androidx.work.WorkerKt.$r8$lambda$06LNzu7McnKR6G06fSbfQ2BCegc(Unknown Source:0)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at androidx.work.WorkerKt$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
07-01 11:42:44.039 21566 22043 E UploadFileOperation: at java.lang.Thread.run(Thread.java:1012)
In the folder configured under cache_path in config.php, a temporary file is created with the .part extension. If the uploaded file is larger than 40MB, it seems that multiple files are created in a subfolder, starting with file 000001, 000002, each 40MB. When the file is almost uploaded, the .part file does not grow anymore, and the size is stuck slightly below the expected size.
In the nextcloud log I see the following error when the upload fails:
Expected filesize of 14508033 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 14508032 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.
The exact number of bytes differs depending on the file that was uploaded, but the difference betwen the first and the second number is always either 4097 bytes (when n is even) or 1 byte (when n is odd).
In my Apache error.log file I see the following error once per failed upload:
[Tue Jul 01 13:34:15.434063 2025] [proxy_fcgi:error] [pid 1593826:tid 124504913446592] (70008)Partial results are valid but processing is incomplete: [client <my external ip address>] AH01075: Error dispatching request to : (reading input brigade)
Server configuration
Web server: Apache
Database: MySQL
PHP version: 8.3
Nextcloud version: 31.0.6.2
List of activated apps
Enabled:
- activity: 4.0.0
- app_api: 5.0.2
- bruteforcesettings: 4.0.0
- camerarawpreviews: 0.8.7
- cloud_federation_api: 1.14.0
- comments: 1.21.0
- dav: 1.33.0
- external: 6.0.2
- federatedfilesharing: 1.21.0
- files: 2.3.1
- files_accesscontrol: 2.0.0
- files_downloadlimit: 4.0.0
- files_pdfviewer: 4.0.0
- files_reminders: 1.4.0
- files_sharing: 1.23.1
- files_trashbin: 1.21.0
- files_versions: 1.24.0
- impersonate: 2.0.0
- logreader: 4.0.0
- lookup_server_connector: 1.19.0
- memories: 7.5.2
- nextcloud_announcements: 3.0.0
- notifications: 4.0.0
- oauth2: 1.19.1
- password_policy: 3.0.0
- photos: 4.0.0-dev.1
- previewgenerator: 5.8.0
- privacy: 3.0.0
- profile: 1.0.0
- provisioning_api: 1.21.0
- related_resources: 2.0.0
- richdocuments: 8.7.1
- serverinfo: 3.0.0
- settings: 1.14.0
- sharebymail: 1.21.0
- suspicious_login: 9.0.1
- systemtags: 1.21.1
- tasks: 0.16.1
- text: 5.0.0
- theming: 2.6.1
- twofactor_backupcodes: 1.20.0
- twofactor_totp: 13.0.0-dev.0
- updatenotification: 1.21.0
- user_ldap: 1.22.0
- viewer: 4.0.0
- webhook_listeners: 1.2.0
- workflowengine: 2.13.0
Disabled: - admin_audit: 1.21.0
- circles: 31.0.0 (installed 23.1.0)
- contacts: 7.1.0 (installed 7.1.0)
- contactsinteraction: 1.12.0 (installed 1.4.0)
- dashboard: 7.11.0 (installed 7.3.0)
- encryption: 2.19.0
- facerecognition: 0.9.60 (installed 0.9.60)
- federation: 1.21.0 (installed 1.6.0)
- files_external: 1.23.0
- firstrunwizard: 4.0.0 (installed 4.0.0)
- recognize: 8.2.0 (installed 8.2.0)
- recommendations: 4.0.0 (installed 1.0.0)
- support: 3.0.0 (installed 3.0.0)
- survey_client: 3.0.0 (installed 1.11.0)
- twofactor_nextcloud_notification: 5.0.0
- user_status: 1.11.0 (installed 1.11.0)
- weather_status: 1.11.0 (installed 1.3.0)
Nextcloud configuration
{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"localhost",
"",
"<server url 2>",
""
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"version": "31.0.6.2",
"dbtype": "mysql",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbname": "REMOVED SENSITIVE VALUE",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"dbtableprefix": "oc_",
"installed": true,
"default_language": "en",
"force_language": "en",
"default_locale": "en",
"force_locale": false,
"defaultapp": "files",
"knowledgebaseenabled": true,
"allow_user_to_change_display_name": true,
"remember_login_cookie_lifetime": 1296000,
"session_lifetime": 86400,
"session_keepalive": true,
"token_auth_enforced": true,
"auth.bruteforce.protection.enabled": true,
"skeletondirectory": "/var/www//core/skeleton",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_smtpdebug": false,
"mail_smtpmode": "smtp",
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "25",
"mail_smtptimeout": 10,
"mail_smtpsecure": "tls",
"mail_smtpauth": 1,
"mail_smtpauthtype": "LOGIN",
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"mail_template_class": "\OC\Mail\EMailTemplate",
"mail_send_plaintext_only": false,
"mail_smtpstreamoptions": [],
"mail_sendmailmode": "smtp",
"overwritehost": "",
"overwriteprotocol": "",
"overwritewebroot": "",
"overwritecondaddr": "",
"overwrite.cli.url": "https://",
"htaccess.RewriteBase": "/",
"htaccess.IgnoreFrontController": false,
"proxy": "",
"proxyuserpwd": "REMOVED SENSITIVE VALUE",
"trashbin_retention_obligation": "auto",
"versions_retention_obligation": "auto",
"appcodechecker": true,
"updatechecker": true,
"updater.server.url": "REMOVED SENSITIVE VALUE",
"updater.release.channel": "stable",
"has_internet_connection": true,
"connectivity_check_domains": [
"www.nextcloud.com",
"www.startpage.com",
"www.eff.org",
"www.edri.org"
],
"check_for_working_wellknown_setup": true,
"check_for_working_htaccess": true,
"check_data_directory_permissions": true,
"config_is_read_only": false,
"log_type": "file",
"logfile": "/var/log/nextcloud/-nextcloud.log",
"logfilemode": 416,
"loglevel": 2,
"syslog_tag": "Nextcloud",
"log.condition": {
"shared_secret": "REMOVED SENSITIVE VALUE",
"users": [
"sample-user"
],
"apps": [
"files"
]
},
"logdateformat": "c",
"logtimezone": "Europe/Amsterdam",
"log_query": false,
"log_rotate_size": 104857600,
"customclient_desktop": "https://nextcloud.com/install/#install-clients",
"customclient_android": "https://play.google.com/store/apps/details?id=com.nextcloud.client",
"customclient_ios": "https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8",
"customclient_ios_appid": "1125420102",
"appstoreenabled": true,
"apps_paths": [
{
"path": "/var/www//apps",
"url": "/apps",
"writable": true
}
],
"enable_previews": true,
"preview_max_x": 2048,
"preview_max_y": 2048,
"preview_max_filesize_image": 50,
"preview_libreoffice_path": "/usr/bin/libreoffice",
"preview_office_cl_parameters": " --headless --nologo --nofirststartwizard --invisible --norestore --convert-to png --outdir ",
"enabledPreviewProviders": [
"OC\Preview\PNG",
"OC\Preview\JPEG",
"OC\Preview\GIF",
"OC\Preview\HEIC",
"OC\Preview\BMP",
"OC\Preview\XBitmap",
"OC\Preview\MP3",
"OC\Preview\TXT",
"OC\Preview\MarkDown",
"OC\Preview\Movie",
"OC\Preview\MKV",
"OC\Preview\MP4",
"OC\Preview\AVI",
"OC\Preview\Image",
"OC\Preview\TIFF"
],
"ldapUserCleanupInterval": 51,
"sort_groups_by_name": false,
"comments.managerFactory": "\OC\Comments\ManagerFactory",
"systemtags.managerFactory": "\OC\SystemTag\ManagerFactory",
"maintenance": false,
"openssl": {
"config": "/etc/ssl/openssl.cnf"
},
"memcache.local": "\OC\Memcache\APCu",
"memcache.distributed": "\OC\Memcache\Redis",
"redis": {
"host": "REMOVED SENSITIVE VALUE",
"port": 0,
"timeout": 0,
"password": "REMOVED SENSITIVE VALUE",
"dbindex": 0
},
"cache_path": "/var/www//data/cache",
"cache_chunk_gc_ttl": 86400,
"sharing.managerFactory": "\OC\Share20\ProviderFactory",
"sharing.maxAutocompleteResults": 0,
"sharing.minSearchStringLength": 0,
"sharing.enable_share_accept": false,
"sharing.force_share_accept": false,
"mysql.utf8mb4": true,
"supportedDatabases": [
"mysql"
],
"tempdirectory": "/tmp",
"hashingCost": 10,
"forbidden_filenames": [
".htaccess"
],
"share_folder": "/",
"theme": "",
"cipher": "AES-256-CFB",
"minimum.supported.desktop.version": "2.0.0",
"quota_include_external_storage": false,
"external_storage.auth_availability_delay": 1800,
"filesystem_check_changes": 0,
"part_file_in_storage": false,
"mount_file": "/var/www//data/mount.json",
"filesystem_cache_readonly": false,
"secret": "REMOVED SENSITIVE VALUE",
"trusted_proxies": "REMOVED SENSITIVE VALUE",
"forwarded_for_headers": [
"HTTP_X_FORWARDED_FOR"
],
"max_filesize_animated_gifs_public_sharing": 10,
"filelocking.enabled": true,
"filelocking.ttl": 3600,
"memcache.locking": "\OC\Memcache\Redis",
"filelocking.debug": false,
"upgrade.disable-web": false,
"debug": false,
"data-fingerprint": "",
"copied_sample_config": false,
"lookup_server": "",
"gs.enabled": false,
"gs.federation": "internal",
"simpleSignUpLink.shown": false,
"login_form_autocomplete": true,
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "OCA\User_LDAP\LDAPProviderFactory",
"default_phone_region": "NL",
"app_install_overwrite": [
"printer",
"documentserver_community",
"files_3d",
"facerecognition"
],
"maintenance_window_start": 2,
"memories.exiftool": "/var/www//apps/memories/bin-ext/exiftool-amd64-glibc",
"memories.vod.path": "/var/www//apps/memories/bin-ext/go-vod-amd64",
"memories.vod.ffmpeg": "/usr/bin/ffmpeg",
"memories.vod.ffprobe": "/usr/bin/ffprobe",
"memories.db.triggers.fcu": true,
"memories.vod.disable": false,
"memories.gis_type": 1,
"files.chunked_upload.max_size": 104857600,
"files.chunked_upload.max_parallel_count": 10,
"files.trash.delete": true
}
}