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

Error uv_os_get_passwd returned ENOENT when updating to v3.14.0 #352

Closed
2 tasks
ST-DDT opened this issue Oct 23, 2023 · 8 comments · Fixed by #376
Closed
2 tasks

Error uv_os_get_passwd returned ENOENT when updating to v3.14.0 #352

ST-DDT opened this issue Oct 23, 2023 · 8 comments · Fixed by #376
Labels
bug Something isn't working outdated

Comments

@ST-DDT
Copy link
Contributor

ST-DDT commented Oct 23, 2023

Problem

Potentially this change 7e916f5 caused the following issue

node:os:365
    throw new ERR_SYSTEM_ERROR(ctx);
    ^

SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
    at new SystemError (node:internal/errors:256:5)
    at new NodeError (node:internal/errors:367:7)
    at Object.userInfo (node:os:365:11)
    at <instance_members_initializer> (/__w/faker/faker/node_modules/.pnpm/tsx@3.14.0/node_modules/tsx/dist/index-5f60304b.cjs:21:492)
    at new pA (/__w/faker/faker/node_modules/.pnpm/tsx@3.14.0/node_modules/tsx/dist/index-5f60304b.cjs:21:578)
    at Object.<anonymous> (/__w/faker/faker/node_modules/.pnpm/tsx@3.14.0/node_modules/tsx/dist/index-5f60304b.cjs:21:1813)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12) {
  code: 'ERR_SYSTEM_ERROR',
  info: {
    errno: -2,
    code: 'ENOENT',
    message: 'no such file or directory',
    syscall: 'uv_os_get_passwd'
  },
  errno: [Getter/Setter],
  syscall: [Getter/Setter]
}

Node.js v20.6.1
 ELIFECYCLE  Command failed with exit code 1.

https://github.com/faker-js/faker/actions/runs/6611943169/job/17956808484?pr=2501
https://github.com/esbuild-kit/tsx/blob/7e916f5a1db5b21589cedc1dc91b0c498f87adf9/src/utils/transform/cache.ts#L27

Sadly I'm unable to reproduce it locally, it only happens reproducibly in a specific GitHub CI potentially linked to either a custom image or an explicit user.

https://github.com/faker-js/faker/blob/e901641580e8718656425dc68e774e0557f62d17/.github/workflows/ci.yml#L119-L122

Expected behavior

The error should not be thrown. It works perfectly in v3.13.0.

Minimal reproduction URL

faker-js/faker#2501

Version

v3.14.0

Node.js version

v20.6.1

Package manager

pnpm

Operating system

Linux

Contributions

  • I plan to open a pull request for this issue
  • I plan to make a financial contribution to this project
@ST-DDT ST-DDT added bug Something isn't working pending triage labels Oct 23, 2023
@ST-DDT
Copy link
Contributor Author

ST-DDT commented Oct 23, 2023

Since this only happens in CI it might be safe to omit the user id from the temp folder/use a random number instead.
If that workaround is accepted, I'm willing to create a PR.

@ST-DDT
Copy link
Contributor Author

ST-DDT commented Oct 23, 2023

@privatenumber
Copy link
Owner

PR welcome to replace os.userInfo().uid with process.geteuid():
https://nodejs.org/api/process.html#processgeteuid

@ST-DDT
Copy link
Contributor Author

ST-DDT commented Oct 24, 2023

PR welcome to replace os.userInfo().uid with process.geteuid(): nodejs.org/api/process.html#processgeteuid

I will create a PR soon.

@ST-DDT
Copy link
Contributor Author

ST-DDT commented Oct 26, 2023

Repository owner deleted a comment from kaiyoma Nov 2, 2023
@raulfdm
Copy link

raulfdm commented Nov 9, 2023

Can someone check if on v4 this problem still happens?

@privatenumber
Copy link
Owner

privatenumber commented Nov 9, 2023

v4 doesn't include any fixes for this

Waiting for ST-DDT to reopen PR and I need to look into re-creating an env where I can actually test the fix

@ST-DDT
Copy link
Contributor Author

ST-DDT commented Nov 9, 2023

PR created: #376

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working outdated
Projects
None yet
3 participants