aws icon indicating copy to clipboard operation
aws copied to clipboard

TypeError on `getMessages()` if it isn't set to an array

Open nesl247 opened this issue 2 years ago • 3 comments

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

nesl247 avatar Aug 03 '22 16:08 nesl247

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?

jderusse avatar Aug 03 '22 20:08 jderusse

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.

nesl247 avatar Aug 04 '22 15:08 nesl247

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.

juniorb2ss avatar Jun 19 '23 13:06 juniorb2ss