HDInnovations / UNIT3D-Community-Edition

Private Torrent Tracker Built With Laravel, Livewire and AlpineJS.
GNU Affero General Public License v3.0
1.96k stars 378 forks source link

[Bug] many errors in laravel log #4229

Closed carloangeletti closed 1 week ago

carloangeletti commented 1 week ago

UNIT3D Version

v8.3.1

PHP & Platform

8.3.12 - Ubuntu 22.04

Laravel verion

11.23.5

Have you done this?

Expectation

Hi, after the upgrade I noticed a series of errors in the laravel log.

Description

App\DTO\AnnounceUserDTO::__construct(): Argument #2 ($isDonor) must be of type bool, null given, called in /var/www/html/app/Http/Controllers/AnnounceController.php on line 695 I don't see any particular anomalies except a slowdown of the system and a huge number of these logs (about 900 in a minute)

Stack trace & logs

App\DTO\AnnounceUserDTO::__construct(): Argument #2 ($isDonor) must be of type bool, null given, called in /var/www/html/app/Http/Controllers/AnnounceController.php on line 695 {"exception":"[object] (TypeError(code: 0): App\\DTO\\AnnounceUserDTO::__construct(): Argument #2 ($isDonor) must be of type bool, null given, called in /var/www/html/app/Http/Controllers/AnnounceController.php on line 695 at /var/www/html/app/DTO/AnnounceUserDTO.php:21)
[stacktrace]
#0 /var/www/html/app/Http/Controllers/AnnounceController.php(695): App\\DTO\\AnnounceUserDTO->__construct()
#1 /var/www/html/app/Http/Controllers/AnnounceController.php(120): App\\Http\\Controllers\\AnnounceController->processAnnounceJob()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\AnnounceController->index()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(208): Illuminate\\Routing\\Route->runController()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(808): Illuminate\\Routing\\Route->run()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequestsWithRedis.php(65): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(127): Illuminate\\Routing\\Middleware\\ThrottleRequestsWithRedis->handleRequest()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(89): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequestUsingNamedLimiter()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\\Pipeline\\Pipeline->then()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\\Routing\\Router->runRouteWithinStack()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\\Routing\\Router->runRoute()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\\Routing\\Router->dispatchToRoute()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(201): Illuminate\\Routing\\Router->dispatch()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#19 /var/www/html/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCacheMiddleware->handle()
#21 /var/www/html/app/Http/Middleware/BlockIpAddress.php(40): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\BlockIpAddress->handle()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#31 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\ValidatePostSize->handle()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#35 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Pipeline\\Pipeline->then()
#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1188): Illuminate\\Foundation\\Http\\Kernel->handle()
#39 /var/www/html/public/index.php(19): Illuminate\\Foundation\\Application->handleRequest()
#40 {main}
"}

Upvote & Fund

Fund with Polar

Roardom commented 1 week ago

Clearing cache should fix this issue:

sudo php artisan cache:clear && sudo php artisan queue:clear && sudo php artisan auto:email-blacklist-update && sudo php artisan auto:cache_random_media

carloangeletti commented 1 week ago

Hi @Roardom thanks for the reply. I tried this and now laravel log are inaccessible.

Page Our server encountered an internal error. Sorry For The Inconvenience

Roardom commented 1 week ago

It might be a permissions issue on the log files. You can try viewing the log files via the terminal which will show the true error.

You can set the file permissions back to normal by following the instructions here: https://github.com/HDInnovations/UNIT3D-Community-Edition/wiki/Server-Management-(UNIT3D-v8.x.x)#2-file-permissions

carloangeletti commented 1 week ago

I restored a snapshot and reinstalled all the updates. Now everything seems to be ok. After updating everything I sent these commands back

sudo php artisan cache:clear
sudo php artisan set:all_cache
sudo systemctl restart php8.3-fpm
sudo php artisan queue:restart

I take this opportunity to ask a question/request the initial installation was done via script (version 7) but with server with root user

how can I request a server optimization and tuning?

HDVinnie commented 1 week ago

I restored a snapshot and reinstalled all the updates. Now everything seems to be ok.

After updating everything I sent these commands back


sudo php artisan cache:clear

sudo php artisan set:all_cache

sudo systemctl restart php8.3-fpm

sudo php artisan queue:restart

I take this opportunity to ask a question/request

the initial installation was done via script (version 7) but with server with root user

how can I request a server optimization and tuning?

You can email me a hdinnovations@protonmail.com or message me on discord. There is also my polar page https://polar.sh/HDInnovations/