AlistGo/alist · error

wukong commit upload inner failed: %s

Error message

wukong commit upload inner failed: %s

What it means

Thrown by commitUploadInner when the VOD CommitUploadInner action (POST with SessionKey) returns response metadata with a non-empty Error.Code. Commit finalizes the uploaded data on the VOD/TOS side; failing here means uploaded bytes never became a committed object.

Source

Thrown at drivers/wukong/driver.go:472

	return &resp, nil
}

func (d *Wukong) commitUploadInner(ctx context.Context, auth *uploadAuthTokenResp, spaceName, sessionKey string) (string, error) {
	q := map[string]string{
		"Action":    "CommitUploadInner",
		"Version":   "2020-11-19",
		"SpaceName": spaceName,
	}
	body, _ := json.Marshal(map[string]any{
		"SessionKey": sessionKey,
		"Functions":  []any{},
	})
	var resp commitUploadInnerResp
	if err := d.vodRequest(ctx, http.MethodPost, q, body, auth, &resp); err != nil {
		return "", err
	}
	if resp.ResponseMetadata.Error.Code != "" {
		return "", fmt.Errorf("wukong commit upload inner failed: %s", resp.ResponseMetadata.Error.Message)
	}
	if len(resp.Result.Results) > 0 {
		status := resp.Result.Results[0].URIStatus
		if status != 0 && status != minUploadSubmitSuccess {
			return "", fmt.Errorf("wukong commit upload inner failed: uri_status=%d", status)
		}
	}
	return extractVideoVid(&resp), nil
}

func (d *Wukong) uploadSubmit(ctx context.Context, fatherID, fileName, ext string, fileType int, size int64, md5Hex, storeURI, videoVid string) error {
	var resp uploadSubmitResp
	body := map[string]any{
		"base_info": map[string]any{
			"father_id":    asIDValue(fatherID),
			"file_type":    fileType,
			"size":         size,
			"extension":    ext,

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Retry the whole upload from applyUploadInner with a fresh session and token
  2. Before commit, verify all parts/uploads succeeded (uploadToTOS/multipart finish returned nil)
  3. Refresh auth token right before commit if the upload took long
  4. If the error indicates duplicate commit, re-run uploadSubmit with the previously obtained StoreURI/Vid instead of restarting
Defensive patterns

Strategy: retry

Try / catch

vid, err := d.commitUploadInner(ctx, auth, spaceName, sessionKey)
if err != nil {
    if strings.Contains(err.Error(), "SessionKey") || strings.Contains(err.Error(), "expire") {
        return fmt.Errorf("upload session invalid, restarting full upload: %w", err)
    }
    time.Sleep(time.Second)
    vid, err = d.commitUploadInner(ctx, auth, spaceName, sessionKey)
    if err != nil { return err }
}

Prevention

When it happens

Trigger: Committing with a SessionKey whose upload was incomplete or aborted; token/signature expired during a long upload; SessionKey already committed (double commit); upstream VOD error while finalizing.

Common situations: Multipart upload that lost parts (network drops) then committed anyway; retry logic re-committing the same session; hour-long uploads exceeding token lifetime.

Related errors


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