Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many exceptions since update to 0.18 #1281

Closed
AleksCee opened this issue Mar 1, 2024 · 17 comments · Fixed by #1291
Closed

Many exceptions since update to 0.18 #1281

AleksCee opened this issue Mar 1, 2024 · 17 comments · Fixed by #1291
Assignees
Labels
🐛 bug Something isn't working

Comments

@AleksCee
Copy link

AleksCee commented Mar 1, 2024

this is only a grep for exception, if you need more of the thread-dump, please let me know.

speedtest-tracker  | [2024-03-01 13:07:59] production.ERROR: Job is incomplete class: {"__PHP_Incomplete_Class_Name":"App\\Jobs\\ExecSpeedtest","speedtest":{"ookla_server_id":"54504"},"scheduled":true} {"exception":"[object] (Exception(code: 0): Job is incomplete class: {\"__PHP_Incomplete_Class_Name\":\"App\\\\Jobs\\\\ExecSpeedtest\",\"speedtest\":{\"ookla_server_id\":\"54504\"},\"scheduled\":true} at /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:117)
speedtest-tracker  | [2024-03-01 13:08:00] production.ERROR: Job is incomplete class: {"__PHP_Incomplete_Class_Name":"App\\Jobs\\ExecSpeedtest","speedtest":{"ookla_server_id":"54504"},"scheduled":true} {"exception":"[object] (Exception(code: 0): Job is incomplete class: {\"__PHP_Incomplete_Class_Name\":\"App\\\\Jobs\\\\ExecSpeedtest\",\"speedtest\":{\"ookla_server_id\":\"54504\"},\"scheduled\":true} at /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:117)
speedtest-tracker  | [2024-03-01 13:09:37] production.ERROR: Undefined array key "name" (View: /var/www/html/resources/views/telegram/speedtest-threshold.blade.php) {"exception":"[object] (Illuminate\\View\\ViewException(code: 0): Undefined array key \"name\" (View: /var/www/html/resources/views/telegram/speedtest-threshold.blade.php) at /var/www/html/storage/framework/views/c80a1e79545e69b9bbf8d40ce8d6eeaf.php:6)
speedtest-tracker  | [previous exception] [object] (ErrorException(code: 0): Undefined array key \"name\" at /var/www/html/storage/framework/views/c80a1e79545e69b9bbf8d40ce8d6eeaf.php:6)
speedtest-tracker  | [2024-03-01 13:09:38] production.ERROR: Undefined array key "name" (View: /var/www/html/resources/views/emails/speedtest-threshold.blade.php) {"exception":"[object] (Illuminate\\View\\ViewException(code: 0): Undefined array key \"name\" (View: /var/www/html/resources/views/emails/speedtest-threshold.blade.php) at /var/www/html/storage/framework/views/0cec695d4f8bfd557aa432655bf6a626.php:29)
speedtest-tracker  | [previous exception] [object] (ErrorException(code: 0): Undefined array key \"name\" at /var/www/html/storage/framework/views/0cec695d4f8bfd557aa432655bf6a626.php:29)
speedtest-tracker  | [2024-03-01 13:09:58] production.ERROR: Undefined array key "name" (View: /var/www/html/resources/views/telegram/speedtest-threshold.blade.php) {"exception":"[object] (Illuminate\\View\\ViewException(code: 0): Undefined array key \"name\" (View: /var/www/html/resources/views/telegram/speedtest-threshold.blade.php) at /var/www/html/storage/framework/views/c80a1e79545e69b9bbf8d40ce8d6eeaf.php:6)
speedtest-tracker  | [previous exception] [object] (ErrorException(code: 0): Undefined array key \"name\" at /var/www/html/storage/framework/views/c80a1e79545e69b9bbf8d40ce8d6eeaf.php:6)
@alexjustesen
Copy link
Owner

I think this is similar to the discussion comment in v0.18.0, can you upgrade to v0.18.1 which was just released and let me know if the issue persists?

I added additional logging which might help us narrow this down.

@alexjustesen alexjustesen added the 🐛 bug Something isn't working label Mar 1, 2024
@alexjustesen alexjustesen self-assigned this Mar 1, 2024
@alexjustesen
Copy link
Owner

Also can you let me know what notification channels you have setup? I'm assuming just Telegram and Mail?

@AleksCee
Copy link
Author

AleksCee commented Mar 1, 2024

In 0.18.1 the same:

I use: Mail, Telegram and DB. But mail & dB only on Thresholds but telegram for every test.


speedtest-tracker  | [2024-03-01 13:50:40] production.ERROR: Undefined array key "name" (View: /var/www/html/resources/views/telegram/speedtest-threshold.blade.php) {"exception":"[object] (Illuminate\\View\\ViewException(code: 0): Undefined array key \"name\" (View: /var/www/html/resources/views/telegram/speedtest-threshold.blade.php) at /var/www/html/storage/framework/views/c80a1e79545e69b9bbf8d40ce8d6eeaf.php:6)
speedtest-tracker  | [stacktrace]
speedtest-tracker  | #0 /var/www/html/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php(58): Illuminate\\View\\Engines\\CompilerEngine->handleViewException()
speedtest-tracker  | #1 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(60): Livewire\\Mechanisms\\ExtendBlade\\ExtendedCompilerEngine->handleViewException()
speedtest-tracker  | #2 /var/www/html/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php(22): Illuminate\\View\\Engines\\PhpEngine->evaluatePath()
speedtest-tracker  | #3 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(72): Livewire\\Mechanisms\\ExtendBlade\\ExtendedCompilerEngine->evaluatePath()
speedtest-tracker  | #4 /var/www/html/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php(10): Illuminate\\View\\Engines\\CompilerEngine->get()
speedtest-tracker  | #5 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(207): Livewire\\Mechanisms\\ExtendBlade\\ExtendedCompilerEngine->get()
speedtest-tracker  | #6 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(190): Illuminate\\View\\View->getContents()
speedtest-tracker  | #7 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(159): Illuminate\\View\\View->renderContents()
speedtest-tracker  | #8 /var/www/html/app/Listeners/Telegram/SendSpeedtestThresholdNotification.php(69): Illuminate\\View\\View->render()
speedtest-tracker  | #9 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(478): App\\Listeners\\Telegram\\SendSpeedtestThresholdNotification->handle()
speedtest-tracker  | #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(286): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}()
speedtest-tracker  | #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(266): Illuminate\\Events\\Dispatcher->invokeListeners()
speedtest-tracker  | #12 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(433): Illuminate\\Events\\Dispatcher->dispatch()
speedtest-tracker  | #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php(14): event()
speedtest-tracker  | #14 /var/www/html/app/Jobs/Speedtests/ExecuteOoklaSpeedtest.php(73): App\\Events\\SpeedtestCompleted::dispatch()
speedtest-tracker  | #15 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Jobs\\Speedtests\\ExecuteOoklaSpeedtest->handle()
speedtest-tracker  | #16 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
speedtest-tracker  | #17 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
speedtest-tracker  | #18 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
speedtest-tracker  | #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
speedtest-tracker  | #20 /var/www/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call()
speedtest-tracker  | #21 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}()
speedtest-tracker  | #22 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
speedtest-tracker  | #23 /var/www/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then()
speedtest-tracker  | #24 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Bus\\Dispatcher->dispatchNow()
speedtest-tracker  | #25 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}()
speedtest-tracker  | #26 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
speedtest-tracker  | #27 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(122): Illuminate\\Pipeline\\Pipeline->then()
speedtest-tracker  | #28 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware()
speedtest-tracker  | #29 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call()
speedtest-tracker  | #30 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(439): Illuminate\\Queue\\Jobs\\Job->fire()
speedtest-tracker  | #31 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(389): Illuminate\\Queue\\Worker->process()
speedtest-tracker  | #32 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(176): Illuminate\\Queue\\Worker->runJob()
speedtest-tracker  | #33 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(137): Illuminate\\Queue\\Worker->daemon()
speedtest-tracker  | #34 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(120): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
speedtest-tracker  | #35 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
speedtest-tracker  | #36 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
speedtest-tracker  | #37 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
speedtest-tracker  | #38 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
speedtest-tracker  | #39 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
speedtest-tracker  | #40 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call()
speedtest-tracker  | #41 /var/www/html/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute()
speedtest-tracker  | #42 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run()
speedtest-tracker  | #43 /var/www/html/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run()
speedtest-tracker  | #44 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand()
speedtest-tracker  | #45 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun()
speedtest-tracker  | #46 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
speedtest-tracker  | #47 /var/www/html/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
speedtest-tracker  | #48 {main}
speedtest-tracker  | 
speedtest-tracker  | [previous exception] [object] (ErrorException(code: 0): Undefined array key \"name\" at /var/www/html/storage/framework/views/c80a1e79545e69b9bbf8d40ce8d6eeaf.php:6)

@AleksCee
Copy link
Author

AleksCee commented Mar 1, 2024

Addon Info: the telegram message was send 3 times for the same test, I think that’s a follow up error because of the exception…

@alexjustesen
Copy link
Owner

alexjustesen commented Mar 1, 2024

@AleksCee what are your thresholds set to? I've got the following and can't replicate the error:

  • DB: threshold only
  • Mail: threshold only
  • Telegram: every run only

Threshold's I have download, upload and ping all set to trigger.

@AleksCee
Copy link
Author

AleksCee commented Mar 1, 2024

Yes that’s my config to. The mail is one email, the telegram receiver is a group starts with a -
A test on this page gets no error only if it’s send by a job.
IMG_3021
IMG_3022
IMG_3023

@AleksCee
Copy link
Author

AleksCee commented Mar 1, 2024

If I understand the code right in SendSpeedtestThresholdNotification.php You return an empty array if no threshold occurred so in the $failed array is a list of empty arrays if there was no threshold?
so the count gets not false here? Because I don’t have a threshold break, so I should not render the view at all, or?

    57          if (! count($failed)) {
    58              Log::warning('Failed Telegram thresholds not found, won\'t send notification.');
    59
    60              return;
    61          }
    62
    63          $content = view('telegram.speedtest-threshold', [
    64              'id' => $event->result->id,
    65              'service' => Str::title($event->result->service),
    66              'serverName' => $event->result->server_name,
    67              'serverId' => $event->result->server_id,
    68              'metrics' => $failed,
    69          ])->render();

@AleksCee
Copy link
Author

AleksCee commented Mar 1, 2024

I have done a little test:

php -r ' $failed = []; array_push($failed,[]); var_dump(!count($failed));'
bool(false)

php -r ' $failed = []; /*array_push($failed,[]);*/ var_dump(!count($failed));'
bool(true)

so if an array in array was count the result is false in the if check and then the name key is missed.

@alexjustesen
Copy link
Owner

So lines 57-61 should prevent an empty array from continuing the process. Basically a count of 0 = false which causes the process to end.

What's odd is I've replicated your settings locally and on my Synology NAS running v0.18.1 and haven't been able to produce the error.

@alexjustesen
Copy link
Owner

Got it, the nested arrays while empty are being counted which shouldn't happen. Working on the fix now...

@AleksCee
Copy link
Author

AleksCee commented Mar 1, 2024

I think it’s not count 0 in this case if [] returned an push to the array see at mein Mini Test before. [[]] is not 0

php -r ' $failed = []; array_push($failed,[]); var_dump(count($failed));'
int(1)

80      protected function absoluteDownloadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): array
    81      {
    82          if (! absoluteDownloadThresholdFailed($thresholdSettings->absolute_download, $event->result->download)) {
    83              return [];
    84          }
    85
    86          return [
    87              'name' => 'Download',
    88              'threshold' => $thresholdSettings->absolute_download.' Mbps',
    89              'value' => Number::toBitRate(bits: $event->result->download_bits, precision: 2),
    90          ];
    91      }
    92 

@AleksCee
Copy link
Author

AleksCee commented Mar 1, 2024

Sorry i was to slow with my test showing… only tipping on iPad right now an use a ssh terminal on iPad to test on the nas… but I think you got it now while I’m writing the laste explanation ;-) sorry for my speed with iPad tipping.

@masterwishx
Copy link

Also have exceptions after updated to 0.18.1 :

image

@alexjustesen
Copy link
Owner

I'm taking an evening off from code for beers. Should get this fixed this weekend though.

@masterwishx
Copy link

I'm taking an evening off from code for beers. Should get this fixed this weekend though.

Also found all threshold notification (mail, telegram, discord) not working from updated to 0.18.0 version ...

@corasaniti
Copy link

@alexjustesen
Hi, has 0.18.2 been released which solves these issues?
Thanks in advance

@AleksCee
Copy link
Author

AleksCee commented Mar 2, 2024

@alexjustesen
Hi, has 0.18.2 been released which solves these issues?
Thanks in advance

Not now, the exceptions comes in a special case. You can try to go around this, if you turn off threshold still the fix comes after the beer-timeout (sorry I’m getting funny) from @alexjustesen
Everything is working only no threshold, and in case of a notification many exceptions. Because of the exceptions the notification can send up to three times.
But on my observation the tests are not impaired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants