{"record":{"id":"9f28ead7d01db504","repo":"AlistGo/alist","slug":"failed-to-start-download","errorCode":null,"errorMessage":"Failed to start download","messagePattern":"Failed to start download","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"drivers/proton_drive/util.go","lineNumber":219,"sourceCode":"\tif rangeHeader != \"\" {\n\n\t\t// Parse range header like \"bytes=0-1023\" or \"bytes=1024-\"\n\t\tranges, err := parseRange(rangeHeader, fileSize)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Invalid range\", http.StatusRequestedRangeNotSatisfiable)\n\t\t\treturn\n\t\t}\n\n\t\tif len(ranges) == 1 {\n\n\t\t\t// Single range request, small\n\t\t\tstart, end := ranges[0].start, ranges[0].end\n\t\t\tcontentLength := end - start + 1\n\n\t\t\t// Start download from offset\n\t\t\treader, _, _, err := d.protonDrive.DownloadFile(r.Context(), link, start)\n\t\t\tif err != nil {\n\t\t\t\thttp.Error(w, \"Failed to start download\", http.StatusInternalServerError)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tdefer reader.Close()\n\n\t\t\tw.Header().Set(\"Content-Range\", fmt.Sprintf(\"bytes %d-%d/%d\", start, end, fileSize))\n\t\t\tw.Header().Set(\"Content-Length\", fmt.Sprintf(\"%d\", contentLength))\n\t\t\tw.Header().Set(\"Content-Type\", mime.TypeByExtension(filepath.Ext(link.Name)))\n\n\t\t\t// Partial content...\n\t\t\t// Setting fileName is more cosmetical here\n\t\t\t//.Header().Set(\"Content-Disposition\", fmt.Sprintf(\"attachment; filename=\\\"%s\\\"\", link.Name))\n\t\t\tw.Header().Set(\"Content-Disposition\", fmt.Sprintf(\"attachment; filename=\\\"%s\\\"\", info.FileName))\n\t\t\tw.Header().Set(\"Accept-Ranges\", \"bytes\")\n\n\t\t\tw.WriteHeader(http.StatusPartialContent)\n\n\t\t\tio.CopyN(w, reader, contentLength)\n\t\t\treturn","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/proton_drive/util.go#L201-L237","documentation":"Error \"Failed to start download\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/proton_drive/util.go:219 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation."],"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"}