AlistGo/alist · error

cookie is invalid

Error message

cookie is invalid

What it means

Error "cookie is invalid" thrown in AlistGo/alist.

Source

Thrown at drivers/quqi/util.go:82

	}
	if resp != nil {
		err = utils.Json.Unmarshal(res.Body(), resp)
		if err != nil {
			return nil, err
		}
	}
	return res, nil
}

func (d *Quqi) login() error {
	if d.Addition.Cookie != "" {
		d.Cookie = d.Addition.Cookie
	}
	if d.checkLogin() {
		return nil
	}
	if d.Cookie != "" {
		return errors.New("cookie is invalid")
	}
	if d.Phone == "" {
		return errors.New("phone number is empty")
	}
	if d.Password == "" {
		return errs.EmptyPassword
	}

	resp, err := d.request("", "/auth/person/v2/login/password", resty.MethodPost, func(req *resty.Request) {
		req.SetFormData(map[string]string{
			"phone":    d.Phone,
			"password": base64.StdEncoding.EncodeToString([]byte(d.Password)),
		})
	}, nil)
	if err != nil {
		return err
	}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Update the cookie in the storage configuration with a fresh one from an authenticated browser session.

When it happens

Trigger: Thrown at drivers/quqi/util.go:82 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/08f4a55110f24194. Report an issue: GitHub.