-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Argument #1 ($date) must be of type Carbon\Carbon, Illuminate\Support\Carbon given #51360
Comments
My carbon package gets updated to v3 and because of that, I am seeing this error in my Laravel telescope. Since according to the trace log above the code that executed is all on the Laravel vendor directory I think this bug is related to Laravel compatibility with Carbon 3 |
Can you share the contain of |
@crynobone
Here is the
|
@ariaieboy we'll need a clear way to reproduce this one otherwise it's gonna be a wild goose chase for us. |
It's an edge-case scenario cause I can't reproduce this error on my local machine and that's weird. I use docker in my production and local environment, and these 2 are almost identical. I've even reproduced the same workload on my local machine by replying my jobs from production on local but I couldn't reproduce this error. The only thing that I have is 2 jobs that fail exactly when the The Telescope job fail after calling |
@ariaieboy gotcha. In that case I'm afraid there's not much we can do. We only have one report for this so far. I'm sorry you're affected by this but unless we have a way to reproduce this we can't investigate. Afaik from looking at the internal code all looks good. If you ever have a clear way to reproduce this we'd be happy to have a second look. |
Hello, reading this error:
Since This error message tends to say that an object having the class name |
@kylekatarnls thanks for your response. I couldn't reproduce this bug in my local environment. I had a new issue with swoole and Laravel Octane recently and because of that I switched from an Alpine-based image to an Ubuntu-based docker image and since then both of my problems have gone away. I think there must be an issue in the Alpine variants of PHP or one of the ext. because I rebuilt one of my release tags images and pushed it to production while the same codebase would work perfectly with the old image the new image had some issues including this one. Since the Ubuntu image does not have any problem I think the alpine/php/ext must have some bug in the latest builds. I've spent lots of time on these bugs but I just gave up completely and just switched to Ubuntu for now. |
I started seeing these as of yesterday, as Horizon processes outgoing emails. The two things that happened yesterday morning were #1 - this set of composer updates:
#2 - I switched to more aggressive opcache settings, including enabling jit. I just backed off #2 and will see if that stops these error reports. Looking at the application code involved, it has been stable for a long time, but I do notice one of the classes has Carbon imported as Carbon\Carbon vs. Illuminate\Support\Carbon. That hasn't mattered for years, or since initially updating to Laravel 11 / Carbon 3 about 4 weeks ago, but maybe it's a factor now for some reason? |
Just realized my specific error is slightly different: |
Laravel Version
11.7.0
PHP Version
8.3
Database Driver & Version
No response
Description
After upgrading to laravel 11.7.0 from 11.5.0 I am getting this error in some places:
Carbon\Carbon::rawAddUnit(): Argument #1 ($date) must be of type Carbon\Carbon, Illuminate\Support\Carbon given, called in /var/www/html/vendor/nesbot/carbon/src/Carbon/Traits/Units.php on line 356
Steps To Reproduce
here is the stack trace about this error that happens on the
ProcessPendingUpdates
job of telescope package.The text was updated successfully, but these errors were encountered: