Closed fnaith closed 1 year ago
Hey @fnaith , what is the size of the files that you are trying to upload?
2.9 MB ...
And then I don't even try to upload anything. Because I just assume any file uploading can't be done.
BTW, I don't set email, webdav server and disable many apps. Don't know the root cause of this issue.
I asked the size, because it was only occurring for me with bigger files. But yha this a critical bug, as this breaks the main functionality of Nextcloud
Same thing happens to me with docker-compose mariadb container and nextcloud container. Cant upload files over the browser.
Same thing happens to me with docker-compose mariadb container and nextcloud container. Cant upload files over the browser.
If you are experiencing the same please upvote the issue, so we can show that more people is getting the same problem as us!
Yay, and maybe more people can collect enough data for this issue.
I've been attempting to reproduce this. I was about to give up and gather a bit more information then I thought to try one more thing: And I managed to trigger this issue.
If I set a quota and the upload manages to hit up against it it occurs.
Do either of you have a user quota (in nextcloud) on your respective accounts? Or possibly other reasons to be hitting disk space limitations on the server?
Keep in mind that uploads require more space temporarily so it may be getting triggered even if you think your upload is within your storage limits.
I set 5GB per user.
And what is your current quota utilization? And, for completeness, do you have plenty of storage space available on the underlying server itself?
Also, in your nextcloud logs, what is the entry immediately proceeding the entry for the getUploadStorage()
error? (either from nextcloud.log
or from Administration settings->Logging
in the Web interface)?
log :
quota :
[PHP] Error: Undefined array key "mail_smtpauthtype" at /var/www/html/apps/settings/templates/settings/admin/additional-mail.php#132
GET /settings/admin
from 36.225.108.244 by fnaith at 2023-04-07T14:19:10+00:00
My problem was fixxed because of the proxy container client_max_body_size was too little. I got into the /home/user/nextcloud/proxy/conf.d there is a file called default.conf I added to the bottom client_max_body_size 5000m; after this I reloaded nginx and "sudo docker exex "ContainerName" nginx -s reload" and it fixxed my problem. Dont forget to modify in the docker-compose file the envirnoment variable: PHP_UPLOAD_LIMIT="Your Limit"
Thanks you @MrDarkPat 🥇
My problem is solved, after adding client_max_body_size 1G;
in my nginx.conf .
@joshtrichards Sorry for my careless setting. 🙇
@MiguelNdeCarvalho could you also try this approach ?
Whats the apoppriate setting for apache2 configurations? Seems like I am missing something.
I have the same issue, just did a fresh installation and getting this error. I have added under environment max size limits and also mapped .conf file with upload size limit but it makes no difference. Can someone please help or should I downgrade to v25?
@vincentkenny01 maybe you can give more information to maintainer ?
here is the error log which looks like the same as above.
{"reqId":"pmoyihLF5z84CArptLdW","level":3,"time":"2023-04-12T12:14:25+00:00","remoteAddr":"85.89.187.99","user":"vp","app":"webdav","method":"DELETE","url":"/remote.php/dav/uploads/vp/web-file-upload-7527ba7ca898082f86c85e47f260fb69-1681301664831","message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15","version":"26.0.0.11","exception":{"Exception":"TypeError","Message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","Code":0,"Trace":[{"file":"/var/www/html/apps/dav/lib/Upload/ChunkingV2Plugin.php","line":263,"function":"getUploadStorage","class":"OCA\\DAV\\Upload\\ChunkingV2Plugin","type":"->","args":[null]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeDelete","class":"OCA\\DAV\\Upload\\ChunkingV2Plugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeMethod:DELETE",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":171,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/Upload/ChunkingV2Plugin.php","Line":294,"message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","exception":[],"CustomMessage":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263"},"id":"6436a0d721111"}
Whats the apoppriate setting for apache2 configurations? Seems like I am missing something.
There is no limit there.
Do you use the Docker version?. Maybe the issue is there.
Hi It’s fixed now. Not sure why I had this error but I did a fresh install and it’s all working again.
On 16 Apr 2023, at 14:01, EchedeyLR @.***> wrote:
Whats the apoppriate setting for apache2 configurations? Seems like I am missing something.
There is no limit there.
Do you use the Docker version? Maybe the issue is there.
— Reply to this email directly, view it on GitHubhttps://github.com/nextcloud/server/issues/37578#issuecomment-1510375770, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGKX2U4C4FHXFK5KVOM3WLXBPUUHANCNFSM6AAAAAAWTM26K4. You are receiving this because you were mentioned.Message ID: @.***>
A fresh install is not a proper solution for the issue. Here I have a lot of information in a multiuser environment and that would break everything.
I am using a raw installation with Apache2.
I think that the issue is in Nextcloud 26 since I have the same configurations in another host for Nextcloud 25 and this doesn't happen.
New information: Neither Nextcloud desktop app nor Android app have this issue. Just the web browser client.
I have this error as well, and the problem that i cannot cancel the upload and need to reload the tab that it cancels a file upload. this happens only in NC26.
I got the same issue but I noticed that on the reverse proxy (nginx) there was no space left (at a first glance it still did look alright - i noticed it because i wanted to do a restart from nginx after setting this: client_max_body_size 1G; it was before set to 0
This issue still exists in 26.0.1.
Just faced the same problem. Didn't have to upload any big file for quite a while, until today. I know, it used to work and my PHP installation didn't change, but I upgraded my Nextcloud several times since last big file upload. I disabled Cloudflare just to rule it out. No joy either desktop client or web, just TypeError: OCA\DAV\Upload\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/nextcloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263
. My setup is plain Apache2 with PHP8.1-FPM. Already applied mods from admin manual
Nextcloud 26.0.1
PHP: Version: 8.1.2 Memory limit: 4 GB Max execution time: 3600 Upload max size: 16 GB Extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, exif, memcache, pdo_pgsql, pgsql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
DB: Type: pgsql Version: PostgreSQL 14.7 (Ubuntu 14.7-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, 64-bit Size: 1.9 GB
In comparison with some other people here using Nginx as frontend (mostly reserve proxy), we both share the same issue @adi-dev.
Btw a tip, memory limit and post size must be always higher than upload filesize.
Also, having the upload filesize limited to 32 or 64 MiB in versions 25 and before didn't affect to the uploading of big files because Nextcloud perform chunking, which is currently failing.
Btw a tip, memory limit and post size must be always higher than upload filesize.
Also, having the upload filesize limited to 32 or 64 MiB in versions 25 and before didn't affect to the uploading of big files because Nextcloud perform chunking, which is currently failing.
Fixing memory limit, post size and upload filesize didn't make any difference.
Faced the same issue. When I upload a directory containing files only files less than 10Mb are uploaded. Upload filesize and memory limit tweaked in both php and nginx. The exception is
OCA\DAV\Upload\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given
Nextcloud was installed today. Maybe the reason is related with the storage. I use external S3 as default one. S3 is not mounted by OS, it is connected as nextcloud external storage. Nginx, php8.0. Nextcloud Hub 4 (26.0.1), non-Docker environment. PS. Checked the size of files. 9.9Mb uploads successfully, 10.01Mb gives an error PPS. https://help.nextcloud.com/t/nextcloud-13-chunking-upload-not-working/28755/17 fixed this error for me
Hi all,
I notice same issue in some of my instances (26.0.1( when I try to "cancel" an upload or backend try to delete something on upload.
OCA\DAV\Upload\ChunkingV2Plugin::getUploadStorage(): Argument https://github.com/nextcloud/server/issues/1 ($targetPath) must be of type string, null given
I found a "bug" on the ChunkingV2Plugin and I will try to create a PR to fix it. Hoping central team will approve it.
Hi everyone. I was experiencing the same problem when uploading things bigger than 40MB. My nextcloud instance is running with docker-compose and behind nginx proxy manager, I have increased php file upload size, memory size, etc. I tried many things in the NPM but the only thing that worked for me was by setting this proxy_request_buffering off;
Hopefully this will help someone.
I just had the same issue, until yesterday I managed to upload around 350GB of files with mixed dimensions without any issue.
Today, after running docker compose pull
and disabling/enabling lots of apps, I encountered this error.
Sometimes before the error on OP I had
{
"reqId": "trpdXyC7K1cm9eotQv2b",
"level": 3,
"time": "2023-05-05T21:41:54+00:00",
"remoteAddr": "172.172.9.5",
"user": "user.name",
"app": "webdav",
"method": "PUT",
"url": "/remote.php/dav/files/user.name/temp/real/ezgif-3-9da59e779c.gif",
"message": "Access denied to image/gif in Folder temp/real/ezgif-3-9da59e779c.gif.ocTransferId1837870855.part",
"userAgent": "Mozilla/5.0 (Windows) mirall/3.8.1stable-Win64 (build 20230419) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)",
"version": "26.0.1.1",
"exception": {
"Exception": "OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden",
"Message": "Access denied to image/gif in Folder temp/real/ezgif-3-9da59e779c.gif.ocTransferId1837870855.part",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
"line": 318,
"function": "convertToSabreException",
"class": "OCA\\DAV\\Connector\\Sabre\\File",
"type": "->",
"args": [
[
"OCP\\Files\\ForbiddenException"
]
]
},
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
"line": 149,
"function": "put",
"class": "OCA\\DAV\\Connector\\Sabre\\File",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1098,
"function": "createFile",
"class": "OCA\\DAV\\Connector\\Sabre\\Directory",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 504,
"function": "createFile",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpPut",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"method:PUT",
[
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 253,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 321,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/lib/Server.php",
"line": 366,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/remote.php",
"line": 172,
"args": [
"/var/www/html/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
"Line": 723,
"Previous": {
"Exception": "OCP\\Files\\ForbiddenException",
"Message": "Access denied to image/gif in Folder temp/real/ezgif-3-9da59e779c.gif.ocTransferId1837870855.part",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/custom_apps/files_staticmimecontrol/lib/StorageWrapper.php",
"line": 206,
"function": "checkFileAccess",
"class": "OCA\\FilesStaticmimecontrol\\StorageWrapper",
"type": "->",
"args": [
"files/temp/real/ezgif-3-9da59e779c.gif.ocTransferId1837870855.part"
]
},
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
"line": 248,
"function": "writeStream",
"class": "OCA\\FilesStaticmimecontrol\\StorageWrapper",
"type": "->",
"args": [
"files/temp/real/ezgif-3-9da59e779c.gif.ocTransferId1837870855.part",
null
]
},
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
"line": 149,
"function": "put",
"class": "OCA\\DAV\\Connector\\Sabre\\File",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1098,
"function": "createFile",
"class": "OCA\\DAV\\Connector\\Sabre\\Directory",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 504,
"function": "createFile",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpPut",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"method:PUT",
[
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 253,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 321,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/lib/Server.php",
"line": 366,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/remote.php",
"line": 172,
"args": [
"/var/www/html/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/html/custom_apps/files_staticmimecontrol/lib/StorageWrapper.php",
"Line": 130
},
"message": "Access denied to image/gif in Folder temp/real/ezgif-3-9da59e779c.gif.ocTransferId1837870855.part",
"exception": {},
"CustomMessage": "Access denied to image/gif in Folder temp/real/ezgif-3-9da59e779c.gif.ocTransferId1837870855.part"
}
}
Which lead me to solve the issue by disabling the following app: https://apps.nextcloud.com/apps/files_staticmimecontrol It might be something unrelated but it was worth mentioning
Hey ,
Had the same issue. Kubernetes Helm setup.
For me , I was missing annotations from ingress nginx. I added the following annotations to my ingress : https://github.com/nextcloud/helm/blob/main/charts/nextcloud/values.yaml#L26 and it Worked.
Hope it helps
is it possible to disable this buggy ChunkingV2Plugin plugin? how?
@dportabella The fix is in v26.0.2 and v27.0.0. Are you able to run one of those releases?
I confirm that updating to v27.0.0 solved the issue 🥳🙏
⚠️ This issue respects the following points: ⚠️
Bug description
My docker install of Nextcloud 26.0 with mysql was starting normally. Even bookmarks app works as expect. However when I upload file from browser or windows desktop app, it give following error :
In help.nextcloud.com, a user suggest a solution by adding checkPrerequisites() call before calling getUploadStorage().
Steps to reproduce
Expected behavior
Upload file successfully.
Installation method
Community Docker image
Nextcloud Server version
26
Operating system
RHEL/CentOS
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
docker-compose.yml :