{"record":{"id":"b774fbd9b920376e","repo":"AlistGo/alist","slug":"the-server-returned-an-invalid-slice-size-d","errorCode":null,"errorMessage":"the server returned an invalid slice size %d","messagePattern":"the server returned an invalid slice size (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/123_open/upload.go","lineNumber":83,"sourceCode":"\t\treturn uploadedObj(created.FileID, file, etag), nil\n\t}\n\tif created.PreuploadID == \"\" {\n\t\treturn nil, errors.New(\"the server returned no preuploadID\")\n\t}\n\n\tservers := created.Servers\n\tif len(servers) == 0 {\n\t\tservers, err = d.client.Upload.Domains(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"get upload domains failed: %w\", err)\n\t\t}\n\t}\n\tif len(servers) == 0 {\n\t\treturn nil, errors.New(\"the server returned no upload domain\")\n\t}\n\tsliceSize := created.SliceSize\n\tif sliceSize <= 0 {\n\t\treturn nil, fmt.Errorf(\"the server returned an invalid slice size %d\", sliceSize)\n\t}\n\n\t// slices are uploaded concurrently, so random access to the content is\n\t// required\n\ttmpF, err := file.CacheFullInTempFile()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsliceCount := (size + sliceSize - 1) / sliceSize\n\tif sliceCount == 0 {\n\t\tsliceCount = 1\n\t}\n\tuploadThread := d.UploadThread\n\tif uploadThread <= 0 {\n\t\tuploadThread = 3\n\t}\n\tif int64(uploadThread) > sliceCount {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/123_open/upload.go#L65-L101","documentation":"Error \"the server returned an invalid slice size %d\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/123_open/upload.go:83 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-15T22:17:37.221Z"}