AlistGo/alist · error

wukong upload submit failed: code=%d message=%s

Error message

wukong upload submit failed: code=%d message=%s

What it means

Thrown by uploadSubmit after POSTing the completed upload metadata (father_id, file_type, size, md5, StoreURI, Vid) to /netdisk/upload_submit/. The netdisk API returned a non-zero business code, refusing to register the uploaded file in the user's folder tree. Upload bytes already live in TOS/VOD, only the directory entry failed.

Source

Thrown at drivers/wukong/driver.go:521

		body["image_info"] = map[string]any{"uri": storeURI}
	default:
		body["general_info"] = map[string]any{"key": storeURI}
	}
	_, err := d.client.R().
		SetContext(ctx).
		SetQueryParams(map[string]string{
			"aid":             d.Aid,
			"device_platform": "web",
			"language":        d.Language,
		}).
		SetBody(body).
		SetResult(&resp).
		Post("/netdisk/upload_submit/")
	if err != nil {
		return err
	}
	if resp.Code != 0 {
		return fmt.Errorf("wukong upload submit failed: code=%d message=%s", resp.Code, resp.Message)
	}
	return nil
}

func extractVideoVid(resp *commitUploadInnerResp) string {
	for _, item := range resp.Result.Results {
		if item.Vid != "" {
			return item.Vid
		}
	}
	if resp.Result.PluginResult != nil {
		if vid := findStringByKey(resp.Result.PluginResult, "Vid"); vid != "" {
			return vid
		}
		if vid := findStringByKey(resp.Result.PluginResult, "vid"); vid != "" {
			return vid
		}
	}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Verify the destination folder still exists (List father_id) and retry submit once
  2. If the code indicates duplicate, List the folder to check whether the file actually registered and treat as success
  3. Re-login and re-run uploadSubmit with the already-obtained StoreURI/Vid (no need to re-upload bytes)
  4. Check account quota and clear space if the code indicates storage full
Defensive patterns

Strategy: try-catch

Try / catch

if err := d.uploadSubmit(ctx, fatherID, fileName, ext, fileType, size, md5Hex, storeURI, vid); err != nil {
    if isWukongAuthErr(err) {
        return fmt.Errorf("session expired after upload; bytes stored, submit can be retried: %w", err)
    }
    return err
}

Prevention

When it happens

Trigger: father_id pointing at a deleted folder; duplicate submit for the same file (name conflict handling server-side); md5/size metadata inconsistent with what TOS stored; expired Wukong session at submit time.

Common situations: User deletes the destination folder during a long upload; retry logic double-submitting; quota exceeded at the final registration step; session expiring mid-upload.

Related errors


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