Closed antony-frolov closed 8 months ago
I am having the exact same issue with a docker compose setup. The program counter in the error message differs from the one above, but the call stack is the same.
I'm running ntfy 2.8.0 (aaa4976), runtime go1.21.3, built at 2023-11-19T21:51:43Z
This is wild. The thing that's failing is the user.Current()
call, which means that Go cannot determine the current Linux/Windows user. I added logging here https://github.com/binwiederhier/ntfy/commit/ef302d22a981b2fab8b47777b8ebf068507e5091 so we can get an error message, and avoid a panic.
Once I release this (which should be shortly), you can give me more details on the error.
Can you try again with the latest release and give me the error message?
tried the same command with the latest release and it works fine! so the issue is solved for me i guess
Does it print a warning?
it does
2024/03/25 16:37:22 WARN Could not determine default client config file: could not determine current user: user: unknown userid 451693
This fails: https://github.com/binwiederhier/ntfy/blob/main/cmd/subscribe.go#L328-L331
This is a Go standard library call to determine the current user. If this fails, something on your system regarding your current user is unusual or wrong. Check if id
, cat /etc/passwd | grep $USER
and echo $USER
all add up.
there is indeed something unusual, user info on our VMs is stored not in /etc/passwd
but in some database common for all VMs i guess. so i can only get my user info with getent passwd $USER
I would have thought that Go does that under the hood :shrug:
:lady_beetle: Describe the bug
Got a segfault error when running publish command. Installed ntfy with nix on ubuntu 18.04.
:computer: Components impacted
ntfy server
:bulb: Screenshots and/or logs
:crystal_ball: Additional context