{"record":{"id":"4b5142ea89e288e0","repo":"AlistGo/alist","slug":"upload-failed-empty-response","errorCode":null,"errorMessage":"upload failed, empty response","messagePattern":"upload failed, empty response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/ilanzou/driver.go","lineNumber":365,"sourceCode":"\t\t}\n\t\ttoken = utils.Json.Get(res.Body(), \"token\").ToString()\n\t}\n\t// commit upload\n\tvar resp UploadResultResp\n\tfor i := 0; i < 10; i++ {\n\t\t_, err = d.unproved(\"/7n/results\", http.MethodPost, func(req *resty.Request) {\n\t\t\tparams := []string{\n\t\t\t\t\"tokenList=\" + token,\n\t\t\t\t\"tokenTime=\" + time.Now().Format(\"Mon Jan 02 2006 15:04:05 GMT-0700 (MST)\"),\n\t\t\t}\n\t\t\tqueryString := strings.Join(params, \"&\")\n\t\t\treq.SetQueryString(queryString).SetResult(&resp)\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif len(resp.List) == 0 {\n\t\t\treturn nil, fmt.Errorf(\"upload failed, empty response\")\n\t\t}\n\t\tif resp.List[0].Status == 1 {\n\t\t\tbreak\n\t\t}\n\t\ttime.Sleep(time.Second * 1)\n\t}\n\tfile := resp.List[0]\n\tif file.Status != 1 {\n\t\treturn nil, fmt.Errorf(\"upload failed, status: %d\", resp.List[0].Status)\n\t}\n\treturn &model.Object{\n\t\tID: strconv.FormatInt(file.FileId, 10),\n\t\t//Path:     ,\n\t\tName:     file.FileName,\n\t\tSize:     s.GetSize(),\n\t\tModified: s.ModTime(),\n\t\tCtime:    s.CreateTime(),\n\t\tIsFolder: false,","sourceCodeStart":347,"sourceCodeEnd":383,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/ilanzou/driver.go#L347-L383","documentation":"Thrown by ILanZou's upload completion path after polling POST /7n/results: the API answered but resp.List is empty, so there is no upload-status record to inspect. The token-based poll found no matching upload result for the token submitted.","triggerScenarios":"Polling too early or after the server expired the result record; the token from the upload phase mismatched (encoding issue in the tokenList param); upload actually failed server-side and the result entry was never created.","commonSituations":"The 1-second poll loop iterating many times until the record expires; time skew in tokenTime (formatted in MST) causing token rejection; upstream API change dropping the results endpoint contract.","solutions":["Retry the whole upload from the start — an empty result list is not recoverable by further polling.","Verify the token and tokenTime encoding match what the upload step returned (exact format string, URL-encoding of the token).","If persistent, capture the raw /7n/results response body — a login/API-contract change may be returning an error envelope that decodes to an empty list.","Check the driver version for fixes to the results-polling contract."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"obj, err := d.Put(ctx, dstDir, stream, up)\nif err != nil && strings.Contains(err.Error(), \"upload failed, empty response\") {\n    stream.Reset() // if the stream supports re-reading\n    obj, err = d.Put(ctx, dstDir, stream, up)\n}\nif err != nil { return err }","preventionTips":["Make upload streams rewindable so whole-upload retry is possible","Match the tokenTime format exactly when reimplementing the poll","Inspect raw /7n/results responses during integration debugging"],"tags":["ilanzou","upload","polling","empty-response"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}