Repository navigation
Viewing Results page results in 500 Internal Server Error #2863
Replies: 3 comments 4 replies
|
Same as in #2254 Can you pull that record from your database? What's the values that the CLI returned? |
|
Pruning won't fix this, and your stack trace already says which column is at fault — it's What's happeningFrame 1 is protected function uploadBits(): Attribute
{
return Attribute::make(
get: fn (): null|int|float => ! blank($this->upload) ? Bitrate::bytesToBits($this->upload) : null,
);
}and frame 0 is the guard it calls, public static function bytesToBits(int|float $bytes): int|float
{
if ($bytes < 0) {
throw new InvalidArgumentException('Bytes value cannot be negative');
}
...The TextColumn::make('upload')
->getStateUsing(fn (Result $record): ?string => ! blank($record->upload) ? Number::toBitRate(bits: $record->upload_bits, precision: 2) : null)The only guard is Why a negative got stored at all
$table->unsignedBigInteger('download')->nullable();
$table->unsignedBigInteger('upload')->nullable();SQLite (the default for the Docker image) has no unsigned integer type and does not enforce that constraint, so a bad reading from the speedtest CLI gets persisted as-is. On MySQL/MariaDB in strict mode the insert would have been rejected instead. FixFind the offending rows: docker compose exec -it <your-service-name> php artisan tinkeruse App\Models\Result;
Result::where('download', '<', 0)->orWhere('upload', '<', 0)
->get(['id', 'created_at', 'download', 'upload']);Then null them out — the column is nullable, and Result::where('upload', '<', 0)->update(['upload' => null]);
Result::where('download', '<', 0)->update(['download' => null]);This keeps the rows and their ping/jitter/server data rather than deleting them. If you'd rather drop them entirely, swap Set @alexjustesen worth guarding this on the read side regardless: a single persisted negative currently makes the whole Results page unreachable, and the same pattern applies to |
|
you welcome bro , yes any time you just ask me and you will get response |


Uh oh!
There was an error while loading. Please reload this page.
Checklist
Deployment Environment
Docker Compose
Description
I just noticed a few days ago that I'm now getting a 500 internal server error when I click to view the Results in the app now. I've enabled debugging in my Compose file and I seem to evidently have a negative value in my results somewhere and the application is throwing an exception. I also added PRUNE_RESULTS_OLDER_THAN and set the value yesterday to =14. Overnight it did prune the results down significantly, but the 500 server error still persists. I'm not sure if that means the problem data is still within the past 14 days or if there's something somewhere else that the PRUNE is not getting. I've just set it to =7 to let it prune some more of the data down to the prior 7 days and will see what things look like tomorrow. If a 7-day prune still gives me errors tomorrow, I guess I'll try =1 and see what results I get there.
That said, any other suggestions anyone may have for me?
Thanks for any help!
InvalidArgumentException - Internal Server Error
Bytes value cannot be negative
PHP 8.5.8
Laravel 13.21.1
repulse.grouse-woodpecker.ts.net:10443
Stack Trace
0 - app/Helpers/Bitrate.php:311 - app/Models/Traits/ResultDataAttributes.php:167
2 - vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:751
3 - vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:2413
4 - vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:541
5 - vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:495
6 - vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:2715
7 - app/Filament/Resources/Results/Tables/ResultTable.php:65
8 - vendor/filament/support/src/Concerns/EvaluatesClosures.php:36
9 - vendor/filament/support/src/Concerns/HasCellState.php:100
10 - vendor/filament/support/src/Concerns/HasCellState.php:598
11 - vendor/filament/support/src/Concerns/HasCellState.php:98
12 - vendor/filament/tables/src/Columns/TextColumn.php:271
13 - vendor/filament/support/src/Components/ViewComponent.php:144
14 - vendor/laravel/framework/src/Illuminate/Support/helpers.php:131
15 - vendor/filament/tables/resources/views/index.blade.php:2369
16 - vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php:37
17 - vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php:38
18 - vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:76
19 - vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php:16
20 - vendor/laravel/framework/src/Illuminate/View/View.php:208
21 - vendor/laravel/framework/src/Illuminate/View/View.php:191
22 - vendor/laravel/framework/src/Illuminate/View/View.php:160
23 - vendor/filament/support/src/Components/ViewComponent.php:133
24 - vendor/filament/schemas/src/Components/Component.php:223
25 - vendor/filament/schemas/src/Schema.php:210
26 - vendor/filament/schemas/src/Schema.php:148
27 - vendor/filament/schemas/src/Components/Concerns/CanBeHidden.php:270
28 - vendor/filament/schemas/src/Schema.php:148
29 - vendor/filament/support/src/Components/ViewComponent.php:144
30 - vendor/laravel/framework/src/Illuminate/Support/helpers.php:131
31 - vendor/filament/filament/resources/views/pages/page.blade.php:2
32 - vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php:37
33 - vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php:38
34 - vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:76
35 - vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php:16
36 - vendor/laravel/framework/src/Illuminate/View/View.php:208
37 - vendor/laravel/framework/src/Illuminate/View/View.php:191
38 - vendor/laravel/framework/src/Illuminate/View/View.php:160
39 - vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php:417
40 - vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php:468
41 - vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php:409
42 - vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php:83
43 - vendor/livewire/livewire/src/LivewireManager.php:102
44 - vendor/livewire/livewire/src/Features/SupportPageComponents/HandlesPageComponents.php:19
45 - vendor/livewire/livewire/src/Features/SupportPageComponents/SupportPageComponents.php:118
46 - vendor/livewire/livewire/src/Features/SupportPageComponents/HandlesPageComponents.php:14
47 - vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:46
48 - vendor/laravel/framework/src/Illuminate/Routing/Route.php:276
49 - vendor/laravel/framework/src/Illuminate/Routing/Route.php:216
50 - vendor/laravel/framework/src/Illuminate/Routing/Router.php:822
51 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180
52 - vendor/filament/filament/src/Http/Middleware/DispatchServingFilamentEvent.php:15
53 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
54 - vendor/filament/filament/src/Http/Middleware/DisableBladeIconComponents.php:14
55 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
56 - vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:52
57 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
58 - vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestForgery.php:104
59 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
60 - vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php:70
61 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
62 - vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:63
63 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
64 - vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:48
65 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
66 - vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:120
67 - vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:63
68 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
69 - vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:36
70 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
71 - vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:74
72 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
73 - vendor/filament/filament/src/Http/Middleware/SetUpPanel.php:19
74 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
75 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:137
76 - vendor/laravel/framework/src/Illuminate/Routing/Router.php:821
77 - vendor/laravel/framework/src/Illuminate/Routing/Router.php:800
78 - vendor/laravel/framework/src/Illuminate/Routing/Router.php:764
79 - vendor/laravel/framework/src/Illuminate/Routing/Router.php:753
80 - vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:200
81 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180
82 - vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php:19
83 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
84 - vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21
85 - vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php:31
86 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
87 - vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21
88 - vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php:51
89 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
90 - vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php:27
91 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
92 - vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php:109
93 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
94 - vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php:61
95 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
96 - vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php:58
97 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
98 - vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php:22
99 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
100 - vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePathEncoding.php:28
101 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
102 - vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:137
103 - vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:175
104 - vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:144
105 - vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1227
106 - public/index.php:20
Request
GET /admin/results
Headers
* **cookie**: _SSID=y-rLm7FuAjJVCXssbV98v9yGNuwr0EM6epQj8N2CkWk; homarr.color-scheme=dark; connect.sid=s%3AYmjL9eAyhdmZQMkwQ-kKUNhuGLZaYeOj.hqJOgERJcR8pPIztBf7qey7F%2BzF6AmrY8kDAnVZphb0; stay_login=0; did=dydJut4Zc841xE_qvJAac8GjUZpEcNyebVU7ZKJNxCKNmgIviawtGWNwV9pwTEfRIxarLzfPolNj6j1nS-Tj7A; _CrPoSt=cHJvdG9jb2w9aHR0cHM6OyBwb3J0PTUwMDE7IHBhdGhuYW1lPS87; csrftoken=aKGhtn86y0k2Dz1BVsPFcrhE3KE4EgQ3; homarr.locale=en; last_db_dp=1; last_db_mm=1; last_section_mm=media-settings; last_db_re=1; last_db_cf=1; last_db_qp=1; homarr.session-token=a8a917321fe21e87b89a26a8e012d70e509f233e87362149be5e972c5915142e1c5a18b5533b5f6c0983da35c5abba5e; XSRF-TOKEN=eyJpdiI6InFBTXRjcHRIMXdkSlZucE1vRDYydXc9PSIsInZhbHVlIjoiL0x6NTZjSmZ2bDhVOGpDRWZmUU5wQzNWWk9OZWE0Rjhkcy9WTWlOQUkwem14V2J0WGNnQW4vUHZmaXM1dnhQYTRLTGpLbUd3dzZLQlFYREFqWHBERUU5eXh0aDZXRmZ1Yk1RTDY5UWpVaUk5N3ZoSVFsdWgwWjZzazl3bmRYNVUiLCJtYWMiOiIwMjI2ZTE2MTJiYmY1YzNlODdiZWY5ZGY0YTE1YjMwZmE0ZjExMDZlYWU3MzhlOWI0MjE2ZWNiNDRlM2Q4M2VmIiwidGFnIjoiIn0%3D; laravel_session=eyJpdiI6Ik44MDl0NEJhSUNyditBbVFIc0FKckE9PSIsInZhbHVlIjoiQzBLWldlQTRCc3lieWxVSmxXS2xpb3c5Y2pWL0I5YThSdXhPWFFWUjYya0hYVFVoRE5yaVlYY0ErNkxnK1R4S2srU3MzTys5UjJ2bSt3dllzaElPRWNoOExxdnJvOFpOaEhYVk1HdlV4RkJ2aTJJcFQ3b3NXYnpZV3grS0xpbmYiLCJtYWMiOiJkZDZlNWZmNWNlMGU2ZjJlYjgxZDY3NjMzMzE4MTBmNTcyNDkyZmNiMTIwMTg2NjczODRlMjZmNzc5YmIxYjhiIiwidGFnIjoiIn0%3D; session=9b915bb2-f143-4809-8b26-7eea8626f501; io=5A_IBOKpqGTCy4ECAAAE; homarr.csrf-token=3b690756ff0db6cbd59ebef0c0f6a5c1a163e474a178d1ba96ca9bf746c19aab%7C4ba5a1d70e1222dc43758e8b0c83005822ee792ad91400be281ca9d69f98b320; homarr.callback-url=http%3A%2F%2Frepulse.grouse-woodpecker.ts.net%3A7575; django_language=en-us; id=eBXdkQkASJrxczK0GUSovBIUc3Qfbnx_69UFvMi8R-MwixYbZhdGApL1V8NzNM1gcFS8R3OIrWNBNyawkShwyERoute Context
controller: App\Filament\Resources\Results\Pages\ListResultsroute name: filament.admin.resources.results.index
middleware: panel:admin, Illuminate\Cookie\Middleware\EncryptCookies, Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse, Illuminate\Session\Middleware\StartSession, Illuminate\Session\Middleware\AuthenticateSession, Illuminate\View\Middleware\ShareErrorsFromSession, Illuminate\Foundation\Http\Middleware\PreventRequestForgery, Illuminate\Routing\Middleware\SubstituteBindings, Filament\Http\Middleware\DisableBladeIconComponents, Filament\Http\Middleware\DispatchServingFilamentEvent, Filament\Http\Middleware\Authenticate
Route Parameters
No route parameter data available.Database Queries
* sqlite - select * from "sessions" where "id" = 'KrQy3CwsjYeQQx9cWllTpnHeo07e1JhWD1sXoHs9' limit 1 (0.99 ms)Anything else?
No response
All reactions