Closed
Description
symfony/http-client version: 5.2.4
symfony/messenger version: 5.2.4
symfony/amazon-sqs-messenger version: 5.2.4
Description
I'm receiving A chunk passthru must yield instances of "Symfony\Contracts\HttpClient\ChunkInterface", "null" yielded
error on Symfony messenger worker container, which handles messages from Amazon SQS queue:
Fatal error: Uncaught LogicException: A chunk passthru must yield instances of "Symfony\Contracts\HttpClient\ChunkInterface", "null" yielded. in /app/vendor/symfony/http-client/Response/AsyncResponse.php:349
Stack trace:
#0 /app/vendor/symfony/http-client/Response/AsyncResponse.php(320): Symfony\Component\HttpClient\Response\AsyncResponse::passthruStream(Object(Symfony\Component\HttpClient\Response\CurlResponse), Object(Symfony\Component\HttpClient\Response\AsyncResponse), NULL, Object(SplObjectStorage)) |
#1 /app/vendor/symfony/http-client/Response/AsyncResponse.php(275): Symfony\Component\HttpClient\Response\AsyncResponse::passthru(Object(Symfony\Component\HttpClient\CurlHttpClient), Object(Symfony\Component\HttpClient\Response\AsyncResponse), Object(Symfony\Component\HttpClient\Chunk\LastChunk), Object(SplObjectStorage)) |
#2 /app/vendor/symfony/http-client/Response/AsyncResponse.php(63): Symfony\Component\HttpClient\Response\AsyncResponse::stream(Array) |
#3 /app/vendor/symfony/http-client/Response/CommonResponseTrait.php(1 in /app/vendor/symfony/http-client/Response/AsyncResponse.php on line 349
Additional context
The AsyncResponse::passthru
(line 275) is getting Symfony\Component\HttpClient\Chunk\LastChunk
as third argument. Shouldn't this be denied by https://github.com/symfony/http-client/blob/5.x/Response/AsyncResponse.php#L309?