Giter Site home page Giter Site logo

Comments (6)

netroy avatar netroy commented on May 18, 2024 2

This is happening because we upgraded oclif since the version of the package we were on was long deprecated.
In this version of the package there is code to determine the user's shell, which makes calls to require('os').userInfo().shell if process.env.SHELL isn't set.

As a temporary solution, can you please add the env variable SHELL: /bin/sh to your container?
For a proper fix, We'll add this to our docker images.

from n8n.

Joffcom avatar Joffcom commented on May 18, 2024

Hey @stavros-k

Can you share your exact config? We don't officially support running as a different user so I am surprised it works at all but the error seems to be unhappy with the path which isn't one we use.

from n8n.

stavros-k avatar stavros-k commented on May 18, 2024

Hello, this is the config-variables

And here is the runAs context (user supplies the actual value, but 568 was working until know.

The error doesn't really complain about the data directory.

You can try directly with this:

(No error)

docker run --rm -it -u 1000 node sh -c 'echo "require(\"os\").userInfo()" | node'

(Error)

docker run --rm -it -u 568 node sh -c 'echo "require(\"os\").userInfo()" | node'
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 Object.userInfo (node:os:365:11)
    at [stdin]:1:15
    at runScriptInThisContext (node:internal/vm:144:10)
    at node:internal/process/execution:109:14
    at [stdin]-wrapper:6:24
    at runScript (node:internal/process/execution:92:62)
    at evalScript (node:internal/process/execution:123:10)
    at node:internal/main/eval_stdin:32:5
    at Socket.<anonymous> (node:internal/process/execution:224:5)
    at Socket.emit (node:events:531:35) {
  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]
}

Perhaps some new functionality added recently that uses the above?

from n8n.

Joffcom avatar Joffcom commented on May 18, 2024

Ah maybe, the bit that caught my eye was the mention of the /data folder which isn’t one we use but I am also aware that we don’t officially support using other users so this is a bit of a grey area…

It is interesting that you get the same error outside of n8n which makes me wonder if there is anything for us to actually fix here…

I will check with the team on Monday when I get back.

from n8n.

stavros-k avatar stavros-k commented on May 18, 2024

Sure, no rush!

I couldn't find any direct calls to os.userInfo() in your codebase, I assume its being done from another package.
Depending on how it is structured, it might be possible to try/catch it. (Assuming that the userInfo is not really required somewhere in n8n.)

Have a good weekend

from n8n.

Joffcom avatar Joffcom commented on May 18, 2024

@netroy do you have any thoughts on this?

from n8n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.