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

Only on Windows: Native\Laravel\Events\PowerMonitor\SpeedLimitChanged::__construct(): Argument #1 ($limit) must be of type string, array given #383

Closed
colq2 opened this issue Oct 9, 2024 · 0 comments · Fixed by NativePHP/electron#122
Labels
bug Something isn't working

Comments

@colq2
Copy link

colq2 commented Oct 9, 2024

What were you trying to do?

I was looking into the logs and this error happens every few seconds in a production build for windows 11 x64.

What happened?

The application continues to run normally. Does not affect anything noticeable but it fills the log file heavily.

How to reproduce the bug

I don't think this is special to my application. So probably build for windows and run on a windows machine.

Package Versions

nativephp/electoron:0.7.3, nativephp/laravel:0.5.7, nativephp/php-bin:0.5.4

PHP Version

8.3.0

Laravel Version

11

Node Version

Not sure

Which operating systems have you seen this occur on?

Windows

OS version

win11

Notes

Just to make it complete here is the full error:

production.ERROR: Native\Laravel\Events\PowerMonitor\SpeedLimitChanged::__construct(): Argument #1 ($limit) must be of type string, array given, called in C:\Users\<user>\AppData\Local\Programs\<project>\resources\app.asar.unpacked\resources\app\vendor\nativephp\laravel\src\Http\Controllers\DispatchEventFromAppController.php on line 15 {"exception":"[object] (TypeError(code: 0): Native\\Laravel\\Events\\PowerMonitor\\SpeedLimitChanged::__construct(): Argument #1 ($limit) must be of type string, array given, called in C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\nativephp\\laravel\\src\\Http\\Controllers\\DispatchEventFromAppController.php on line 15 at C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\nativephp\\laravel\\src\\Events\\PowerMonitor\\SpeedLimitChanged.php:17)
[stacktrace]
#0 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\nativephp\\laravel\\src\\Http\\Controllers\\DispatchEventFromAppController.php(15): Native\\Laravel\\Events\\PowerMonitor\\SpeedLimitChanged->__construct(Array)
#1 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php(46): Native\\Laravel\\Http\\Controllers\\DispatchEventFromAppController->__invoke(Object(Illuminate\\Http\\Request))
#2 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(262): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Native\\Laravel\\Http\\Controllers\\DispatchEventFromAppController), '__invoke')
#3 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(208): Illuminate\\Routing\\Route->runController()
#4 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(808): Illuminate\\Routing\\Route->run()
#5 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#6 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\nativephp\\laravel\\src\\Http\\Middleware\\PreventRegularBrowserAccess.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#7 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Native\\Laravel\\Http\\Middleware\\PreventRegularBrowserAccess->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#8 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#9 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(807): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#10 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(786): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#11 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(750): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#12 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(739): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#13 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(201): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#14 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#15 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#16 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#17 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#18 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#19 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#20 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#21 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#22 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#23 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#24 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#25 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#26 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#27 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php(58): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#28 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#29 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\InvokeDeferredCallbacks.php(22): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#30 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\InvokeDeferredCallbacks->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#31 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#32 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(176): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#33 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(145): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#34 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(1188): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#35 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\public\\index.php(17): Illuminate\\Foundation\\Application->handleRequest(Object(Illuminate\\Http\\Request))
#36 C:\\Users\\<user>\\AppData\\Local\\Programs\\<project>\\resources\\app.asar.unpacked\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\resources\\server.php(23): require_once('C:\\\\Users\\\\<user>\\\\App...')
#37 {main}
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.

1 participant