nextcloud / server

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

[Bug]: When uploading a file from browser or windows desktop app, it give following error getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given #37578

Closed fnaith closed 1 year ago

fnaith commented 1 year ago

⚠️ 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 :

[webdav] Error: TypeError: 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 at <<closure>>

0. /var/www/html/apps/dav/lib/Upload/ChunkingV2Plugin.php line 263
   OCA\DAV\Upload\ChunkingV2Plugin->getUploadStorage(null)
1. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
   OCA\DAV\Upload\ChunkingV2Plugin->beforeDelete(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])
2. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 456
   Sabre\DAV\Server->emit("beforeMethod:DELETE", [["Sabre\\HTTP\\ ... ]])
3. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253
   Sabre\DAV\Server->invokeMethod(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])
4. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321
   Sabre\DAV\Server->start()
5. /var/www/html/apps/dav/lib/Server.php line 366
   Sabre\DAV\Server->exec()
6. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
   OCA\DAV\Server->exec()
7. /var/www/html/remote.php line 171
   require_once("/var/www/html/a ... p")

In help.nextcloud.com, a user suggest a solution by adding checkPrerequisites() call before calling getUploadStorage().

Steps to reproduce

  1. Create a CentOS 7(maybe by aws lightsail) and deploy Nextcloud 26 with docker compose.
  2. Login to Nextcloud as admin to finish initiation setup.
  3. Upload a file and check the error log.

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

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "drive.fnaith.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "26.0.0.11",
        "overwrite.cli.url": "http:\/\/drive.fnaith.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https"
    }
}

List of activated Apps

nabled:
  - activity: 2.18.0
  - bookmarks: 13.0.1
  - circles: 26.0.0
  - cloud_federation_api: 1.9.0
  - dashboard: 7.6.0
  - dav: 1.25.0
  - federatedfilesharing: 1.16.0
  - files: 1.21.1
  - files_pdfviewer: 2.7.0
  - files_rightclick: 1.5.0
  - files_sharing: 1.18.0
  - files_trashbin: 1.16.0
  - files_versions: 1.19.1
  - firstrunwizard: 2.15.0
  - logreader: 2.11.0
  - lookup_server_connector: 1.14.0
  - nextcloud_announcements: 1.15.0
  - notifications: 2.14.0
  - oauth2: 1.14.0
  - password_policy: 1.16.0
  - photos: 2.2.0
  - privacy: 1.10.0
  - provisioning_api: 1.16.0
  - related_resources: 1.1.0-alpha1
  - serverinfo: 1.16.0
  - settings: 1.8.0
  - sharebymail: 1.16.0
  - support: 1.9.0
  - survey_client: 1.14.0
  - systemtags: 1.16.0
  - text: 3.7.2
  - theming: 2.1.1
  - twofactor_backupcodes: 1.15.0
  - updatenotification: 1.16.0
  - viewer: 1.10.0
  - workflowengine: 2.8.0
Disabled:
  - admin_audit: 1.16.0
  - bruteforcesettings: 2.6.0
  - comments: 1.16.0 (installed 1.16.0)
  - contactsinteraction: 1.7.0 (installed 1.7.0)
  - encryption: 2.14.0
  - federation: 1.16.0 (installed 1.16.0)
  - files_external: 1.18.0
  - recommendations: 1.5.0 (installed 1.5.0)
  - suspicious_login: 4.4.0
  - twofactor_totp: 8.0.0-alpha.0
  - user_ldap: 1.16.0
  - user_status: 1.6.0 (installed 1.6.0)
  - weather_status: 1.6.0 (installed 1.6.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

[webdav] Error: TypeError: 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 at <<closure>>

0. /var/www/html/apps/dav/lib/Upload/ChunkingV2Plugin.php line 263
   OCA\DAV\Upload\ChunkingV2Plugin->getUploadStorage(null)
1. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
   OCA\DAV\Upload\ChunkingV2Plugin->beforeDelete(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])
2. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 456
   Sabre\DAV\Server->emit("beforeMethod:DELETE", [["Sabre\\HTTP\\ ... ]])
3. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253
   Sabre\DAV\Server->invokeMethod(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])
4. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321
   Sabre\DAV\Server->start()
5. /var/www/html/apps/dav/lib/Server.php line 366
   Sabre\DAV\Server->exec()
6. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
   OCA\DAV\Server->exec()
7. /var/www/html/remote.php line 171
   require_once("/var/www/html/a ... p")

DELETE /remote.php/dav/uploads/fnaith/3925943308
from 36.225.143.72 by fnaith at 2023-04-04T16:48:25+00:00

Additional info

docker-compose.yml :

version: "3"
services:
  nextcloud:
    image: nextcloud:26.0.0-apache
    restart: always
    ports:
      - 9009:80
    volumes:
      - ./data:/var/www/html
    environment:
      - MYSQL_PASSWORD=a_pwd
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=a_user
      - MYSQL_HOST=a_db.com
MiguelNdeCarvalho commented 1 year ago

Hey @fnaith , what is the size of the files that you are trying to upload?

fnaith commented 1 year ago

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.

MiguelNdeCarvalho commented 1 year ago

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

MrDarkPat commented 1 year ago

Same thing happens to me with docker-compose mariadb container and nextcloud container. Cant upload files over the browser.

MiguelNdeCarvalho commented 1 year ago

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!

fnaith commented 1 year ago

Yay, and maybe more people can collect enough data for this issue.

joshtrichards commented 1 year ago

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.

fnaith commented 1 year ago

I set 5GB per user.

joshtrichards commented 1 year ago

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)?

fnaith commented 1 year ago

log : log

quota : 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
MrDarkPat commented 1 year ago

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"

fnaith commented 1 year ago

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 ?

MishoManolov commented 1 year ago

Whats the apoppriate setting for apache2 configurations? Seems like I am missing something.

vincentkenny01 commented 1 year ago

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?

fnaith commented 1 year ago

@vincentkenny01 maybe you can give more information to maintainer ?

vincentkenny01 commented 1 year ago

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"}

EchedelleLR commented 1 year ago

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.

vincentkenny01 commented 1 year ago

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: @.***>

EchedelleLR commented 1 year ago

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.

EchedelleLR commented 1 year ago

New information: Neither Nextcloud desktop app nor Android app have this issue. Just the web browser client.

LPDaVinci commented 1 year ago

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.

MrColumbo commented 1 year ago

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

hoekomnie commented 1 year ago

This issue still exists in 26.0.1.

adi-dev commented 1 year ago

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

EchedelleLR commented 1 year ago

In comparison with some other people here using Nginx as frontend (mostly reserve proxy), we both share the same issue @adi-dev.

EchedelleLR commented 1 year ago

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.

adi-dev commented 1 year ago

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.

Shenter commented 1 year ago

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

tanganellilore commented 1 year ago

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.

juanyunis commented 1 year ago

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.

xsolinsx commented 1 year ago

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

SebastienTolron commented 1 year ago

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

dportabella commented 1 year ago

is it possible to disable this buggy ChunkingV2Plugin plugin? how?

joshtrichards commented 1 year ago

@dportabella The fix is in v26.0.2 and v27.0.0. Are you able to run one of those releases?

dportabella commented 1 year ago

I confirm that updating to v27.0.0 solved the issue 🥳🙏