Closed RispyCZ closed 1 month ago
Could we get the full stack trace, please? And which version of Laravel and Octane are you using?
Octane version: 2.5.2 Laravel version: 11.15.0 Raw stacktrace:
TypeError: Sentry\Tracing\SpanContext::setDescription(): Argument #1 ($description) must be of type ?string, Closure given, called in /app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingRoutingDispatcher.php on line 22
#59 /vendor/sentry/sentry/src/Tracing/SpanContext.php(80): Sentry\Tracing\SpanContext::setDescription
#58 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingRoutingDispatcher.php(22): Sentry\Laravel\Tracing\Routing\TracingRoutingDispatcher::wrapRouteDispatch
#57 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingCallableDispatcherTracing.php(20): Sentry\Laravel\Tracing\Routing\TracingCallableDispatcherTracing::dispatch
#56 /vendor/laravel/framework/src/Illuminate/Routing/Route.php(238): Illuminate\Routing\Route::runCallable
#55 /vendor/laravel/framework/src/Illuminate/Routing/Route.php(209): Illuminate\Routing\Route::run
#54 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(808): Illuminate\Routing\Router::Illuminate\Routing\{closure}
#53 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#52 /vendor/masmerise/livewire-toaster/src/SessionRelay.php(19): Masmerise\Toaster\SessionRelay::handle
#51 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#50 /vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Routing\Middleware\SubstituteBindings::handle
#49 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#48 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(88): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::handle
#47 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#46 /vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\View\Middleware\ShareErrorsFromSession::handle
#45 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#44 /vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Session\Middleware\StartSession::handleStatefulRequest
#43 /vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession::handle
#42 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#41 /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::handle
#40 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#39 /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(75): Illuminate\Cookie\Middleware\EncryptCookies::handle
#38 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#37 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline::then
#36 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\Routing\Router::runRouteWithinStack
#35 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\Routing\Router::runRoute
#34 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\Routing\Router::dispatchToRoute
#33 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\Routing\Router::dispatch
#32 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Foundation\Http\Kernel::Illuminate\Foundation\Http\{closure}
#31 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#30 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/FlushEventsMiddleware.php(13): Sentry\Laravel\Http\FlushEventsMiddleware::handle
#29 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#28 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Sentry\Laravel\Http\SetRequestIpMiddleware::handle
#27 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#26 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(31): Sentry\Laravel\Http\SetRequestMiddleware::handle
#25 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#24 /vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php(19): Livewire\Features\SupportDisablingBackButtonCache\DisableBackButtonCacheMiddleware::handle
#23 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#22 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Foundation\Http\Middleware\TransformsRequest::handle
#21 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::handle
#20 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#19 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Foundation\Http\Middleware\TransformsRequest::handle
#18 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\Foundation\Http\Middleware\TrimStrings::handle
#17 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#16 /vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\Http\Middleware\ValidatePostSize::handle
#15 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#14 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::handle
#13 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#12 /vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Http\Middleware\HandleCors::handle
#11 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#10 /vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(57): Illuminate\Http\Middleware\TrustProxies::handle
#9 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#8 /vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middleware.php(97): Sentry\Laravel\Tracing\Middleware::handle
#7 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
#6 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline::then
#5 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Foundation\Http\Kernel::sendRequestThroughRouter
#4 /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel::handle
#3 /vendor/laravel/octane/src/ApplicationGateway.php(36): Laravel\Octane\ApplicationGateway::handle
#2 /vendor/laravel/octane/src/Worker.php(84): Laravel\Octane\Worker::handle
#1 /vendor/laravel/octane/bin/roadrunner-worker(54): include
#0 /vendor/bin/roadrunner-worker(119): null
Can you share the route that is causing this?
I tried with the following (on a clean Laravel install with only Octane + Sentry):
Route::get('/', function () {
return view('welcome');
});
Route::get('/controller', [App\Http\Controllers\Controller::class, 'welcome']);
Route::view('view', 'welcome');
But no luck reproducing so far.
Using: RoadRunner server started; version: 2024.1.5, buildtime: 2024-06-20T19:10:34+0000.
Is this specific to Livewire?
Here is my web.php routes :) and on any route from / so I guess Volt::route() thing :)
<?php
use Illuminate\Support\Facades\Route;
use Livewire\Volt\Volt;
Volt::route('/', 'pages.home')->name('index');
Volt::route('/search', 'pages.search')->name('search');
Volt::route('/category/{slug}', 'pages.category')->name('category');
Volt::route('/place/{slug}', 'pages.details')->name('details');
Volt::route('/login', 'pages.auth.login')->name('login');
Volt::route('/register', 'pages.auth.register')->name('register');
Volt::route('/forgot-password', 'pages.auth.forgot-password')->name('forgot.password');
Volt::route("/password/reset/{token}", "pages.auth.reset-password")->name('password.reset');
Route::middleware("auth:web")->group(function () {
Volt::route("/verify-email/{id}/{hash}", "pages.auth.verify-email")->name('verification.verify');
Volt::route('/settings', 'pages.settings')->name('settings');
});
How do you use Sentry?
Sentry SaaS (sentry.io)
SDK version
4.7.0
Steps to reproduce
Convert my production site docker + Laravel Octane (Roadrunner)
Expected result
No exeptions
Actual result
StackTrace: Sentry\Tracing\SpanContext::setDescription(): Argument #1 ($description) must be of type ?string, Closure given, called in /app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingRoutingDispatcher.php on line 22