opcodesio / log-viewer

Fast and beautiful Log Viewer for Laravel
https://log-viewer.opcodes.io
MIT License
3.54k stars 255 forks source link

Error 500 | Undefined variable $selectedFileIdentifier #341

Open agitnaeta opened 8 months ago

agitnaeta commented 8 months ago

Reproduce: Open url /log-viewer

OS: Centos7

PHP: 8.1

`[previous exception] [object] (ErrorException(code: 0): Undefined variable $selectedFileIdentifier at /var/www/gsi/storage/framework/views/65a73dc0f3b23ac7ac2ab7273f2b1ac94041859c.php:51) [stacktrace]

0 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(270): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()

1 /var/www/gsi/storage/framework/views/65a73dc0f3b23ac7ac2ab7273f2b1ac94041859c.php(51): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()

2 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(109): require('...')

3 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(110): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()

4 /var/www/gsi/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(58): Illuminate\Filesystem\Filesystem->getRequire()

5 /var/www/gsi/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(69): Illuminate\View\Engines\PhpEngine->evaluatePath()

6 /var/www/gsi/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(70): Livewire\LivewireViewCompilerEngine->evaluatePath()

7 /var/www/gsi/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(35): Illuminate\View\Engines\CompilerEngine->get()

8 /var/www/gsi/vendor/laravel/framework/src/Illuminate/View/View.php(195): Livewire\LivewireViewCompilerEngine->get()

9 /var/www/gsi/vendor/laravel/framework/src/Illuminate/View/View.php(178): Illuminate\View\View->getContents()

10 /var/www/gsi/vendor/laravel/framework/src/Illuminate/View/View.php(147): Illuminate\View\View->renderContents()

11 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Http/Response.php(69): Illuminate\View\View->render()

12 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Http/Response.php(35): Illuminate\Http\Response->setContent()

13 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Routing/Router.php(906): Illuminate\Http\Response->__construct()

14 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Routing/Router.php(875): Illuminate\Routing\Router::toResponse()

15 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Routing/Router.php(798): Illuminate\Routing\Router->prepareResponse()

16 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Routing\Router->Illuminate\Routing\{closure}()

17 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

18 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Routing\Middleware\SubstituteBindings->handle()

19 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

20 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()

21 /var/www/gsi/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

22 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\View\Middleware\ShareErrorsFromSession->handle()

23 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

24 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()

25 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Session\Middleware\StartSession->handle()

26 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

27 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()

28 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

29 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\EncryptCookies->handle()

30 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

31 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Routing/Router.php(799): Illuminate\Pipeline\Pipeline->then()

32 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Routing/Router.php(776): Illuminate\Routing\Router->runRouteWithinStack()

33 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Routing/Router.php(740): Illuminate\Routing\Router->runRoute()

34 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Routing/Router.php(729): Illuminate\Routing\Router->dispatchToRoute()

35 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(190): Illuminate\Routing\Router->dispatch()

36 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()

37 /var/www/gsi/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

38 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Livewire\DisableBrowserCache->handle()

39 /var/www/gsi/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

40 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()

41 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

42 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()

43 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()

44 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

45 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()

46 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()

47 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

48 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()

49 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

50 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()

51 /var/www/gsi/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

52 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Fruitcake\Cors\HandleCors->handle()

53 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

54 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\TrustProxies->handle()

55 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

56 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Pipeline\Pipeline->then()

57 /var/www/gsi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()

58 /var/www/gsi/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()

59 {main}

"} `


Error In file 51 $html = \Livewire\Livewire::mount('log-viewer::file-list', ['selectedFileIdentifier' => $selectedFileIdentifier])->html();

arukompas commented 8 months ago

hey @agitnaeta , are you able to upgrade to the latest Log Viewer version? This is from an older version which still used Livewire. Livewire dependency has been removed since Log Viewer v2, which means you're 2 major versions behind.