{"record":{"id":"4d9ebd8cfee9a30f","repo":"AlistGo/alist","slug":"calculate-md5-of-slice-d-failed-w","errorCode":null,"errorMessage":"calculate md5 of slice %d failed: %w","messagePattern":"calculate md5 of slice (.+?) failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/123_open/upload.go","lineNumber":118,"sourceCode":"\t}\n\tif int64(uploadThread) > sliceCount {\n\t\tuploadThread = int(sliceCount)\n\t}\n\n\tprogress := &uploadProgress{total: size, up: up}\n\tthreadG, uploadCtx := errgroup.WithContext(ctx)\n\tthreadG.SetLimit(uploadThread)\n\tfor i := int64(0); i < sliceCount; i++ {\n\t\tif utils.IsCanceled(uploadCtx) {\n\t\t\tbreak\n\t\t}\n\t\tsliceNo := i + 1\n\t\toffset := i * sliceSize\n\t\tlength := min(sliceSize, size-offset)\n\t\tthreadG.Go(func() error {\n\t\t\tsliceMD5, err := utils.HashReader(utils.MD5, io.NewSectionReader(tmpF, offset, length))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"calculate md5 of slice %d failed: %w\", sliceNo, err)\n\t\t\t}\n\t\t\treader := &progressReader{\n\t\t\t\tReader:   io.NewSectionReader(tmpF, offset, length),\n\t\t\t\tprogress: progress,\n\t\t\t}\n\t\t\tserver := servers[int(i)%len(servers)]\n\t\t\terr = d.client.Upload.UploadSlice(uploadCtx, server, created.PreuploadID, sliceNo, sliceMD5,\n\t\t\t\tdriver.NewLimitedUploadStream(uploadCtx, reader))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"upload slice %d failed: %w\", sliceNo, err)\n\t\t\t}\n\t\t\treturn nil\n\t\t})\n\t}\n\tif err := threadG.Wait(); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := ctx.Err(); err != nil {","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/123_open/upload.go#L100-L136","documentation":"Error \"calculate md5 of slice %d failed: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/123_open/upload.go:118 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}