server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Can't delete folders on external storage (S3)

Open marcoklobas opened this issue 1 year ago • 17 comments

⚠️ This issue respects the following points: ⚠️

Bug description

After updating to Nextcloud Hub 25 Autumn (32.0.0) I can't delete any folder on AWS S3 external storage.

Files are deleted flawlessly. Local stored folders are deleted without issues as well.

I get a Delete folder: failed notification. I attach the specific error log below which mentions "400 Bad Request" and "Malformed XML".

Interestingly, if I replace the api-2.json.php file available in the 3rdparty/aws/aws-sdk-php/src/data/s3/2006-03-01 folder with the one coming from the previous version (31.0.9), then I can delete the folders successfully. I guessed this file is involved in the issue due to the ?delete string mentioned in the log.

Hope someone will check the differences between the old and new api-2.json.php files and figure out what is wrong and find a fix.

Any idea whether is it safe to keep the older working file for the time being?

Steps to reproduce

  1. Update to Nextcloud 32 version
  2. Attempt to delete a folder
  3. Observe the error message

Expected behavior

Folders should be removed on external storage after a delete command is invoked.

Nextcloud Server version

32

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 31 to 32)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • [x] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report


List of activated Apps


Nextcloud Signing status


Nextcloud Logs

Error executing "DeleteObjects" on "https://***REMOVED SENSITIVE VALUE***/?delete"; AWS HTTP error: Client error: `POST https://***REMOVED SENSITIVE VALUE***/?delete` resulted in a `400 Bad Request` response: <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our publis (truncated...) MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>***REMOVED SENSITIVE VALUE***</RequestId><HostId>***REMOVED SENSITIVE VALUE***</HostId></Error>

Additional info

No response

marcoklobas avatar Oct 02 '25 09:10 marcoklobas

Can you share the entire Nextcloud log entry?

What S3 platform/provider is this?

joshtrichards avatar Oct 02 '25 21:10 joshtrichards

I use AWS S3. No other changes have been made. The same configuration worked in the previous version.

The only error log I get is this:

Error executing "DeleteObjects" on "URL/?delete"; AWS HTTP error: Client error: POST URL/?deleteresulted in a400 Bad Request response: <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our publis (truncated...) MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>ID</RequestId><HostId>ID</HostId></Error>

I replaced "sensitive" values with URL and ID.

Thanks for chiming in.

marcoklobas avatar Oct 03 '25 06:10 marcoklobas

Getting the same thing right after update to the latest version for OVH S3

Error executing "DeleteObjects" on "https://marketing-do-obrobki.s3.waw.io.cloud.ovh.net/?delete"; AWS HTTP error: Client error: `POST https://marketing-do-obrobki.s3.waw.io.cloud.ovh.net/?delete` resulted in a `400 Bad Request` response: <?xml version='1.0' encoding='UTF-8'?> <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...) MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version='1.0' encoding='UTF-8'?> <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>tx11091945100842a893788-0068e23ad9</RequestId></Error>
Image

walec51 avatar Oct 05 '25 09:10 walec51

Interestingly, if I replace the api-2.json.php file available in the 3rdparty/aws/aws-sdk-php/src/data/s3/2006-03-01 folder with the one coming from the previous version (31.0.9), then I can delete the folders successfully. I guessed this file is involved in the issue due to the ?delete string mentioned in the log.

I can confirm this worked

replaced

api-2.json-new.php

with

api-2.json.php

and this started working

walec51 avatar Oct 16 '25 11:10 walec51

I am also unable to delete folders, but I get a slightly different error code. I also tried replacing the API file, but that did not work.

[files_external] Fehler: Error executing "DeleteObjects" on "https://s3.hidrive.strato.com/bucketname?delete"; AWS HTTP error: Client error: `POST https://s3.hidrive.strato.com/bucketname?delete` resulted in a `400 Bad Request` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>MissingContentMD5</Code><Message>Missing required header for this re (truncated...)
 MissingContentMD5 (client): Missing required header for this request: Content-Md5. - <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>MissingContentMD5</Code><Message>Missing required header for this request: Content-Md5.</Message><Key>/bucketname</Key><RequestId>only an id</RequestId></Error>
	DELETE /remote.php/dav/files/admin/randompath
	

Kiter1988 avatar Nov 05 '25 10:11 Kiter1988

The same thing happens to me after updating from 31.0.5 to 32.0.1 :

Error executing "DeleteObjects" on "URL/?delete"; AWS HTTP error: Client error: POST URL/?deleteresulted in a400 Bad Request response: MalformedXMLThe XML you provided was not well-formed or did not validate against our publis (truncated...) MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - MalformedXMLThe XML you provided was not well-formed or did not validate against our published schemaIDID

manuelaznar avatar Nov 10 '25 05:11 manuelaznar

Interestingly, if I replace the api-2.json.php file available in the 3rdparty/aws/aws-sdk-php/src/data/s3/2006-03-01 folder with the one coming from the previous version (31.0.9), then I can delete the folders successfully. I guessed this file is involved in the issue due to the ?delete string mentioned in the log.

I can confirm this worked

replaced

api-2.json-new.php

with

api-2.json.php

and this started working

It works, but the UI still shows the error message, and you need to refresh to see that the folder has actually been deleted.

manuelaznar avatar Nov 10 '25 07:11 manuelaznar

Interesting.

In my case, using the "trick" of the old api-2.json.php version, I don't get any error alerts and the deleted folder disappears without the need to refresh the page.

marcoklobas avatar Nov 10 '25 09:11 marcoklobas

This fix rolled out with 32.0.3, right? I'm still experiencing the problem on 32.0.3 when using an S3-compatible external storage hosted at OVH:

[files_external] Error: Error executing "DeleteObjects" on "https://s3.us-east-va.io.cloud.ovh.us/[bucket name]?delete"; AWS HTTP error: Client error: `POST https://s3.us-east-va.io.cloud.ovh.us/[bucket name]?delete` resulted in a `400 Bad Request` response:
<?xml version='1.0' encoding='UTF-8'?>
<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...)
 MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version='1.0' encoding='UTF-8'?>
<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>tx0447bf87823c4d3f9a474-00695f48ae</RequestId></Error>
	DELETE /remote.php/dav/files/[username]/Encrypted/home/New%20folder
	from [ip address] by [username] at Jan 8, 2026, 1:03:26 AM

hendricksond avatar Jan 08 '26 06:01 hendricksond

Similarly to @hendricksond , the issue is not fixed in version 32.0.5 - it did not get fixed in previous version either.

  • My S3 storage is also OVH.
  • Encryption: disabled
  • Operating system: Debian/Ubuntu
  • PHP engine version: PHP 8.3
  • Web server: Apache
  • Database engine version: MySQL 8.0
Folded full log line
{
  "reqId": "VqIQZu0luciNhN5gX8c6",
  "level": 3,
  "time": "2026-01-20T21:58:42+00:00",
  "remoteAddr": "...",
  "user": "<user>",
  "app": "files_external",
  "method": "DELETE",
  "url": "/remote.php/dav/files/<user>/[...]/delete%20me%2001",
  "scriptName": "/remote.php",
  "message": "Error executing \"DeleteObjects\" on \"https://....s3.sbg.io.cloud.ovh.net/?delete\"; AWS HTTP error: Client error: `POST https://....s3.sbg.io.cloud.ovh.net/?delete` resulted in a `400 Bad Request` response:\n<?xml version='1.0' encoding='UTF-8'?>\n<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...)\n MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version='1.0' encoding='UTF-8'?>\n<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>txb8e5edccca364cf3b54ac-00696ffa92</RequestId></Error>",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0",
  "version": "32.0.5.0",
  "exception": {
    "Exception": "Aws\\S3\\Exception\\S3Exception",
    "Message": "Error executing \"DeleteObjects\" on \"https://....s3.sbg.io.cloud.ovh.net/?delete\"; AWS HTTP error: Client error: `POST https://....s3.sbg.io.cloud.ovh.net/?delete` resulted in a `400 Bad Request` response:\n<?xml version='1.0' encoding='UTF-8'?>\n<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...)\n MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version='1.0' encoding='UTF-8'?>\n<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>txb8e5edccca364cf3b54ac-00696ffa92</RequestId></Error>",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/3rdparty/aws/aws-sdk-php/src/WrappedHttpHandler.php",
        "line": 97,
        "function": "parseError",
        "class": "Aws\\WrappedHttpHandler",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 209,
        "function": "{closure:Aws\\WrappedHttpHandler::__invoke():95}",
        "class": "Aws\\WrappedHttpHandler",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 174,
        "function": "callHandler",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/RejectedPromise.php",
        "line": 49,
        "function": "{closure:GuzzleHttp\\Promise\\Promise::settle():172}",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/TaskQueue.php",
        "line": 52,
        "function": "{closure:GuzzleHttp\\Promise\\RejectedPromise::then():45}",
        "class": "GuzzleHttp\\Promise\\RejectedPromise",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php",
        "line": 167,
        "function": "run",
        "class": "GuzzleHttp\\Promise\\TaskQueue",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php",
        "line": 206,
        "function": "tick",
        "class": "GuzzleHttp\\Handler\\CurlMultiHandler",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 251,
        "function": "execute",
        "class": "GuzzleHttp\\Handler\\CurlMultiHandler",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 227,
        "function": "invokeWaitFn",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 272,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 229,
        "function": "invokeWaitList",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 272,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 229,
        "function": "invokeWaitList",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 69,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/aws/aws-sdk-php/src/AwsClientTrait.php",
        "line": 58,
        "function": "wait",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/aws/aws-sdk-php/src/AwsClientTrait.php",
        "line": 86,
        "function": "execute",
        "class": "Aws\\AwsClient",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/files_external/lib/Lib/Storage/AmazonS3.php",
        "line": 269,
        "function": "__call",
        "class": "Aws\\AwsClient",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/files_external/lib/Lib/Storage/AmazonS3.php",
        "line": 244,
        "function": "batchDelete",
        "class": "OCA\\Files_External\\Lib\\Storage\\AmazonS3",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php",
        "line": 63,
        "function": "rmdir",
        "class": "OCA\\Files_External\\Lib\\Storage\\AmazonS3",
        "type": "->"
      },
      {
        "function": "rmdir",
        "class": "OC\\Files\\Storage\\Wrapper\\Wrapper",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php",
        "line": 83,
        "function": "call_user_func_array"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php",
        "line": 95,
        "function": "handleAvailability",
        "class": "OC\\Files\\Storage\\Wrapper\\Availability",
        "type": "->"
      },
      {
        "function": "rmdir",
        "class": "OC\\Files\\Storage\\Wrapper\\Availability",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/files_trashbin/lib/Storage.php",
        "line": 145,
        "function": "call_user_func"
      },
      {
        "file": "/var/www/nextcloud/apps/files_trashbin/lib/Storage.php",
        "line": 65,
        "function": "doDelete",
        "class": "OCA\\Files_Trashbin\\Storage",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 1212,
        "function": "rmdir",
        "class": "OCA\\Files_Trashbin\\Storage",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 297,
        "function": "basicOperation",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php",
        "line": 298,
        "function": "rmdir",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 197,
        "function": "delete",
        "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 281,
        "function": "delete",
        "class": "Sabre\\DAV\\Tree",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpDelete",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php",
        "line": 211,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Server.php",
        "line": 424,
        "function": "start",
        "class": "OCA\\DAV\\Connector\\Sabre\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
        "line": 22,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/remote.php",
        "line": 151,
        "args": [
          "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/nextcloud/3rdparty/aws/aws-sdk-php/src/WrappedHttpHandler.php",
    "Line": 196,
    "Previous": {
      "Exception": "GuzzleHttp\\Exception\\ClientException",
      "Message": "Client error: `POST https://....s3.sbg.io.cloud.ovh.net/?delete` resulted in a `400 Bad Request` response:\n<?xml version='1.0' encoding='UTF-8'?>\n<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...)\n",
      "Code": 400,
      "Trace": [
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
          "line": 72,
          "function": "create",
          "class": "GuzzleHttp\\Exception\\RequestException",
          "type": "::",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 209,
          "function": "{closure:{closure:{closure:GuzzleHttp\\Middleware::httpErrors():60}:61}:67}",
          "class": "GuzzleHttp\\Middleware",
          "type": "::",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 158,
          "function": "callHandler",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "::"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/TaskQueue.php",
          "line": 52,
          "function": "{closure:GuzzleHttp\\Promise\\Promise::settle():156}",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "::",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php",
          "line": 167,
          "function": "run",
          "class": "GuzzleHttp\\Promise\\TaskQueue",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php",
          "line": 206,
          "function": "tick",
          "class": "GuzzleHttp\\Handler\\CurlMultiHandler",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 251,
          "function": "execute",
          "class": "GuzzleHttp\\Handler\\CurlMultiHandler",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 227,
          "function": "invokeWaitFn",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 272,
          "function": "waitIfPending",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 229,
          "function": "invokeWaitList",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 272,
          "function": "waitIfPending",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 229,
          "function": "invokeWaitList",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 69,
          "function": "waitIfPending",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/aws/aws-sdk-php/src/AwsClientTrait.php",
          "line": 58,
          "function": "wait",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/aws/aws-sdk-php/src/AwsClientTrait.php",
          "line": 86,
          "function": "execute",
          "class": "Aws\\AwsClient",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/files_external/lib/Lib/Storage/AmazonS3.php",
          "line": 269,
          "function": "__call",
          "class": "Aws\\AwsClient",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/files_external/lib/Lib/Storage/AmazonS3.php",
          "line": 244,
          "function": "batchDelete",
          "class": "OCA\\Files_External\\Lib\\Storage\\AmazonS3",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php",
          "line": 63,
          "function": "rmdir",
          "class": "OCA\\Files_External\\Lib\\Storage\\AmazonS3",
          "type": "->"
        },
        {
          "function": "rmdir",
          "class": "OC\\Files\\Storage\\Wrapper\\Wrapper",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php",
          "line": 83,
          "function": "call_user_func_array"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php",
          "line": 95,
          "function": "handleAvailability",
          "class": "OC\\Files\\Storage\\Wrapper\\Availability",
          "type": "->"
        },
        {
          "function": "rmdir",
          "class": "OC\\Files\\Storage\\Wrapper\\Availability",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/files_trashbin/lib/Storage.php",
          "line": 145,
          "function": "call_user_func"
        },
        {
          "file": "/var/www/nextcloud/apps/files_trashbin/lib/Storage.php",
          "line": 65,
          "function": "doDelete",
          "class": "OCA\\Files_Trashbin\\Storage",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Files/View.php",
          "line": 1212,
          "function": "rmdir",
          "class": "OCA\\Files_Trashbin\\Storage",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Files/View.php",
          "line": 297,
          "function": "basicOperation",
          "class": "OC\\Files\\View",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php",
          "line": 298,
          "function": "rmdir",
          "class": "OC\\Files\\View",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
          "line": 197,
          "function": "delete",
          "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
          "line": 281,
          "function": "delete",
          "class": "Sabre\\DAV\\Tree",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
          "line": 89,
          "function": "httpDelete",
          "class": "Sabre\\DAV\\CorePlugin",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 472,
          "function": "emit",
          "class": "Sabre\\DAV\\Server",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php",
          "line": 211,
          "function": "invokeMethod",
          "class": "Sabre\\DAV\\Server",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/dav/lib/Server.php",
          "line": 424,
          "function": "start",
          "class": "OCA\\DAV\\Connector\\Sabre\\Server",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
          "line": 22,
          "function": "exec",
          "class": "OCA\\DAV\\Server",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/remote.php",
          "line": 151,
          "args": [
            "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php",
      "Line": 111
    },
    "message": "Error executing \"DeleteObjects\" on \"https://....s3.sbg.io.cloud.ovh.net/?delete\"; AWS HTTP error: Client error: `POST https://....s3.sbg.io.cloud.ovh.net/?delete` resulted in a `400 Bad Request` response:\n<?xml version='1.0' encoding='UTF-8'?>\n<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...)\n MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version='1.0' encoding='UTF-8'?>\n<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>txb8e5edccca364cf3b54ac-00696ffa92</RequestId></Error>",
    "exception": {},
    "CustomMessage": "Error executing \"DeleteObjects\" on \"https://....s3.sbg.io.cloud.ovh.net/?delete\"; AWS HTTP error: Client error: `POST https://....s3.sbg.io.cloud.ovh.net/?delete` resulted in a `400 Bad Request` response:\n<?xml version='1.0' encoding='UTF-8'?>\n<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...)\n MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version='1.0' encoding='UTF-8'?>\n<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>txb8e5edccca364cf3b54ac-00696ffa92</RequestId></Error>"
  }
}

NicolasToussaint avatar Jan 20 '26 22:01 NicolasToussaint

Hi..any update for this problem?I just upgrade to 32.0.5 but still having the same problem:

"Error executing "DeleteObjects" on "https://xxxxxxxx/yyyyyyyy?delete"; AWS HTTP error: Client error: POST https://xxxxxxxx/yyyyyyyy?delete resulted in a 400 Bad Request response: MalformedXMLThe XML you provided was not well-formed (truncated...) MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema. - MalformedXMLThe XML you provided was not well-formed or did not validate against our published schema./xxxxxxx?delete1769506793999637". Tried to replace api-2.json.php with older version,but in my case i still have the error. This is my NC instance:

S3 storage is Minio (not set as primary)
Encryption: disabled
Operating system: Red Hat Enterprise Linux 8.10 (Ootpa)
PHP engine version: PHP 8.3.19
Web server: Apache 2.4.37
Database engine version: Mariadb 10.11

towanda1870 avatar Jan 27 '26 10:01 towanda1870

Open poster here.

For me the issue has been fixed with 32.0.3. Both the server and the S3 storage are on AWS in my case.

Web Server: Apache 2.4.66 PHP: 8.3.30 Database: MySQL 8.0.44

marcoklobas avatar Jan 27 '26 11:01 marcoklobas

The issue is still present for me in 32.0.6. I can not delete nor rename folders from S3 external storage (S3 from OVH, not encrypted).

Error executing "DeleteObjects" on "https://xxxxxxxxxxxxxxxxxx/?delete"; AWS HTTP error: Client error: POST https://xxxxxxxxxxxxxxxxxx/?delete resulted in a 400 Bad Request response: MalformedXMLThe XML you provided was not well-formed (truncated...) MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - MalformedXMLThe XML you provided was not well-formed or did not validate against our published schematx71935a497a034619a0045-0069b00f98

Could you please reopen the issue ?

majneb avatar Mar 10 '26 12:03 majneb

I have still the same error with 32.0.6

moritz76 avatar Mar 17 '26 08:03 moritz76

I have still the same error with 32.0.6

Then it's a different underlying cause. However, we have made an additional change that will be in the next maintenance releases of 33+32: #58582

This should further increase third-party compatibility.

joshtrichards avatar Mar 17 '26 18:03 joshtrichards

I have still the same error with 32.0.6

Then it's a different underlying cause. However, we have made an additional change that will be in the next maintenance releases of 33+32: #58582

This should further increase third-party compatibility.

I just upgraded to 33.0.16, and manually applied https://github.com/nextcloud/server/pull/58582 and it did resolve the issue for me.
Thanks !

NicolasToussaint avatar Mar 19 '26 21:03 NicolasToussaint

This issue has been automatically locked because it has been closed for more than 14 days. As we do not monitor closed issues, we are locking this issue to prevent further comments from getting lost in the noise. Please open a new issue if you have a similar problem instead. For general discussions, please use our forum: https://help.nextcloud.com

github-actions[bot] avatar Nov 12 '26 00:11 github-actions[bot]