You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to get the idlestate of the system as im building a Time Tracking app and it needs to auto pause when the machine is locked or idle
What happened?
TypeError: Error processing argument at index 0, conversion failure from undefined
at PowerMonitor.getSystemIdleState (node:electron/js2c/browser_init:2:49935)
at /Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/out/main/index.js:1086:35
at Layer.handle [as handle_request] (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/route.js:149:13)
at Route.dispatch (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/route.js:119:3)
at Layer.handle [as handle_request] (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/layer.js:95:5)
at /Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/index.js:284:15
at Function.process_params (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/index.js:346:12)
at next (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/index.js:280:10)
at Function.handle (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/index.js:175:3)
What were you trying to do?
I was trying to get the idlestate of the system as im building a Time Tracking app and it needs to auto pause when the machine is locked or idle
What happened?
TypeError: Error processing argument at index 0, conversion failure from undefined
at PowerMonitor.getSystemIdleState (node:electron/js2c/browser_init:2:49935)
at /Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/out/main/index.js:1086:35
at Layer.handle [as handle_request] (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/route.js:149:13)
at Route.dispatch (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/route.js:119:3)
at Layer.handle [as handle_request] (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/layer.js:95:5)
at /Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/index.js:284:15
at Function.process_params (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/index.js:346:12)
at next (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/index.js:280:10)
at Function.handle (/Users/user-connor/PhpstormProjects/zest-native-timetracking/vendor/nativephp/electron/resources/js/node_modules/express/lib/router/index.js:175:3)
I had this code for debugging purposes
$state = PowerMonitor::getSystemIdleState(60);
info('System Idle State: ' . $state->name);
it will always return unknown and spam that error
How to reproduce the bug
using any function on the PowerMonitor class
Package Versions
{
"installed": [
{
"name": "nativephp/electron",
"direct-dependency": true,
"homepage": "https://github.com/nativephp/electron",
"source": "https://github.com/NativePHP/electron/tree/0.8.7",
"version": "0.8.7",
"description": "Electron wrapper for the NativePHP framework.",
"abandoned": false
},
{
"name": "nativephp/laravel",
"direct-dependency": false,
"homepage": "https://github.com/nativephp/laravel",
"source": "https://github.com/NativePHP/laravel/tree/0.6.4",
"version": "0.6.4",
"description": "Laravel wrapper for the NativePHP framework.",
"abandoned": false
},
{
"name": "nativephp/php-bin",
"direct-dependency": false,
"homepage": "https://nativephp.com",
"source": "https://github.com/NativePHP/php-bin/tree/0.5.5",
"version": "0.5.5",
"description": "PHP binaries used by the NativePHP framework",
"abandoned": false
}
]
}
PHP Version
8.3
Laravel Version
Latest (11.34)
Node Version
22.11.0
Which operating systems have you seen this occur on?
macOS
OS version
15.1 (24B83)
Notes
No response
The text was updated successfully, but these errors were encountered: