-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aws SQS: VisibilityTimeout value is zero and type is string instead integer #2893
Comments
I did several tests with different versions of aws-sdk-php and discovered that the bug appears from version 3.285.1. Before this version (for example in 3.285.0) the bug does not occur. |
Hi @nepos87, Sorry to hear about the issues. Could you point me to the exact location of the Recently, SQS migrated their protocol from The middleware emitting the warning you're seeing actually casts any incorrectly typed values it finds— the intent was to avoid breaking customers who were unintentionally sending strings for params modeled as ints or any other permutation of incorrectly typed scalar values. |
Hi @stobrien89, Thanks for the explanation. |
Hi @nepos87, Thanks for the clarification. The fix would need to come from the laravel side, since it appears they're sending an incorrect type. Alternatively, you could pin your SDK version to |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
Using Laravel 5.5 and processing a job with AWS Sqs, only if I have an error during processing, the queue returns the following error message:
ErrorException: The provided type for
VisibilityTimeout
value wasstring
. The modeled type isinteger
. in C:\Users\Win\public_html\project\vendor\aws\aws-sdk-php\src\QueryCompatibleInputMiddleware.php:173In particular, within the Laravel SqsJob.php file, in the following function, the variable $delay is equal to 0 (i.e. it arrives with a value of zero and does not take the default one in brackets) but with a string data type instead of an integer:
But within the aws control panel the queue is set to the default value of 30 seconds in Visibility Timeout. Despite this, the $delay parameter in function arrives with a value of zero and in string format instead of integer.
Expected Behavior
The value of $delay must be 30 seconds and of type integer
Current Behavior
The value of $delay has a value of zero and of type string
Reproduction Steps
When a job fails
Possible Solution
Additional Information/Context
No response
SDK version used
aws-sdk-php: 3.300.11
aws-sdk-php-laravel: 3.8.1
Environment details (Version of PHP (
php -v
)? OS name and version, etc.)PHP 7.4 - Laravel 5.5
The text was updated successfully, but these errors were encountered: