AlistGo/alist · error

login failed,No toUrl obtained, msg

Error message

login failed,No toUrl obtained, msg: %s

What it means

Raised in Cloud189PC.login when the loginSubmit.do call succeeds but the response's ToUrl field is empty: 189's login endpoint refused the credentials (wrong password, captcha mismatch) and included its reason in msg, which is embedded in this error.

Solutions

  1. Check the account credentials in the storage configuration and correct them, then save and retry.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at drivers/189pc/utils.go:343 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/9420fc7b9edc3f81. Report an issue: GitHub.

Appendix: source

Thrown at drivers/189pc/utils.go:343

			"userName":     param.RsaUsername,
			"password":     param.RsaPassword,
			"validateCode": y.VCode,
			"captchaToken": param.CaptchaToken,
			"returnUrl":    RETURN_URL,
			// "mailSuffix":   "@189.cn",
			"dynamicCheck": "FALSE",
			"clientType":   CLIENT_TYPE,
			"cb_SaveName":  "1",
			"isOauth2":     "false",
			"state":        "",
			"paramId":      param.ParamId,
		}).
		Post(AUTH_URL + "/api/logbox/oauth2/loginSubmit.do")
	if err != nil {
		return err
	}
	if loginresp.ToUrl == "" {
		return fmt.Errorf("login failed,No toUrl obtained, msg: %s", loginresp.Msg)
	}

	// 获取Session
	var erron RespErr
	var tokenInfo AppSessionResp
	_, err = y.client.R().
		SetResult(&tokenInfo).SetError(&erron).
		SetQueryParams(clientSuffix()).
		SetQueryParam("redirectURL", loginresp.ToUrl).
		Post(API_URL + "/getSessionForPC.action")
	if err != nil {
		return
	}

	if erron.HasError() {
		return &erron
	}
	if tokenInfo.ResCode != 0 {

View on GitHub (pinned to 843d9dc814)