AlistGo/alist · error

wukong video upload missing vid in commit response

Error message

wukong video upload missing vid in commit response

What it means

Thrown at the end of a Wukong video upload (fileType 3000) when commitUploadInner returns an empty vid. For video files the two-phase flow is: commit the uploaded data to get a vid, then uploadSubmit registers the file with that vid. An empty vid means the commit step acknowledged the upload but did not return a video ID, so submission cannot reference the stored video.

Source

Thrown at drivers/wukong/driver.go:384

			Reader: &driver.SimpleReaderWithSize{Reader: tempFile, Size: size},
			UpdateProgress: func(percent float64) {
				up(30 + percent*0.5)
			},
		}
		if err = d.uploadToTOS(ctx, node.UploadHost, store.StoreURI, store.Auth, getStorageUserID(store.StorageHeader), crc32Hex, file.GetName(), reader, size); err != nil {
			return err
		}
	}
	up(85)

	videoVid, err := d.commitUploadInner(ctx, authToken, chooseCommitSpace(uploadType, authToken.SpaceName), node.SessionKey)
	if err != nil {
		return err
	}
	up(92)

	if fileType == 3000 && videoVid == "" {
		return errors.New("wukong video upload missing vid in commit response")
	}
	if err = d.uploadSubmit(ctx, fatherID, file.GetName(), ext, fileType, size, md5Hex, store.StoreURI, videoVid); err != nil {
		return err
	}
	up(100)
	return nil
}

func (d *Wukong) getUploadAuthToken(ctx context.Context, uploadType string) (*uploadAuthTokenResp, error) {
	var resp uploadAuthTokenResp
	_, err := d.client.R().
		SetContext(ctx).
		SetQueryParams(map[string]string{
			"upload_source":   uploadSourceByType(uploadType),
			"type":            uploadType,
			"aid":             d.Aid,
			"device_platform": "web",
			"language":        d.Language,

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Retry the upload; silent vid omission is often transient on the video pipeline
  2. Update the wukong driver — the vid field name/path in the commit response may have changed
  3. Test with a plain .mp4 to rule out container/codec issues
  4. If persistent for all videos, report upstream: the commit endpoint is not returning vid for your account type
Defensive patterns

Strategy: retry

Try / catch

if err != nil && strings.Contains(err.Error(), "missing vid") {
    // commit occasionally lags on the video pipeline; retry the upload
    time.Sleep(5 * time.Second)
    return d.Put(ctx, dstDir, file, up)
}

Prevention

When it happens

Trigger: Uploading a file classified as video (fileType 3000): commitUploadInner succeeds (no transport/code error) but the parsed video vid field is empty — backend transcode/pipeline lag, schema change in the commit response, or the upload session data was rejected silently.

Common situations: Uploading non-standard video containers the backend fails to register; provider API change renaming the vid field; racing the backend's async video processing.

Related errors


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