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

uptime raises unhandled exception if current user has not sufficient privileges with node.js 16.18.0 and newer #166

Open
Gaspode69 opened this issue Jan 9, 2023 · 0 comments

Comments

@Gaspode69
Copy link

API Platform version(s) affected: x.y.z
Windows 10, node.js 16.18.0 and newer

Description
uptime raises unhandled exception, so the implemented fallback soultion in wmic.js does not work anymore:

// Fallback on current date when uptime is not allowed (see https://github.com/soyuka/pidusage/pull/130)
const uptime = Math.floor(os.uptime() || (date / 1000))

In older versions of node.js no exception was thrown by os.uptime.

How to reproduce
Try to get uv_uptime with an unpriviledged user

Possible Solution

Additional Context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant