{"record":{"id":"0ca21fb1f0487f57","repo":"netbirdio/netbird","slug":"named-pipes-are-only-supported-on-windows","errorCode":null,"errorMessage":"named pipes are only supported on Windows","messagePattern":"named pipes are only supported on Windows","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/cmd/service_pipe_other.go","lineNumber":13,"sourceCode":"//go:build !windows\n\npackage cmd\n\nimport (\n\t\"fmt\"\n\t\"net\"\n)\n\n// listenNamedPipe is Windows-only: no other platform serves the daemon on a\n// named pipe.\nfunc listenNamedPipe(string) (net.Listener, string, error) {\n\treturn nil, \"\", fmt.Errorf(\"named pipes are only supported on Windows\")\n}\n","sourceCodeStart":1,"sourceCodeEnd":15,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/cmd/service_pipe_other.go#L1-L15","documentation":"The daemon was told to serve on a Windows named pipe, but this build is the non-Windows stub of listenNamedPipe (//go:build !windows), which unconditionally returns an error. Nothing is bound; it is a platform misuse caught at address parsing time.","triggerScenarios":"Passing --daemon-addr npipe://netbird (or a config/saved service params carrying an npipe value) to `netbird service run` on Linux/macOS/FreeBSD.","commonSituations":"Copying a Windows --daemon-addr into a Linux systemd unit; one shared config file used across platforms.","solutions":["Use a platform-appropriate scheme: unix:///var/run/netbird.sock on Linux/macOS, or tcp://127.0.0.1:port where a kernel socket is not possible","Remove the npipe value from shared config or service.json","Reinstall the service with the corrected flag so the bad address is not persisted"],"exampleFix":"# before (on linux)\nnetbird service run --daemon-addr npipe://netbird\n# after\nnetbird service run --daemon-addr unix:///var/run/netbird.sock","handlingStrategy":"validation","validationCode":"if strings.HasPrefix(daemonAddr, \"npipe://\") && runtime.GOOS != \"windows\" {\n\treturn fmt.Errorf(\"npipe:// daemon address %q requires windows; use unix:// or tcp://\", daemonAddr)\n}","typeGuard":"func supportsNamedPipe() bool {\n\treturn runtime.GOOS == \"windows\"\n}","tryCatchPattern":"if _, _, err := listenNamedPipe(name); err != nil {\n\tif runtime.GOOS != \"windows\" {\n\t\t// permanent condition: switch the address scheme instead of retrying\n\t\treturn fallbackToUnixOrTCP()\n\t}\n\treturn err\n}","preventionTips":["Keep per-platform daemon addresses in configs","Validate the scheme against runtime.GOOS before starting the daemon"],"tags":["daemon","named-pipe","platform","configuration","go"],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}