exception 'Aws\S3\Exception\S3Exception' with message 'Error parsing response for PutObject: AWS parsing error: Error parsing XML: String could not be parsed as XML' #2293
Labels
closed-for-staleness
guidance
Question that needs advice or information.
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
PHP version 7.4.3
AWS S3 version 3.190.2 - 2021-08-13
code :
There was an error uploading the file.
exception 'Aws\S3\Exception\S3Exception' with message 'Error parsing response for PutObject: AWS parsing error: Error parsing XML: String could not be parsed as XML'
Exception: String could not be parsed as XML in E:\app\test\testaws\vendor\aws\aws-sdk-php\src\Api\Parser\PayloadParserTrait.php:44
Stack trace:
#0 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\Api\Parser\PayloadParserTrait.php(44): SimpleXMLElement->__construct('<!doctype html>...')
#1 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\Api\Parser\RestXmlParser.php(39): Aws\Api\Parser\RestXmlParser->parseXml(Object(GuzzleHttp\Psr7\Stream), Object(GuzzleHttp\Psr7\Response))
#2 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\Api\Parser\RestXmlParser.php(31): Aws\Api\Parser\RestXmlParser->parseMemberFromStream(Object(GuzzleHttp\Psr7\Stream), Object(Aws\Api\StructureShape), Object(GuzzleHttp\Psr7\Response))
#3 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\Api\Parser\AbstractRestParser.php(63): Aws\Api\Parser\RestXmlParser->payload(Object(GuzzleHttp\Psr7\Response), Object(Aws\Api\StructureShape), Array)
#4 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\S3\RetryableMalformedResponseParser.php(37): Aws\Api\Parser\AbstractRestParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#5 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\S3\AmbiguousSuccessParser.php(69): Aws\S3\RetryableMalformedResponseParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#6 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\S3\GetBucketLocationParser.php(29): Aws\S3\AmbiguousSuccessParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#7 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\WrappedHttpHandler.php(125): Aws\S3\GetBucketLocationParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#8 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\WrappedHttpHandler.php(92): Aws\WrappedHttpHandler->parseResponse(Object(Aws\Command), Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response), Array)
#9 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(204): Aws\WrappedHttpHandler->Aws{closure}(Object(GuzzleHttp\Psr7\Response))
#10 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#11 E:\app\test\testaws\vendor\guzzlehttp\promises\src\TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}()
#12 E:\app\test\testaws\vendor\guzzlehttp\guzzle\src\Handler\CurlMultiHandler.php(158): GuzzleHttp\Promise\TaskQueue->run()
#13 E:\app\test\testaws\vendor\guzzlehttp\guzzle\src\Handler\CurlMultiHandler.php(183): GuzzleHttp\Handler\CurlMultiHandler->tick()
#14 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(248): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
#15 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#16 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#17 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#18 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#19 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#20 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#21 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\AwsClientTrait.php(58): GuzzleHttp\Promise\Promise->wait()
#22 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\AwsClientTrait.php(86): Aws\AwsClient->execute(Object(Aws\Command))
#23 E:\app\test\testaws\index.php(31): Aws\AwsClient->__call('putObject', Array)
#24 {main}
Next Aws\Api\Parser\Exception\ParserException: Error parsing XML: String could not be parsed as XML in E:\app\test\testaws\vendor\aws\aws-sdk-php\src\Api\Parser\PayloadParserTrait.php:49
Stack trace:
#0 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\Api\Parser\RestXmlParser.php(39): Aws\Api\Parser\RestXmlParser->parseXml(Object(GuzzleHttp\Psr7\Stream), Object(GuzzleHttp\Psr7\Response))
#1 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\Api\Parser\RestXmlParser.php(31): Aws\Api\Parser\RestXmlParser->parseMemberFromStream(Object(GuzzleHttp\Psr7\Stream), Object(Aws\Api\StructureShape), Object(GuzzleHttp\Psr7\Response))
#2 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\Api\Parser\AbstractRestParser.php(63): Aws\Api\Parser\RestXmlParser->payload(Object(GuzzleHttp\Psr7\Response), Object(Aws\Api\StructureShape), Array)
#3 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\S3\RetryableMalformedResponseParser.php(37): Aws\Api\Parser\AbstractRestParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#4 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\S3\AmbiguousSuccessParser.php(69): Aws\S3\RetryableMalformedResponseParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#5 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\S3\GetBucketLocationParser.php(29): Aws\S3\AmbiguousSuccessParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#6 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\WrappedHttpHandler.php(125): Aws\S3\GetBucketLocationParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#7 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\WrappedHttpHandler.php(92): Aws\WrappedHttpHandler->parseResponse(Object(Aws\Command), Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response), Array)
#8 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(204): Aws\WrappedHttpHandler->Aws{closure}(Object(GuzzleHttp\Psr7\Response))
#9 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#10 E:\app\test\testaws\vendor\guzzlehttp\promises\src\TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}()
#11 E:\app\test\testaws\vendor\guzzlehttp\guzzle\src\Handler\CurlMultiHandler.php(158): GuzzleHttp\Promise\TaskQueue->run()
#12 E:\app\test\testaws\vendor\guzzlehttp\guzzle\src\Handler\CurlMultiHandler.php(183): GuzzleHttp\Handler\CurlMultiHandler->tick()
#13 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(248): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
#14 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#15 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#16 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#17 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#18 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#19 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#20 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\AwsClientTrait.php(58): GuzzleHttp\Promise\Promise->wait()
#21 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\AwsClientTrait.php(86): Aws\AwsClient->execute(Object(Aws\Command))
#22 E:\app\test\testaws\index.php(31): Aws\AwsClient->__call('putObject', Array)
#23 {main}
Next Aws\S3\Exception\S3Exception: Error parsing response for PutObject: AWS parsing error: Error parsing XML: String could not be parsed as XML in E:\app\test\testaws\vendor\aws\aws-sdk-php\src\S3\RetryableMalformedResponseParser.php:39
Stack trace:
#0 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\S3\AmbiguousSuccessParser.php(69): Aws\S3\RetryableMalformedResponseParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#1 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\S3\GetBucketLocationParser.php(29): Aws\S3\AmbiguousSuccessParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#2 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\WrappedHttpHandler.php(125): Aws\S3\GetBucketLocationParser->__invoke(Object(Aws\Command), Object(GuzzleHttp\Psr7\Response))
#3 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\WrappedHttpHandler.php(92): Aws\WrappedHttpHandler->parseResponse(Object(Aws\Command), Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response), Array)
#4 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(204): Aws\WrappedHttpHandler->Aws{closure}(Object(GuzzleHttp\Psr7\Response))
#5 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#6 E:\app\test\testaws\vendor\guzzlehttp\promises\src\TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}()
#7 E:\app\test\testaws\vendor\guzzlehttp\guzzle\src\Handler\CurlMultiHandler.php(158): GuzzleHttp\Promise\TaskQueue->run()
#8 E:\app\test\testaws\vendor\guzzlehttp\guzzle\src\Handler\CurlMultiHandler.php(183): GuzzleHttp\Handler\CurlMultiHandler->tick()
#9 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(248): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
#10 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#11 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#12 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#13 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#14 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#15 E:\app\test\testaws\vendor\guzzlehttp\promises\src\Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#16 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\AwsClientTrait.php(58): GuzzleHttp\Promise\Promise->wait()
#17 E:\app\test\testaws\vendor\aws\aws-sdk-php\src\AwsClientTrait.php(86): Aws\AwsClient->execute(Object(Aws\Command))
#18 E:\app\test\testaws\index.php(31): Aws\AwsClient->__call('putObject', Array)
Help me thanks
The text was updated successfully, but these errors were encountered: