Skip to content
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

Error in Consuming Queue using 2.0.6 #66

Closed
jaypee888 opened this issue May 20, 2019 · 9 comments
Closed

Error in Consuming Queue using 2.0.6 #66

jaypee888 opened this issue May 20, 2019 · 9 comments
Assignees

Comments

@jaypee888
Copy link

Hi,
After we update to 2.0.6 the consumer returns an error.

ErrorException : mb_strlen() expects parameter 1 to be string, array given

at /var/www/html/gameservice/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php:346
342| * @throws \PhpAmqpLib\Exception\AMQPInvalidArgumentException
343| */
344| public function write_shortstr($s)
345| {

346| $len = mb_strlen($s, 'ASCII');
347| if ($len > 255) {
348| throw new AMQPInvalidArgumentException('String too long');
349| }
350|

Exception trace:

1 mb_strlen([], "ASCII")
/var/www/html/gameservice/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php:346

2 PhpAmqpLib\Wire\AMQPWriter::write_shortstr([])
/var/www/html/gameservice/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol091.php:438
image_2019_05_20T05_05_35_820Z

This only happened when we update to 2.0.6, but once we rollback to 2.0.3 there's no problem.

@jaypee888 jaypee888 changed the title Error in Consume using 2.0.6 Error in Consuming Queue using 2.0.6 May 21, 2019
@stevenklar
Copy link
Collaborator

Hi. Can you try to pin the php-amqplib to an older version and identify if the issue is still there?

@jaypee888
Copy link
Author

We try to pin the older version and it works fine. The issue only happens when php-amqplib update to 2.0.6.

@stevenklar
Copy link
Collaborator

2.9.2 is the newest php-amqplib

@jaypee888
Copy link
Author

Sorry. I thought it was bschmitt/laravel-amqp. We pin php-amqplib to an older version 2.9.1 down to 2.7 but still we encounter an error. Only 2.0.3 is working.

@stevenklar
Copy link
Collaborator

Is any other version up to 2.0.6 working? Maybe the bug has been introdued with a change in our Context class. Can you please test 2.0.4 and 2.0.5 for me?

@TheKeymaster
Copy link

We are having the same issue. 2.0.5 seems to work, so the bug was probably introduced somewhere in 2.0.6.

@stevenklar
Copy link
Collaborator

Allright Thanks. I will have a look into the latest change and fix the issue soon.

@stevenklar stevenklar self-assigned this May 26, 2019
@stevenklar
Copy link
Collaborator

stevenklar commented May 27, 2019

Can you please check if 2.0.7 is working for you? @TheKeymaster @jaypee888

@jaypee888
Copy link
Author

Hi, 2.0.7 is working fine now. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants