-
-
Notifications
You must be signed in to change notification settings - Fork 189
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: Object of type Sentry\State\Hub is not callable #670
Comments
Why are you adding a middleware called "sentry" to your routes? We don't have any middleware you can use so you are currently trying to use the Sentry SDK as a middleware which results in that error. Remove the Sentry middleware and you should be good 👍 |
No way huh? LOL if so. I just migrated a lumen project to laravel and it was using 'sentry' as middleware. I'm going to go test it right now and report back. |
@stayallive - Thanks! That worked :) Closing. Cheers |
That might have been a custom middleware? We register our SDK as "sentry" in the Laravel container explaining the error you are getting so maybe you missed a middleware alias or our SDK registration is shadowing it, but the SDK doesn't require you adding any middleware anywhere. Checkout the getting started guide for the full story: https://docs.sentry.io/platforms/php/guides/laravel/. |
There wasn't a middleware registered as sentry, this would have been using version 2.x perhaps you did advertise a middleware for lumen at one point? If not I don't know 🤷♂️ |
Environment
WSL2 Ubuntu 22.04 - Docker Container - php8.1 docker image
PHP-FPM
What version are you running? Etc.
Sentry-Laravel 3.3.2
Laravel 9
Steps to Reproduce
Expected Result
No error (and with just the 'auth' middleware configured there isn't)
Actual Result
The text was updated successfully, but these errors were encountered: