aws
aws copied to clipboard
TypeError on `getMessages()` if it isn't set to an array
PHP Fatal error: Uncaught TypeError: AsyncAws\Sqs\Result\ReceiveMessageResult::getMessages(): Return value must be of type array, null returned in /srv/app/vendor/async-aws/sqs/src/Result/ReceiveMessageResult.php:28
Thanks for reporting this issue. Reading the code, I don't understand how it is possible to get null, at this point of code.
Could you provide a reproducer? or debug and understand what happens?
I don't have a reproducter, but for more context, we are using https://github.com/symfony/amazon-sqs-messenger. We're not doing anything ourselves, this is happening through that library.
https://github.com/symfony/amazon-sqs-messenger/blob/6.1/Transport/Connection.php#L77 is where the problem starts in the stack trace.
Seems like it is related to https://github.com/async-aws/aws/issues/1412 since we see this error when the worker is stopped by the time limit.