{"record":{"id":"85979f74c664452b","repo":"AlistGo/alist","slug":"username-or-password-is-empty","errorCode":null,"errorMessage":"username or password is empty","messagePattern":"username or password is empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/pikpak/util.go","lineNumber":188,"sourceCode":"\t\treturn rawURL\n\t}\n\tfor _, base := range pikPakDomains {\n\t\tif u.Host == base {\n\t\t\tu.Host = domain\n\t\t\treturn u.String()\n\t\t}\n\t\tif strings.HasSuffix(u.Host, \".\"+base) {\n\t\t\tu.Host = strings.TrimSuffix(u.Host, base) + domain\n\t\t\treturn u.String()\n\t\t}\n\t}\n\treturn rawURL\n}\n\nfunc (d *PikPak) login() error {\n\t// 检查用户名和密码是否为空\n\tif d.Addition.Username == \"\" || d.Addition.Password == \"\" {\n\t\treturn errors.New(\"username or password is empty\")\n\t}\n\n\turl := d.userURL(\"/v1/auth/signin\")\n\t// 使用 用户填写的 CaptchaToken —————— (验证后的captcha_token)\n\tif d.GetCaptchaToken() == \"\" {\n\t\tif err := d.RefreshCaptchaTokenInLogin(GetAction(http.MethodPost, url), d.Username); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvar e ErrResp\n\tres, err := base.RestyClient.SetRetryCount(1).R().SetError(&e).SetBody(base.Json{\n\t\t\"captcha_token\": d.GetCaptchaToken(),\n\t\t\"client_id\":     d.ClientID,\n\t\t\"client_secret\": d.ClientSecret,\n\t\t\"username\":      d.Username,\n\t\t\"password\":      d.Password,\n\t}).SetQueryParam(\"client_id\", d.ClientID).Post(url)","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/pikpak/util.go#L170-L206","documentation":"Error \"username or password is empty\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/pikpak/util.go:188 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the referenced value is configured and non-empty, then retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}