AlistGo/alist · critical
not logged in yet: please fill verify_code and save storage
Error message
not logged in yet: please fill verify_code and save storage to finish SMS login
What it means
GuangYaPan ensureAccessToken: the access token is empty, there is no refresh token, SMS login is not fully configured (canSMSLogin() false), but a PhoneNumber is present. This means the user started SMS login but has not supplied the verification code — the driver tells them to fill verify_code and re-save the storage to finish.
Source
Thrown at drivers/guangyapan/driver.go:536
}
}
if parentID == "" {
return "", fmt.Errorf("resolve root folder path failed: folder %q not found under /", name)
}
return "", fmt.Errorf("resolve root folder path failed: folder %q not found under parent %s", name, parentID)
}
func (d *GuangYaPan) ensureAccessToken(ctx context.Context) error {
if strings.TrimSpace(d.AccessToken) != "" {
return nil
}
if strings.TrimSpace(d.RefreshToken) == "" {
if d.canSMSLogin() {
return d.loginBySMSCode(ctx)
}
if d.PhoneNumber != "" {
return errors.New("not logged in yet: please fill verify_code and save storage to finish SMS login")
}
return errors.New("access token is empty")
}
return d.refreshToken(ctx)
}
func (d *GuangYaPan) validateToken(ctx context.Context) error {
var me userMeResp
resp, err := d.accountClient.R().
SetContext(ctx).
SetHeader("Authorization", "Bearer "+d.AccessToken).
SetResult(&me).
Get("/v1/user/me")
if err != nil {
return err
}
if resp.IsError() {
return fmt.Errorf("validate token failed: status=%d body=%s", resp.StatusCode(), resp.String())View on GitHub (pinned to 843d9dc814)
Solutions
- Complete SMS login: fill verify_code (and a fresh captcha_token if expired) and save the storage
- Re-trigger code sending with send_code=true if the SMS expired
- Prefer a long-lived access_token or refresh_token in the config to avoid repeated SMS logins
- Ensure captcha/meta fields are valid — expired captcha makes the SMS path unavailable
Example fix
// before: config state phone_number: "13800138000" verify_code: "" // -> every op fails with this error // after phone_number: "13800138000" verify_code: "123456" captcha_token: "<fresh token>"
Defensive patterns
Strategy: validation
Validate before calling
// Before operations, ensure the storage can authenticate
if strings.TrimSpace(d.AccessToken) == "" && strings.TrimSpace(d.RefreshToken) == "" {
if d.PhoneNumber != "" && (d.VerifyCode == "" || d.CaptchaToken == "") {
return errors.New("SMS login incomplete: fill verify_code (and captcha_token) then save the storage")
}
}
// proceed with the operation Type guard
func smsComplete(d *GuangYaPan) bool {
return d.PhoneNumber != "" && d.VerifyCode != "" && d.CaptchaToken != ""
} Try / catch
if err := op(ctx); err != nil {
if strings.Contains(err.Error(), "not logged in yet") {
// stop retrying; prompt the user to finish SMS login in storage settings
return errors.New("action blocked until SMS login is completed in storage settings")
}
return err
} Prevention
- Finish the SMS login flow in one session: captcha -> send_code -> verify_code -> save
- Prefer storing a refresh_token so logins outlive codes
- Refresh the captcha token if it expires mid-flow
- Treat 'not logged in yet' as a configuration signal — retries cannot fix it
When it happens
Trigger: Any file operation (List, Put, Remove...) invoked when the storage config has phone_number set but verify_code/captcha_token missing and no tokens stored; ensureAccessToken routes into the SMS-incomplete branch.
Common situations: Two-step SMS login abandoned halfway: the code was sent (send_code=true), the user closed the dialog, then browsed the mount; captcha token expired making canSMSLogin false while phone_number lingers.
Related errors
- authn not support
- login failed: provide a valid access_token, or refresh_token
- password not enabled
- webauthn not support
- upload token is incomplete
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/3516a584ca276d77.
Report an issue: GitHub.