{"record":{"id":"d0090d9924e07efa","repo":"AlexxIT/go2rtc","slug":"user-pass-not-provided","errorCode":null,"errorMessage":"user/pass not provided","messagePattern":"user/pass not provided","errorType":"validation","errorClass":null,"httpStatus":401,"severity":"error","filePath":"pkg/rtsp/client.go","lineNumber":130,"sourceCode":"\t\tc.uri = u.String() // so auth will be saved on reconnect\n\n\t\t_ = c.conn.Close()\n\n\t\tif err = c.Dial(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\treq.URL = c.URL // because path was changed\n\n\t\treturn c.Do(req)\n\n\tcase http.StatusUnauthorized:\n\t\tswitch c.auth.Method {\n\t\tcase tcp.AuthNone:\n\t\t\tif c.auth.ReadNone(res) {\n\t\t\t\treturn c.Do(req)\n\t\t\t}\n\t\t\treturn nil, errors.New(\"user/pass not provided\")\n\t\tcase tcp.AuthUnknown:\n\t\t\tif c.auth.Read(res) {\n\t\t\t\treturn c.Do(req)\n\t\t\t}\n\t\tdefault:\n\t\t\treturn nil, errors.New(\"wrong user/pass\")\n\t\t}\n\t}\n\n\treturn res, fmt.Errorf(\"wrong response on %s\", req.Method)\n}\n\nfunc (c *Conn) Options() error {\n\treq := &tcp.Request{Method: MethodOptions, URL: c.URL}\n\n\tres, err := c.Do(req)\n\tif err != nil {\n\t\treturn err","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/rtsp/client.go#L112-L148","documentation":"RTSP client Do auth guard: the server answered 401 Unauthorized, the auth method is AuthNone, and ReadNone could not extract credentials from the response — combined with no user/pass having been supplied in the URL. The server demands authentication that the client cannot provide.","triggerScenarios":"Thrown at pkg/rtsp/client.go:130 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add username:password to the RTSP URL (rtsp://user:pass@host/path)","Check for typos in credentials — wrong credentials raise 'wrong user/pass' instead","Use a source without auth if the camera allows anonymous access"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}