{"record":{"id":"87f42906184990db","repo":"AlistGo/alist","slug":"wukong-video-upload-missing-vid-in-commit-response","errorCode":null,"errorMessage":"wukong video upload missing vid in commit response","messagePattern":"wukong video upload missing vid in commit response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/wukong/driver.go","lineNumber":384,"sourceCode":"\t\t\tReader: &driver.SimpleReaderWithSize{Reader: tempFile, Size: size},\n\t\t\tUpdateProgress: func(percent float64) {\n\t\t\t\tup(30 + percent*0.5)\n\t\t\t},\n\t\t}\n\t\tif err = d.uploadToTOS(ctx, node.UploadHost, store.StoreURI, store.Auth, getStorageUserID(store.StorageHeader), crc32Hex, file.GetName(), reader, size); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tup(85)\n\n\tvideoVid, err := d.commitUploadInner(ctx, authToken, chooseCommitSpace(uploadType, authToken.SpaceName), node.SessionKey)\n\tif err != nil {\n\t\treturn err\n\t}\n\tup(92)\n\n\tif fileType == 3000 && videoVid == \"\" {\n\t\treturn errors.New(\"wukong video upload missing vid in commit response\")\n\t}\n\tif err = d.uploadSubmit(ctx, fatherID, file.GetName(), ext, fileType, size, md5Hex, store.StoreURI, videoVid); err != nil {\n\t\treturn err\n\t}\n\tup(100)\n\treturn nil\n}\n\nfunc (d *Wukong) getUploadAuthToken(ctx context.Context, uploadType string) (*uploadAuthTokenResp, error) {\n\tvar resp uploadAuthTokenResp\n\t_, err := d.client.R().\n\t\tSetContext(ctx).\n\t\tSetQueryParams(map[string]string{\n\t\t\t\"upload_source\":   uploadSourceByType(uploadType),\n\t\t\t\"type\":            uploadType,\n\t\t\t\"aid\":             d.Aid,\n\t\t\t\"device_platform\": \"web\",\n\t\t\t\"language\":        d.Language,","sourceCodeStart":366,"sourceCodeEnd":402,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/wukong/driver.go#L366-L402","documentation":"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.","triggerScenarios":"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.","commonSituations":"Uploading non-standard video containers the backend fails to register; provider API change renaming the vid field; racing the backend's async video processing.","solutions":["Retry the upload; silent vid omission is often transient on the video pipeline","Update the wukong driver — the vid field name/path in the commit response may have changed","Test with a plain .mp4 to rule out container/codec issues","If persistent for all videos, report upstream: the commit endpoint is not returning vid for your account type"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"missing vid\") {\n    // commit occasionally lags on the video pipeline; retry the upload\n    time.Sleep(5 * time.Second)\n    return d.Put(ctx, dstDir, file, up)\n}","preventionTips":["Prefer standard .mp4 containers for wukong video uploads","Retry once before reporting failure — vid omission is often transient","Keep driver current against commit-response schema changes"],"tags":["wukong","driver","upload","video","server-side"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}