{"record":{"id":"08f4a55110f24194","repo":"AlistGo/alist","slug":"cookie-is-invalid","errorCode":null,"errorMessage":"cookie is invalid","messagePattern":"cookie is invalid","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/quqi/util.go","lineNumber":82,"sourceCode":"\t}\n\tif resp != nil {\n\t\terr = utils.Json.Unmarshal(res.Body(), resp)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn res, nil\n}\n\nfunc (d *Quqi) login() error {\n\tif d.Addition.Cookie != \"\" {\n\t\td.Cookie = d.Addition.Cookie\n\t}\n\tif d.checkLogin() {\n\t\treturn nil\n\t}\n\tif d.Cookie != \"\" {\n\t\treturn errors.New(\"cookie is invalid\")\n\t}\n\tif d.Phone == \"\" {\n\t\treturn errors.New(\"phone number is empty\")\n\t}\n\tif d.Password == \"\" {\n\t\treturn errs.EmptyPassword\n\t}\n\n\tresp, err := d.request(\"\", \"/auth/person/v2/login/password\", resty.MethodPost, func(req *resty.Request) {\n\t\treq.SetFormData(map[string]string{\n\t\t\t\"phone\":    d.Phone,\n\t\t\t\"password\": base64.StdEncoding.EncodeToString([]byte(d.Password)),\n\t\t})\n\t}, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/quqi/util.go#L64-L100","documentation":"Error \"cookie is invalid\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/quqi/util.go:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Update the cookie in the storage configuration with a fresh one from an authenticated browser session."],"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-15T17:31:12.345Z"}