Aspex's avatar
Level 4

What triggers my app - Logging happening non-stop

Hi!

I'm wondering what is causing my Laravel error-log (in storage/app/logs) to fill in with issues, even though I don't even have docker (or any other webserver) up and running. The constant logging issue has already filled my total disk space in a test server environment with low diskspace. Same happens in Localhost.

I've stripped out even all the schedulers from use in the Kernel -folder to be 100% there are no tasks/commands running in the background at least from Laravel's side.

Please note, I'm well aware of the issues that get logged, and fixing them is not an issue. Rather I'd need to understand the mechanism that triggers the logging all the time - How and why is it happening?

Below is what has been logged meanwhile writing this post, and it just continues...

[2023-11-01 08:45:57] local.ERROR: Invalid route action: [App\Foundation\Http\Controllers\Auth\DeviceAuthorizationController]. {"exception":"[object] (UnexpectedValueException(code: 0): Invalid route action: ...

[2023-11-01 08:46:57] local.ERROR: Invalid route action: [App\Foundation\Http\Controllers\Auth\DeviceAuthorizationController]. {"exception":"[object] (UnexpectedValueException(code: 0): Invalid route action: ...

[2023-11-01 08:47:57] local.ERROR: Invalid route action: [App\Foundation\Http\Controllers\Auth\DeviceAuthorizationController]. {"exception":"[object] (UnexpectedValueException(code: 0): ...

Thanks!

0 likes
3 replies
LaryAI's avatar
Level 58

Based on the information provided, it seems that there is an issue with the route action in the DeviceAuthorizationController class. This is causing the error to be logged repeatedly.

To troubleshoot this issue, you can follow these steps:

  1. Check the DeviceAuthorizationController class and make sure that the route action is defined correctly. Ensure that the action exists and is properly formatted.

  2. Verify that the controller is being used in the correct route. Check your routes file (web.php or api.php) and ensure that the route is defined correctly and points to the correct controller and action.

  3. If the issue persists, check if there are any middleware or route groups that might be affecting the route. Make sure that the middleware and route groups are properly configured and not causing any conflicts.

  4. If you have recently made any changes to your code, such as updating packages or modifying the Laravel configuration, try reverting those changes to see if the issue is resolved.

If none of the above steps resolve the issue, it might be helpful to provide more information about your codebase, such as the relevant routes and controller code, so that we can provide more specific guidance.

Remember to always test your changes in a development environment before applying them to a production environment.

// Example of a correct route definition in web.php
Route::get('/example', [App\Foundation\Http\Controllers\Auth\DeviceAuthorizationController::class, 'methodName']);
// Example of a correct route definition in api.php
Route::post('/example', [App\Foundation\Http\Controllers\Auth\DeviceAuthorizationController::class, 'methodName']);

Please note that this solution assumes that the issue is related to the route action in the DeviceAuthorizationController class. If the issue persists or if there are other error messages in the log, further investigation may be required.

Aspex's avatar
Level 4

Oh, and here's full error stack trace:

[stacktrace]
#0 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\RouteAction.php(47): Illuminate\Routing\RouteAction::makeInvokable()
#1 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\Route.php(191): Illuminate\Routing\RouteAction::parse()
#2 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\Route.php(172): Illuminate\Routing\Route->parseAction()
#3 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\Router.php(662): Illuminate\Routing\Route->__construct()
#4 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\Router.php(554): Illuminate\Routing\Router->newRoute()
#5 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\Router.php(534): Illuminate\Routing\Router->createRoute()
#6 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\Router.php(164): Illuminate\Routing\Router->addRoute()
#7 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(353): Illuminate\Routing\Router->post()
#8 C:\Users\User\Documents\Development\company\routes\api.php(20): Illuminate\Support\Facades\Facade::__callStatic()
#9 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\Router.php(502): Illuminate\Routing\RouteFileRegistrar->{closure}()
#10 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\Router.php(458): Illuminate\Routing\Router->loadRoutes()
#11 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(353): Illuminate\Routing\Router->group()
#12 C:\Users\User\Documents\Development\company\routes\api.php(17): Illuminate\Support\Facades\Facade::__callStatic()
#13 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\RouteFileRegistrar.php(35): require('...')
#14 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\Router.php(504): Illuminate\Routing\RouteFileRegistrar->register()
#15 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\Router.php(458): Illuminate\Routing\Router->loadRoutes()
#16 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Routing\RouteRegistrar.php(192): Illuminate\Routing\Router->group()
#17 C:\Users\User\Documents\Development\company\app\Providers\RouteServiceProvider.php(78): Illuminate\Routing\RouteRegistrar->group()
#18 C:\Users\User\Documents\Development\company\app\Providers\RouteServiceProvider.php(45): App\Providers\RouteServiceProvider->mapApiRoutes()
#19 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): App\Providers\RouteServiceProvider->map()
#20 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Container\Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#21 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#22 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#23 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Container\Container.php(662): Illuminate\Container\BoundMethod::call()
#24 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Foundation\Support\Providers\RouteServiceProvider.php(122): Illuminate\Container\Container->call()
#25 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Foundation\Support\Providers\RouteServiceProvider.php(45): Illuminate\Foundation\Support\Providers\RouteServiceProvider->loadRoutes()
#26 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): Illuminate\Foundation\Support\Providers\RouteServiceProvider->Illuminate\Foundation\Support\Providers\{closure}()
#27 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Container\Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#28 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(81): Illuminate\Container\Util::unwrapIfClosure()
#29 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#30 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Container\Container.php(662): Illuminate\Container\BoundMethod::call()
#31 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php(119): Illuminate\Container\Container->call()
#32 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(1031): Illuminate\Support\ServiceProvider->callBootedCallbacks()
#33 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(1009): Illuminate\Foundation\Application->bootProvider()
#34 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}()
#35 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(1008): array_walk()
#36 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\BootProviders.php(17): Illuminate\Foundation\Application->boot()
#37 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(261): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
#38 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(447): Illuminate\Foundation\Application->bootstrapWith()
#39 C:\Users\User\Documents\Development\company\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(199): Illuminate\Foundation\Console\Kernel->bootstrap()
#40 Command line code(1): Illuminate\Foundation\Console\Kernel->handle()
#41 {main}```
Snapey's avatar

A plugin in your code editor is trying to evaluate your project and find routes etc. This is triggering the error.

If you close your editor, the logging will probably stop.

What does App\Foundation\Http\Controllers\Auth\DeviceAuthorizationController look like?

Please or to participate in this conversation.