Skip to content

Instance of "Symfony\Component\HttpClient\Response\CurlResponse" is already consumed and cannot be managed by "Symfony\Component\HttpClient\RetryableHttpClient". A decorated client should not call any of the response's methods in its "request()" method.Β #1709

@victor-upmeet

Description

@victor-upmeet

Hi,

When using symfony/messenger with symfony/amazon-sqs-messenger, every once in a while we get the following error:

Instance of "Symfony\Component\HttpClient\Response\CurlResponse" is already consumed and cannot be managed by "Symfony\Component\HttpClient\RetryableHttpClient". A decorated client should not call any of the response's methods in its "request()" method.
Stack Trace:
#0 /var/www/vendor/symfony/http-client/Response/AsyncResponse.php:286
#1 /var/www/vendor/symfony/http-client/Response/ResponseStream.php:47
#2 /var/www/vendor/async-aws/core/src/Response.php:149
#3 /var/www/vendor/async-aws/core/src/Result.php:69
#4 /var/www/vendor/symfony/amazon-sqs-messenger/Transport/Connection.php:234
#5 /var/www/vendor/symfony/amazon-sqs-messenger/Transport/Connection.php:374
#6 /var/www/vendor/symfony/amazon-sqs-messenger/Transport/Connection.php:80

As stacktrace shows, all this is triggered when resetting the connection, but it looks like the issue lies in how the response is resolved by async-aws/core.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions