Version ie <v5.10.30>
Environment
I would really appreciate some help with this please.
I am running the latest version from the official docker compose with caddy as a reverse proxy.
From what I can see this is the relevant error in the laravel.log
I have attached the full log below.
ERROR: Call to a member function auth()
Describe the bug
When attempting a health check on the Paypal Express Gateway I get 500: Internal Server Error. In the logs I can see the payments stopped being auto marked as paid about 2 months ago. All other site features seem to work fine. I have recreated the API keys and still get the same behaviour.
I have also tested this on the demo site and also get server error.
Logs
ninja-app logs
172.18.0.59 - 31/Oct/2024:19:29:01 +0000 "POST /index.php" 500
laravel.log
[2024-10-31 19:29:01] production.ERROR: Call to a member function auth() on bool
{"userId":1,"exception":"[object] (Error(code: 0): Call to a member function au
th() on bool at /var/www/app/app/Http/Controllers/CompanyGatewayController.php:5
87)
[stacktrace]
#0 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(5
4): App\\Http\\Controllers\\CompanyGatewayController->test(Object(App\\Http\\Req
uests\\CompanyGateway\\TestCompanyGatewayRequest), Object(App\\Models\\CompanyGa
teway))
#1 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispat
cher.php(43): Illuminate\\Routing\\Controller->callAction('test', Array)
#2 /var/www/app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/
TracingControllerDispatcherTracing.php(21): Illuminate\\Routing\\ControllerDispa
tcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controller
s\\CompanyGatewayController), 'test')
#3 /var/www/app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/
TracingRoutingDispatcher.php(18): Sentry\\Laravel\\Tracing\\Routing\\TracingCont
rollerDispatcherTracing->Sentry\\Laravel\\Tracing\\Routing\\{closure}()
#4 /var/www/app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/
TracingControllerDispatcherTracing.php(20): Sentry\\Laravel\\Tracing\\Routing\\T
racingRoutingDispatcher->wrapRouteDispatch(Object(Closure), Object(Illuminate\\R
outing\\Route))
#5 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262):
Sentry\\Laravel\\Tracing\\Routing\\TracingControllerDispatcherTracing->dispatch(
Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\CompanyGatewa
yController), 'test')
#6 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Route.php(208):
Illuminate\\Routing\\Route->runController()
#7 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(808):
Illuminate\\Routing\\Route->run()
#8 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(14
4): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminat
e\\Http\\Request))
#9 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/Throt
tleRequests.php(124): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{clo
sure}(Object(Illuminate\\Http\\Request))
#10 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/Thro
ttleRequests.php(89): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleR
equestUsingNamedLimiter(Object(Illuminate\\Http\\Request), Object(Closure), 'api
', Object(Closure))
#11 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle(Object(Illuminate
\\Http\\Request), Object(Closure), 'api')
#12 /var/www/app/app/Http/Middleware/QueryLogging.php(39): Illuminate\\Pipeline\
\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#13 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): App\\Http\\Middleware\\QueryLogging->handle(Object(Illuminate\\Http\\Reques
t), Object(Closure))
#14 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/Subs
tituteBindings.php(51): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{c
losure}(Object(Illuminate\\Http\\Request))
#15 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illumina
te\\Http\\Request), Object(Closure))
#16 /var/www/app/app/Http/Middleware/Locale.php(95): Illuminate\\Pipeline\\Pipel
ine->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#17 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): App\\Http\\Middleware\\Locale->handle(Object(Illuminate\\Http\\Request), Ob
ject(Closure))
#18 /var/www/app/app/Http/Middleware/TokenAuth.php(102): Illuminate\\Pipeline\\P
ipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#19 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): App\\Http\\Middleware\\TokenAuth->handle(Object(Illuminate\\Http\\Request),
Object(Closure))
#20 /var/www/app/app/Http/Middleware/SetDb.php(40): Illuminate\\Pipeline\\Pipeli
ne->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#21 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): App\\Http\\Middleware\\SetDb->handle(Object(Illuminate\\Http\\Request), Obj
ect(Closure))
#22 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illu
minate\\Http\\Request))
#23 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807)
: Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#24 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786)
: Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\R
oute), Object(Illuminate\\Http\\Request))
#25 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750)
: Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Objec
t(Illuminate\\Routing\\Route))
#26 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739)
: Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request)
)
#27 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.
php(201): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request
))
#28 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
44): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closur
e}(Object(Illuminate\\Http\\Request))
#29 /var/www/app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/FlushEvent
sMiddleware.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{clos
ure}(Object(Illuminate\\Http\\Request))
#30 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Sentry\\Laravel\\Http\\FlushEventsMiddleware->handle(Object(Illuminate\\Htt
p\\Request), Object(Closure))
#31 /var/www/app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequest
IpMiddleware.php(45): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{clo
sure}(Object(Illuminate\\Http\\Request))
#32 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Sentry\\Laravel\\Http\\SetRequestIpMiddleware->handle(Object(Illuminate\\Ht
tp\\Request), Object(Closure))
#33 /var/www/app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequest
Middleware.php(31): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closu
re}(Object(Illuminate\\Http\\Request))
#34 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Sentry\\Laravel\\Http\\SetRequestMiddleware->handle(Object(Illuminate\\Http
\\Request), Object(Closure))
#35 /var/www/app/vendor/livewire/livewire/src/Features/SupportDisablingBackButto
nCache/DisableBackButtonCacheMiddleware.php(19): Illuminate\\Pipeline\\Pipeline-
>Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#36 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCache
Middleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#37 /var/www/app/app/Http/Middleware/Cors.php(24): Illuminate\\Pipeline\\Pipelin
e->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#38 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): App\\Http\\Middleware\\Cors->handle(Object(Illuminate\\Http\\Request), Obje
ct(Closure))
#39 /var/www/app/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustPr
oxies.php(58): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(O
bject(Illuminate\\Http\\Request))
#40 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\
\Request), Object(Closure))
#41 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middlew
are/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipel
ine\\{closure}(Object(Illuminate\\Http\\Request))
#42 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middlew
are/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\
\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#43 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle
(Object(Illuminate\\Http\\Request), Object(Closure))
#44 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middlew
are/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipel
ine\\{closure}(Object(Illuminate\\Http\\Request))
#45 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middlew
are/TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsReq
uest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#46 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illumi
nate\\Http\\Request), Object(Closure))
#47 /var/www/app/vendor/laravel/framework/src/Illuminate/Http/Middleware/Validat
ePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closur
e}(Object(Illuminate\\Http\\Request))
#48 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Illuminate\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\H
ttp\\Request), Object(Closure))
#49 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middlew
are/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->I
lluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#50 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance-
>handle(Object(Illuminate\\Http\\Request), Object(Closure))
#51 /var/www/app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middlew
are.php(79): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Obj
ect(Illuminate\\Http\\Request))
#52 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
83): Sentry\\Laravel\\Tracing\\Middleware->handle(Object(Illuminate\\Http\\Reque
st), Object(Closure))
#53 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(1
19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illu
minate\\Http\\Request))
#54 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.
php(176): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#55 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.
php(145): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(
Illuminate\\Http\\Request))
#56 /var/www/app/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->han
dle(Object(Illuminate\\Http\\Request))
#57 {main}