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

Issue with Laravel Google Cloud Tasks Queue Plugin at App Engine(ErrorException: Uninitialized string offset 0) #167

Open
gbretas opened this issue Jan 7, 2025 · 2 comments

Comments

@gbretas
Copy link

gbretas commented Jan 7, 2025

Hello,

I am currently using the laravel-google-cloud-tasks-queue plugin in my Laravel application deployed on Google App Engine. I encountered an intermittent issue starting after January 30th, with version 4.2.2 of the plugin.

The error is as follows:

php
Copiar código
ErrorException: Uninitialized string offset 0
The error occurs occasionally after the code has been running for a short period. I couldn’t reproduce it consistently, but I captured the logs through Sentry. The problem appears to originate from the following section in CloudTasksQueue.php at line 234:

        } else {
            $httpRequest = new HttpRequest;
            $httpRequest->setUrl($this->getHandler($job));
            $httpRequest->setBody(json_encode($payload));
            $httpRequest->setHttpMethod(HttpMethod::POST);
            $httpRequest->setHeaders($headers);

It seems related to the initialization of the $httpRequest

Environment Details:
PHP Version: 8.2
Composer Version: 2.2.1 (set using GOOGLE_COMPOSER_VERSION)
Environment: Google App Engine
For now, I’ve reverted to version 4.1.1 of the plugin to see if the issue persists.

If you need further information or logs to help debug this, let me know, and I’ll provide them.

Print from sentry:

CleanShot 2025-01-07 at 07 21 23@2x
CleanShot 2025-01-07 at 07 21 50@2x

Thank you for your time and support!

Best regards,
Gustavo Bretas

@marickvantuil
Copy link
Member

That's strange! Did the version revert do anything? Are there other packages installed that do something with autoloading classes?

@gbretas
Copy link
Author

gbretas commented Jan 11, 2025 via email

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

2 participants