NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.72k stars 13.16k forks source link

Jellyseerr 1.9.2 crashes complaining about uv_os_homedir #325343

Closed andreacoradi closed 2 weeks ago

andreacoradi commented 2 weeks ago

Describe the bug

Jellyseerr service crashes with this error:

node:internal/errors:541
      throw error;
      ^
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_homedir returned ENOENT (no such file or directory)
    at Object.<anonymous> (/nix/store/m8hkws7vm9f8h93j9kfza7b1an9zwyg6-jellyseerr-1.9.2/libexec/jellyseerr/node_modules/resolve/lib/async.js:11:15)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/nix/store/m8hkws7vm9f8h93j9kfza7b1an9zwyg6-jellyseerr-1.9.2/libexec/jellyseerr/node_modules/resolve/index.js:1:13)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/nix/store/m8hkws7vm9f8h93j9kfza7b1an9zwyg6-jellyseerr-1.9.2/libexec/jellyseerr/node_modules/pug-filters/lib/run-filter.js:4:15)
    at Module._compile (node:internal/modules/cjs/loader:1369:14) {
  code: 'ERR_SYSTEM_ERROR',
  info: {
    errno: -2,
    code: 'ENOENT',
    message: 'no such file or directory',
    syscall: 'uv_os_homedir'
  },
  errno: [Getter/Setter],
  syscall: [Getter/Setter]
}
Node.js v20.12.2

Steps To Reproduce

Enable jellyseerr service:

Additional context

I tried to start from scratch by deleting my config, but it doesn't seem to affect it. I randomly added the HOME env variable to the systemd service, and it seems to have fixed it, but not sure about the fix. Example:

  config = mkIf cfg.enable {
    systemd.services.jellyseerr = {
     ...
      environment.HOME = "/var/lib/jellyseerr"; <----- THIS
      serviceConfig = {
     ...

Notify maintainers

@camillemndn

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.12, NixOS, 24.11 (Vicuna), 24.11.20240703.9f4128e`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.4`
 - nixpkgs: `/nix/store/dk2rpyb6ndvfbf19bkb2plcz5y3k8i5v-source`
camillemndn commented 2 weeks ago

HI, I use 1.9.2 and I cannot reproduce the error. Does the service crash directly when it starts?

$> nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.32, NixOS, 24.05 (Uakari), 24.05.20240704.c0d0be0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.90.0-rc1`
 - channels(camille): `"nixos"`
 - channels(root): `""`
 - nixpkgs: `/nix/store/gwdrgcmnnxji8laxiv7zyhi8s1iijcgw-source`
andreacoradi commented 2 weeks ago

I later noticed that also services like prowlarr (and others) lamented not being able to access the home directory, so I don't know anymore if it's a bug specific to jellyseerr. I will have to investigate further.

andreacoradi commented 2 weeks ago

I updated to the latest nixos-unstable, and now I don't see this problem anymore. I am not sure what happened, but I think we can close this one. Sorry for bothering