AlistGo/alist · error

wukong get upload candidates failed: %s

Error message

wukong get upload candidates failed: %s

What it means

Thrown by getUploadCandidates after a signed GET (Action=GetUploadCandidates, SpaceName=wukong_netdisk_ugc) against vod.bytedanceapi.com. The VOD response metadata carries a non-empty Error.Code, so the driver surfaces Error.Message. This call selects upload hosts/candidates and precedes ApplyUploadInner.

Source

Thrown at drivers/wukong/driver.go:426

	}
	if resp.Code != 0 {
		return nil, fmt.Errorf("wukong get upload auth token failed: code=%d message=%s", resp.Code, resp.Message)
	}
	return &resp, nil
}

func (d *Wukong) getUploadCandidates(ctx context.Context, auth *uploadAuthTokenResp) (*getUploadCandidatesResp, error) {
	q := map[string]string{
		"Action":    "GetUploadCandidates",
		"Version":   "2020-11-19",
		"SpaceName": videoSpaceName,
	}
	var resp getUploadCandidatesResp
	if err := d.vodRequest(ctx, http.MethodGet, q, nil, auth, &resp); err != nil {
		return nil, err
	}
	if resp.ResponseMetadata.Error.Code != "" {
		return nil, fmt.Errorf("wukong get upload candidates failed: %s", resp.ResponseMetadata.Error.Message)
	}
	return &resp, nil
}

func (d *Wukong) applyUploadInner(ctx context.Context, auth *uploadAuthTokenResp, uploadType string, fileSize int64, bestHosts string) (*applyUploadInnerResp, error) {
	spaceName := auth.SpaceName
	if uploadType == "video" {
		spaceName = videoSpaceName
	}
	q := map[string]string{
		"Action":          "ApplyUploadInner",
		"Version":         "2020-11-19",
		"SpaceName":       spaceName,
		"FileType":        uploadType,
		"IsInner":         "1",
		"ClientBestHosts": bestHosts,
		"NeedFallback":    "true",
		"FileSize":        strconv.FormatInt(fileSize, 10),

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Refresh the upload auth token (re-run getUploadAuthToken) and retry candidates once
  2. Sync system clock (NTP) so the x-amz-date signature is valid
  3. Confirm the account can upload videos in the Wukong web UI, proving the space is enabled
  4. If Error.Message mentions signature/auth, re-login entirely and restart the Put
Defensive patterns

Strategy: retry

Try / catch

cand, err := d.getUploadCandidates(ctx, auth)
if err != nil {
    if strings.Contains(err.Error(), "Signature") || strings.Contains(err.Error(), "Token") {
        auth, aerr := d.getUploadAuthToken(ctx, uploadType)
        if aerr == nil {
            cand, err = d.getUploadCandidates(ctx, auth)
        }
    }
    if err != nil { return err }
}

Prevention

When it happens

Trigger: The VOD security token from auth_token is expired or scoped to a different space; SpaceName wukong_netdisk_ugc is not authorized for the account; signature (AWS-style x-amz signing) mismatch due to clock skew; upstream VOD service error.

Common situations: Slow uploads where the token expired between minting and candidate selection; system clock out of sync breaking x-amz-date signing; Wukong backend changing the video space name; regional VOD outage.

Related errors


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