{"record":{"id":"24ae9d1171bdf94a","repo":"hashicorp/packer","slug":"error-reading-checksum-file-s","errorCode":null,"errorMessage":"Error reading checksum file: %s","messagePattern":"Error reading checksum file: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/plugin-getter/github/getter.go","lineNumber":61,"sourceCode":"\tVersions map[string]PluginVersion `json:\"versions\"`\n}\n\ntype PluginVersion struct {\n\tName    string `json:\"name\"`\n\tVersion string `json:\"version\"`\n}\n\nfunc TransformChecksumStream() func(in io.ReadCloser) (io.ReadCloser, error) {\n\treturn func(in io.ReadCloser) (io.ReadCloser, error) {\n\t\tdefer in.Close()\n\t\trd := bufio.NewReader(in)\n\t\tbuffer := bytes.NewBufferString(\"[\")\n\t\tjson := json.NewEncoder(buffer)\n\t\tfor i := 0; ; i++ {\n\t\t\tline, err := rd.ReadString('\\n')\n\t\t\tif err != nil {\n\t\t\t\tif err != io.EOF {\n\t\t\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\t\t\"Error reading checksum file: %s\", err)\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tparts := strings.Fields(line)\n\t\t\tswitch len(parts) {\n\t\t\tcase 2: // nominal case\n\t\t\t\tchecksumString, checksumFilename := parts[0], parts[1]\n\n\t\t\t\tif i > 0 {\n\t\t\t\t\t_, _ = buffer.WriteString(\",\")\n\t\t\t\t}\n\t\t\t\tif err := json.Encode(struct {\n\t\t\t\t\tChecksum string `json:\"checksum\"`\n\t\t\t\t\tFilename string `json:\"filename\"`\n\t\t\t\t}{\n\t\t\t\t\tChecksum: checksumString,\n\t\t\t\t\tFilename: checksumFilename,","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/plugin-getter/github/getter.go#L43-L79","documentation":"When parsing GitHub's checksum/tag file line by line, a read error other than io.EOF aborts parsing with this error. It wraps the underlying reader failure, so the checksum file content could not be fully retrieved from the network.","triggerScenarios":"Streaming the checksum file from a GitHub release URL and the HTTP body read fails with a non-EOF error: connection reset, TLS error, or proxy interruption — anything where rd.ReadString('\\n') returns err != nil && err != io.EOF.","commonSituations":"Corporate proxy or firewall cutting the connection; GitHub rate-limiting or transient 5xx behind a streaming reader; flaky VPN/network during `packer init`.","solutions":["Retry `packer init` — this is typically a transient network error.","Check proxy settings (HTTP_PROXY/HTTPS_PROXY) and corporate TLS interception.","Verify connectivity to github.com/objects.githubusercontent.com.","If persistent, download the checksum file manually and use a local file source."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"resp, err := http.Get(checksumURL)\nif err == nil && resp.StatusCode != http.StatusOK {\n    return fmt.Errorf(\"checksum endpoint returned %d\", resp.StatusCode)\n}","typeGuard":null,"tryCatchPattern":"for attempt := 0; attempt < 3; attempt++ {\n    err := installPlugins()\n    if err == nil || !isNetworkErr(err) { break }\n    time.Sleep(time.Duration(1<<attempt) * time.Second)\n}","preventionTips":["Run plugin installs on stable networks or with retry wrappers in CI.","Configure proxy/TLS settings correctly (HTTPS_PROXY, custom CAs).","Watch for GitHub rate limits and add authentication or backoff."],"tags":["network","http","github","checksum"],"backgroundTag":"connection-reset","analyzedSha":"eb36e3c3e48a036f3e8cc94087636ee72e1303c9","analyzedAt":"2026-09-05T13:20:43.127Z","contentChangedAt":"2026-09-05T13:20:43.127Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}