Go
Go build, module, and test failures - diagnosed.
Fix Go CI failures: module resolution and checksum errors, build constraints, proxy timeouts, and test failures. Practical fixes for go build, go mod, and go test.
Modules & proxy
go.sum, checksum mismatches, and GOPROXY.
"no vendor directory"Fix Go "-mod=vendor flag specified but no vendor directory was found" in CI - vendoring forced via GOFLAGS bu…
"403 Forbidden" (private module)Fix Go "403 Forbidden" fetching a private module in CI - auth is missing or it was routed through the public…
"410 Gone" from proxyFix Go "410 Gone" fetching a module from the proxy in CI - a missing version or a transient proxy hiccup. Pin…
"found in multiple modules"Fix Go "ambiguous import: found in multiple modules" in CI - a package path is provided by two modules. Drop…
"ambiguous import"Fix Go "ambiguous import: found package ... in multiple modules" in CI - one import path provided by two modu…
"ambiguous import"Fix Go "ambiguous import: found package in multiple modules" in CI - two required modules provide the same im…
"cannot determine module path"Fix Go "cannot determine module path for source directory" in CI - go mod init with no argument in a director…
"cannot find main module"Fix Go "cannot find main module; see go help modules" in CI - the command ran outside any module root. Run fr…
"cannot find main module"Fix Go "cannot find main module; see go help modules" and "go.mod file not found in current directory or any…
"cannot find module providing package"Fix Go "cannot find module providing package X" in CI - an imported package is not required by go.mod. Add th…
"cannot find module providing package"Fix Go "no required module provides package; to add it: go get" in CI - an import has no matching require in…
"cannot find package ... in GOPATH"Fix Go "cannot find package ... in any of (GOROOT/GOPATH)" in CI - GO111MODULE=off forced legacy GOPATH resol…
"cannot find package (vendor stale)"Fix Go "cannot find package" in CI when the vendor directory is stale - go.mod added a dependency that was ne…
"malformed module path"Fix Go "cannot load X: malformed module path" in CI - an import or module line is not a valid module path. Co…
"checksum mismatch"Fix Go "verifying module: checksum mismatch" in CI -- the downloaded module hash does not match go.sum, from…
"checksum mismatch"Fix Go "checksum mismatch" / "verifying module: checksum mismatch" in CI - go.sum disagrees with the download…
"checksum mismatch"Fix Go "verifying module: checksum mismatch" and "SECURITY ERROR" in CI - a module hash no longer matches go.…
"expects import path"Fix Go "code in directory ... expects import path ..." in CI - a package import comment (// import "...") tha…
"lookup proxy.golang.org: no such host"Fix Go "dial tcp: lookup proxy.golang.org: no such host" in CI - a DNS resolution failure reaching the module…
"does not contain main module"Fix Go "directory prefix X does not contain main module or its selected dependencies" in CI - the command ran…
"download X: dial tcp i/o timeout"Fix Go "download X: dial tcp ...: i/o timeout" in CI - a transient network failure reaching the module proxy.…
"error loading module requirements"Fix Go "error loading module requirements" in CI - Go could not resolve the full module graph, often a bad re…
"errors parsing go.mod"Fix Go "errors parsing go.mod" in CI - an unknown directive, a bad merge conflict marker, or invalid syntax t…
"fork/exec: permission denied"Fix Go "fork/exec ...: permission denied" running a tool from the module cache in CI - a non-executable or wr…
"does not contain package"Fix Go "module ... found (vX.Y.Z), but does not contain package ..." in CI - the module resolves but the subp…
"go install requires go >= 1.X"Fix Go "go install pkg@version: ... requires go >= 1.X" in CI - a tool whose go.mod needs a newer toolchain t…
"requires a version when current directory is not in a module"Fix Go "go install: X: requires a version when current directory is not in a module" in CI - add an @version…
"go mod tidy" errorsFix Go "go mod tidy" failures in CI - unresolved imports, "updates to go.mod needed", or a tidy that fails be…
"go mod verify" failedFix Go "go mod verify" failures in CI - "dir has been modified" or hash mismatch in the module cache from a c…
"go mod why" says not neededFix confusion when Go "go mod why" reports a module is not needed in CI - an indirect dependency that tidy wa…
toolchain download failedFix transient Go toolchain download failures in CI - "go: downloading go1.X" fails with a timeout or 5xx when…
"go.mod file not found"Fix Go "go.mod file not found in current directory or any parent directory" in CI - the job ran outside the m…
"go.mod inconsistent (readonly)"Fix Go failing under -mod=readonly because go.mod/go.sum are out of date in CI - run go mod tidy locally and…
"go.mod requires go >= 1.X"Fix Go "go.mod requires go >= 1.X (running go 1.Y)" in CI - a dependency raised the required toolchain and GO…
"requires go >= ... (GOTOOLCHAIN=local)"Fix Go "go.mod requires go >= 1.22 (running go 1.21; GOTOOLCHAIN=local)" in CI - the go directive demands a n…
"requires go >= 1.xx"Fix Go "go.mod requires go >= 1.xx (running go 1.yy)" in CI - the toolchain is older than the go directive. B…
"requires go >= X (running go Y)"Fix Go "go.mod requires go >= 1.X (running go 1.Y)" in CI - the installed toolchain is older than the go dire…
"go.work lists ... at both"Fix Go "go.work lists module ... at both ... and ..." in CI - two use directives map to the same module path,…
bad GOFLAGS / GONOSUMCHECKFix Go "GOFLAGS: ... cannot be set" and unrecognized GONOSUMCHECK/GONOSUMDB in CI - a malformed environment v…
"import cycle not allowed"Fix Go "import cycle not allowed" build errors in CI - two or more packages import each other, which Go forbi…
"import cycle not allowed"Fix Go "import cycle not allowed" in CI - two or more packages import each other directly or transitively. Br…
"inconsistent vendoring; go mod vendor"Fix Go "inconsistent vendoring; to sync run go mod vendor" in CI - vendor/modules.txt no longer matches go.mo…
"inconsistent vendoring"Fix Go "inconsistent vendoring" in CI - vendor/modules.txt does not match go.mod. Re-run go mod vendor and co…
"inconsistent vendoring"Fix Go "inconsistent vendoring" in CI - vendor/modules.txt does not match go.mod because vendor/ was not rege…
"go get ... not supported"Fix Go "go get: installing executables with go get in module mode is no longer supported" in CI - use go inst…
"invalid go version"Fix Go "invalid go version '1.21.0'" / "must match format 1.23" in CI - a malformed go or toolchain directive…
"invalid version: unknown revision"Fix Go "invalid version: unknown revision" in CI - a require or go get points at a tag, branch, or commit the…
"invalid version: unknown revision"Fix Go "invalid version: unknown revision" in CI - the requested module version is not a real tag, commit, or…
"invalid version"Fix Go "invalid version: unknown revision" / malformed version in CI - the requested module version is not a…
"malformed module path: missing dot"Fix Go "malformed module path: missing dot in first path element" in CI - the module path is not a valid host…
"malformed module path"Fix Go "malformed module path ...: missing dot in first path element" in CI - a module name without a domain…
missing deps in go.workFix Go workspace "missing dependencies" / go.work resolution errors in CI - a use directive points at a missi…
"missing go.sum entry"Fix Go "missing go.sum entry for module providing package" in CI - go.sum lacks a checksum the readonly build…
"missing go.sum entry; go mod download"Fix Go "missing go.sum entry for module; to add it, run go mod download" in CI - go.sum lacks a checksum the…
"missing go.sum entry"Fix Go "missing go.sum entry for module" in CI - go.sum lacks a hash a build needs because tidy was not run o…
"module path mismatch"Fix Go "module declares its path as X but was required as Y" in CI - the imported module path disagrees with…
"declares its path as ..."Fix Go "module declares its path as: X but was required as: Y" in CI - a require or replace points at a path…
"module found, no package"Fix Go "module X found (vY), but does not contain package X/sub" in CI - the module resolves but the subpacka…
"no required module provides package"Fix Go "no required module provides package X; to add it run go get" in CI - an import is not backed by any r…
"package X is not in std"Fix Go "package X is not in std" in CI - Go looked for a non-stdlib import in the standard library and did no…
"reading X: 404/410"Fix Go "reading https://proxy.golang.org/...: 404 Not Found / 410 Gone" in CI - a missing version or a transi…
"relative import paths are not supported"Fix Go "local import ... in non-local package" / "relative import paths are not supported in module mode" in…
versioned replace not foundFix Go versioned replace-directive failures in CI - "replacement version ... does not exist" or "must be a va…
"replacement directory ... does not exist"Fix Go "replacement directory ../local-fork does not exist" in CI - a replace directive points at a local pat…
"toolchain not available"Fix Go "toolchain X not available" / GOTOOLCHAIN download failures in CI - Go could not obtain the required t…
"unknown directive: toolchain"Fix Go "unknown directive: toolchain" in CI - go.mod has a toolchain line an older Go cannot parse. Upgrade G…
"unknown directive"Fix Go "go.mod: unknown directive: X" in CI - go.mod contains a directive this Go version does not understand…
"updates to go.mod needed, disabled"Fix Go "updates to go.mod needed, disabled by -mod=..." in CI - a readonly build found a change the committed…
"updates to go.mod needed"Fix Go "updates to go.mod needed; disabled by -mod=readonly" in CI - a readonly build found a required change…
"updates to go.mod needed"Fix Go "updates to go.mod needed; disabled by -mod=readonly" in CI - a readonly build found a required change…
"updates to go.sum needed"Fix Go "missing go.sum entry; to add it: go mod download" in CI - go.sum lacks checksums. Add them locally an…
"usage: require module/path v1.2.3"Fix Go "go.mod: usage: require module/path v1.2.3" in CI - a require line is missing its version or has the w…
"verifying ...: 404 Not Found"Fix Go "verifying module: ... 404 Not Found" in CI for modules behind a custom or internal proxy - the public…
"checksum mismatch"Fix Go "verifying module: checksum mismatch" in CI - go.sum disagrees with the downloaded module. Resolve a r…
"verifying X: checksum mismatch"Fix Go "verifying module: checksum mismatch" against the sum database in CI - the downloaded bytes do not mat…
"certificate signed by unknown authority"Fix Go "x509: certificate signed by unknown authority" fetching modules in CI - a TLS-intercepting proxy pres…
"fork/exec gcc: no such file"Fix Go cgo "fork/exec /usr/bin/gcc: no such file or directory" in CI - CGO_ENABLED=1 needs a C compiler the r…
sum.golang.org failureFix Go checksum-database failures in CI - "verifying module: ... sum.golang.org: 404" or a timeout reaching t…
exclude directive problemsFix Go exclude-directive surprises in CI - a version "excluded by go.mod" that breaks resolution, or an exclu…
GOFLAGS=-mod=readonly conflictFix Go GOFLAGS=-mod=readonly conflicting with a command that needs -mod=mod in CI - readonly blocks the go.mo…
"410 Gone" / "404 Not Found"Fix Go module proxy errors in CI - "reading proxy.golang.org/... 410 Gone" or 404 - a removed version, a priv…
toolchain not availableFix Go "GOTOOLCHAIN=auto" download failures in CI - "toolchain not available" or a download blocked by GOTOOL…
proxy i/o timeoutFix Go module download "i/o timeout" / connection reset from the proxy in CI - a transient network failure. A…
proxy download timeoutFix transient Go module download failures in CI - GOPROXY 5xx, "i/o timeout", or "connection reset" while fet…
private module 410 / authFix Go private module "410 Gone" or auth failures in CI - the proxy/sum DB cannot reach a private repo. Set G…
private module auth failsFix Go private module fetch failures in CI - "fatal: could not read Username", "terminal prompts disabled", o…
broken replace directiveFix Go replace-directive failures in CI - a local replace path that does not exist on the runner, or a replac…
go.work errorsFix Go workspace failures in CI - "go.work file not found", a use directive pointing at a missing module, or…
Build & compile
Build constraints, cgo, and linker errors.
"//go:build" ignoredFix Go build constraints that are silently ignored in CI - a //go:build line not at the top of the file, or m…
"no matching files found"Fix Go //go:embed failures in CI - "no matching files found", "pattern ... matches no files", or "cannot embe…
"//go:generate" ignoredFix Go go:generate directives that do nothing in CI - a space after //, a typo in the magic comment, or a dir…
"//go:linkname" errorsFix Go //go:linkname failures in CI - "must refer to declared function or variable", a missing import "unsafe…
"# command-line-arguments"Fix Go "# command-line-arguments" build errors in CI - what it means when you build individual .go files inst…
"build cache is required, but could not be located"Fix Go "build cache is required, but could not be located" in CI - GOCACHE is unset/unwritable and off is not…
"build constraints exclude all files"Fix Go "build constraints exclude all Go files" in CI - every file in the package is filtered out by build ta…
"build constraints exclude all files"Fix Go "build constraints exclude all Go files in package" in CI - every file is filtered out by build tags o…
"build constraints exclude all Go files"Fix Go "build constraints exclude all Go files" in CI - every file in a package is filtered out by GOOS/GOARC…
"go build failed"Fix a failing "go build" in CI -- a compile error, an undefined symbol, or a missing dependency. Read the fir…
"C source files not allowed"Fix Go "C source files not allowed when not using cgo" in CI - a package ships .c files but cgo is disabled,…
"cannot convert"Fix Go "cannot convert X (type A) to type B" compile errors in CI - an invalid type conversion between incomp…
"cannot find GOROOT"Fix Go "cannot find GOROOT directory" in CI - GOROOT points at a missing path, usually a stale or hand-set va…
"cannot range over ... (variable of type int)"Fix Go "cannot range over n (variable of type int)" in CI - ranging over an integer requires Go 1.22 or newer…
"cannot use X as Y"Fix Go "cannot use x (type A) as type B" compile errors in CI - a type mismatch after a dependency changed a…
"cannot use X as type"Fix Go "cannot use X (variable of type A) as B value in argument" in CI - a value of the wrong type was passe…
"cannot use ... as ... value in argument"Fix Go "cannot use x (variable of type T) as U value in argument to f" in CI - a value is passed to a functio…
"cannot use X as Y value"Fix Go "cannot use X (type A) as type B value in argument" in CI - a value of the wrong type was passed to a…
"constant ... overflows ..."Fix Go "constant 300 overflows int8" in CI - a constant value does not fit in the target integer type it is a…
"declared and not used"Fix Go "declared and not used" and "imported and not used" compile errors in CI - Go treats unused variables…
"declared and not used"Fix Go "declared and not used" in CI - Go rejects unused local variables at compile time. Use the value, drop…
"error obtaining VCS status"Fix Go "error obtaining VCS status: ... use -buildvcs=false to disable VCS stamping" in CI - go build cannot…
"exec format error"Fix "exec format error" in CI - a Go binary built for a different GOOS/GOARCH is being run on the wrong platf…
"exec: gofmt not found"Fix Go "exec: gofmt: executable file not found in $PATH" in CI - a format check invoked gofmt but it is not o…
build cache permission deniedFix Go "failed to initialize build cache: permission denied" in CI - GOCACHE on an unwritable directory, ofte…
"gccgo not supported"Fix Go build failing because gccgo was used in CI - a feature or flag is gc-only. Build with the standard gc…
"go generate: no such tool"Fix Go "go generate" failing with "no such tool" in CI - the //go:generate directive named a generator that i…
"go generate" errorsFix Go "go generate" failures in CI - a missing generator tool on PATH, or generated files that drift from th…
"version is required"Fix Go "go install: version is required when current directory is not in a module" in CI - install tools with…
"cannot apply to var of type"Fix Go "go:embed cannot apply to var of type" in CI - an embed directive on a variable that is not string, []…
"imported and not used"Fix Go "imported and not used" in CI - Go treats unused imports as compile errors. Remove the import or use i…
"package without types was imported"Fix Go "internal error: package without types was imported" in CI - usually a stale build cache or mismatched…
"invalid operation: ... mismatched types"Fix Go "invalid operation: x + y (mismatched types int and string)" in CI - a binary operator was applied to…
"missing function body"Fix Go "missing function body" in CI - a function is declared with no body and no assembly stub, usually from…
"missing return"Fix Go "missing return at end of function" compile errors in CI - a function with a return type whose control…
"missing return"Fix Go "missing return at end of function" in CI - a function with a return type has a path that does not ret…
"mixed named and unnamed parameters"Fix Go "syntax error: mixed named and unnamed parameters" in CI - a function signature that names some parame…
"no Go files in directory"Fix Go "no Go files in <dir>" / "no buildable Go source files" in CI - the build target has no compilable Go…
"no Go files in directory"Fix Go "build X: cannot load X: no Go files in /path" in CI - the build target has no compilable Go files. Po…
"no Go files in"Fix Go "no Go files in <dir>" / "no non-test Go files" in CI - building a directory with no buildable .go fil…
"non-constant array bound"Fix Go "non-constant array bound" / "array bound must be constant" in CI - an array length set from a variabl…
"non-declaration statement outside function body"Fix Go "syntax error: non-declaration statement outside function body" in CI - executable code was placed at…
"not enough arguments in call"Fix Go "not enough arguments in call to f" in CI - a function is called with fewer arguments than its signatu…
"module requires Go 1.X"Fix Go "note: module requires Go 1.X" build errors in CI - the toolchain is older than a dependency or your g…
"is not in GOROOT"Fix Go "package ... is not in std (GOROOT)" in CI - a build run outside module mode, missing go.mod, or GO111…
"command-line-arguments not main"Fix Go "package command-line-arguments is not a main package" in CI - go build/run got file paths that are no…
"package fmt is not in std"Fix Go "package fmt is not in std" in CI - even stdlib imports fail, meaning GOROOT is wrong or the install i…
"package X is not in GOROOT"Fix Go "package X is not in std (GOROOT)" in CI - an import path is treated as standard library but is not. A…
"package X is not in std"Fix Go "package X is not in std" build errors in CI - a misspelled or moved standard-library import path that…
"protoc-gen-go: program not found"Fix protoc "protoc-gen-go: program not found or is not executable" in CI - the Go protobuf plugin is not inst…
"relative import not supported"Fix Go "local import in non-local package" / relative import errors in CI - module mode forbids ./ and ../ im…
"relocation truncated to fit"Fix Go "relocation truncated to fit" link errors in CI - a cgo binary exceeded the small/medium code-model ra…
"runtime: out of memory"Fix Go "fatal error: runtime: out of memory" during go mod download / go list in CI - the module graph or a l…
"syntax error: unexpected"Fix Go "syntax error: unexpected token" build errors in CI - a missing brace, a stray semicolon from a bad li…
"unexpected newline in argument list"Fix Go "syntax error: unexpected newline in argument list; possibly missing comma or )" in CI - a call spans…
"has no field or method"Fix Go "t.Method undefined (type T has no field or method Method)" in CI - a method or field is called on a v…
"too many arguments in call"Fix Go "too many arguments in call" and "not enough arguments in call" in CI - a call site that no longer mat…
"too many errors"Fix Go "too many errors" in CI - the compiler stopped printing after a cap, hiding most failures. Fix the fir…
"too many open files"Fix Go build/test "too many open files" in CI - the process hit the file-descriptor ulimit. Raise the limit o…
"too many return values"Fix Go "too many return values" in CI - a return statement lists more values than the function signature decl…
"undefined: runtime.X"Fix Go "undefined: runtime.X" in CI - code uses a runtime symbol from a newer Go than CI runs. Install a matc…
"undefined: X"Fix Go "undefined: X" build errors in CI - a referenced identifier does not exist in scope. Add the import, f…
"undefined: X"Fix Go "undefined: Name" compile errors in CI - a removed or renamed API in an upgraded dependency, a wrong i…
"unsupported GOOS/GOARCH"Fix Go "unsupported GOOS/GOARCH pair" in CI - a cross-compile target combination is not valid. Pick a support…
"redeclared in this block"Fix Go "X redeclared in this block: other declaration of X" in CI - two declarations with the same name exist…
"redeclared in this block"Fix Go "X redeclared in this block" / "no new variables on left side of :=" in CI - a duplicate identifier or…
"buf breaking change detected"Fix buf "breaking" failures in CI - a proto change broke wire or API compatibility against the baseline. Make…
cgo: C compiler not foundFix Go cgo "exec: gcc: executable file not found" in CI - a cgo package needs a C compiler the runner lacks.…
"exec gcc: signal: killed"Fix Go cgo "exec: gcc: signal: killed" in CI - the C compiler was OOM-killed mid-build. Reduce parallelism or…
"gcc: command not found"Fix Go cgo "exec: gcc: executable file not found" in CI - a package needs cgo but the runner has no C compile…
"undefined reference to"Fix Go cgo "undefined reference to" link errors in CI - the linker could not find a C symbol because the libr…
CGO_ENABLED=0 build failsFix Go static-build failures with CGO_ENABLED=0 in CI - a dependency that needs cgo (net/os user, sqlite) bre…
compiler out of memoryFix Go compiler out-of-memory failures in CI - "fatal error: runtime: out of memory" or a "signal: killed" bu…
cgo linker errorsFix Go cgo link failures in CI - "undefined reference to", "cannot find -lfoo", or "ld: library not found" -…
staticcheck / golangci-lintFix Go staticcheck and golangci-lint failures in CI - linters flagged real issues or config drift. Fix the fi…
"composite literal uses unkeyed fields"Fix Go vet "composite literal uses unkeyed fields" in CI - an unkeyed struct literal from another package tha…
"composite literal uses unkeyed fields"Fix go vet "composite literal uses unkeyed fields" in CI - a struct literal lists values positionally and vet…
"misuse of unbuffered os.Signal channel"Fix go vet "misuse of unbuffered os.Signal channel as argument to signal.Notify" in CI - signal.Notify needs…
"possible misuse of unsafe.Pointer"Fix Go vet "possible misuse of unsafe.Pointer" in CI - an unsafe conversion vet recognizes as unsafe, like ui…
"misuse of unsafe.Pointer"Fix go vet "possible misuse of unsafe.Pointer" in CI - a uintptr round-trip through unsafe.Pointer broke the…
"arg ... for %d ... of wrong type"Fix go vet "Printf format %d has arg of wrong type string" in CI - a format verb does not match the type of t…
"struct field tag ... not compatible"Fix go vet "struct field tag not compatible with reflect.StructTag.Get: bad syntax for struct tag value" in C…
"cancel function is not used on all paths"Fix go vet "the cancel function returned by context.WithCancel should be called, not discarded, to avoid a co…
"unreachable code"Fix go vet "unreachable code" in CI - statements follow a terminating statement such as return, panic, or an…
"wrong signature for Test..."Fix go vet "wrong signature for TestX, must be func TestX(t *testing.T)" in CI - a test function has the Test…
"declaration ... shadows"Fix Go vet shadow findings in CI - the opt-in shadow analyzer flags an inner declaration (often err) that hid…
"context deadline exceeded"Fix golangci-lint "context deadline exceeded" (timeout) in CI - the run exceeded its time budget. Raise the t…
"Error return value not checked"Fix golangci-lint errcheck "Error return value is not checked" in CI - a returned error was ignored. Handle i…
"File is not gofmted"Fix golangci-lint "File is not gofmted with -s" in CI - the gofmt linter found formatting differences. Run go…
"typecheck" errorsFix golangci-lint "typecheck" errors in CI - the linter could not compile the package, so every analyzer fail…
"field ... not found in type config.Project"Fix GoReleaser YAML unmarshal errors in CI - an unknown or misplaced field in .goreleaser.yaml fails to parse…
"build failed: exit status 1"Fix GoReleaser "build failed: exit status 1" in CI - the underlying go build for one target failed, so GoRele…
"dist is not empty"Fix GoReleaser "dist is not empty" in CI - the dist folder from a prior build remains, so GoReleaser refuses…
"failed to push docker image"Fix GoReleaser Docker image build and push failures in CI - the registry login is missing, so the push is den…
"couldn't find any tags"Fix GoReleaser tag-fetch failures in CI - a shallow checkout means the wrong or missing tag is used for the r…
"git doesn't contain any tags"Fix GoReleaser "git doesn't contain any tags" in CI - GoReleaser derives the release version from a git tag a…
"git is currently in a dirty state"Fix GoReleaser "git is currently in a dirty state" in CI - uncommitted or generated files make the working tr…
"invalid config" from goreleaser checkFix "goreleaser check" failures in CI - the config validation step reports deprecated, invalid, or missing fi…
"only available in GoReleaser Pro"Fix GoReleaser "this is a GoReleaser Pro feature" in CI - a Pro-only config field requires the Pro distributi…
"is not a valid semver tag"Fix GoReleaser "is not a valid semver tag" in CI - the git tag being released does not follow the vMAJOR.MINO…
"only configurations files on version: 2 are supported"Fix GoReleaser "only configurations files on version: 2 are supported" in CI - GoReleaser v2 requires a top-l…
"release already exists"Fix GoReleaser "release already exists" in CI - a GitHub release for this tag was already created, so GoRelea…
"unsupported GOOS/GOARCH pair"Fix GoReleaser "unsupported GOOS/GOARCH pair" in CI - a target platform combination in the build matrix is no…
"announce failed"Fix GoReleaser announce failures in CI - posting the release to Slack, Discord, or Twitter fails when the web…
"exec: \"gcc\": executable file not found"Fix GoReleaser cgo "gcc not found" in CI - a cross-compiled cgo build needs a C toolchain the runner lacks, o…
"cosign: signing failed"Fix GoReleaser cosign signing failures in CI - keyless signing needs id-token permission and OIDC, or a key f…
"401 Bad credentials"Fix GoReleaser "401 Bad credentials" in CI - the GITHUB_TOKEN was missing, empty, or not passed to GoReleaser…
"sign: signing failed"Fix GoReleaser GPG signing failures in CI - the signing key is not imported, or gpg cannot run non-interactiv…
"failed to push homebrew tap"Fix GoReleaser Homebrew tap push failures in CI - committing the generated formula to an external tap repo ne…
"nfpm failed" building rpm/debFix GoReleaser nfpm packaging failures in CI - building rpm or deb packages fails when required fields are mi…
"403 Forbidden" on publishFix GoReleaser "403 Forbidden" during publish in CI - the token authenticated but lacks the scope or permissi…
"SA1019: is deprecated"Fix staticcheck SA1019 "X is deprecated" in CI - code uses an API marked deprecated. Migrate to the replaceme…
Test & vet
Test failures, timeouts, and race detector.
"-short skipped all tests"Fix Go testing where -short skipped every test in CI - testing.Short() guarded the whole suite. Drop -short f…
"--- FAIL: TestName"Fix Go "--- FAIL: TestName" failures in CI - how to read the t.Error/t.Fatal output, find the failing subtest…
"-race requires cgo"Fix Go "-race requires cgo" in CI - the race detector needs cgo and a C compiler, which CGO_ENABLED=0 or a sl…
"-race requires cgo"Fix Go "-race requires cgo; enable cgo by setting CGO_ENABLED=1" in CI - the race detector needs cgo and a C…
"-shuffle" exposes ordering bugsFix Go tests that fail only under "go test -shuffle=on" in CI - tests sharing global/package state that pass…
"deadlock!"Fix Go "fatal error: all goroutines are asleep - deadlock!" in CI - a test blocked forever on a channel, Wait…
"deadlock" in testFix Go "fatal error: all goroutines are asleep - deadlock!" during a test in CI - every goroutine is blocked.…
"[build failed]"Fix Go "FAIL ... [build failed]" during go test in CI - the test binary did not compile due to an error in a…
test package load failedFix Go test "build failed" from a bad import in the test package in CI - a missing or wrong import path stops…
"-coverprofile with multiple packages"Fix Go "cannot use -coverprofile flag with multiple packages" in CI on older Go - upgrade Go or use -coverpkg…
"DATA RACE" detectedFix Go race detector failures in CI - "WARNING: DATA RACE" from go test -race means concurrent unsynchronized…
"DATA RACE" in testFix Go "WARNING: DATA RACE" under go test -race in CI - concurrent unsynchronized access to shared state. Add…
"DATA RACE"Fix Go "WARNING: DATA RACE" under -race in CI - two goroutines touched the same memory unsynchronized. Add a…
"FAIL [build failed]"Fix Go "FAIL package [build failed]" in CI - the test binary would not compile, so no tests ran. Fix the comp…
"concurrent map read and map write"Fix Go "fatal error: concurrent map read and map write" in CI - a map was accessed from multiple goroutines w…
"concurrent map writes"Fix Go "fatal error: concurrent map writes" during a test in CI - unsynchronized concurrent map access crashe…
"concurrent map writes"Fix Go "fatal error: concurrent map writes" in CI - unsynchronized map access from multiple goroutines that c…
"flag provided but not defined"Fix Go "flag provided but not defined" running go test in CI - an unknown flag or misordered args confused th…
"fork/exec /tmp: permission denied"Fix Go tests failing with "fork/exec /tmp/...: permission denied" in CI - /tmp is mounted noexec or restricte…
"-count=1" cache bypassFix Go test caching surprises in CI - a (cached) PASS that hides a real failure, and how go test -count=1 for…
"-coverprofile" errorsFix Go test -coverprofile failures in CI - "cannot use -coverprofile with multiple packages" on older Go, or…
"-fuzz" failuresFix Go fuzzing failures in CI - "will not fuzz, -fuzz matches more than one fuzz test", a failing corpus seed…
"-run" matches nothingFix Go test -run regex problems in CI - a -run pattern that matches no tests (testing: warning: no tests to r…
"-short" skips testsFix Go test -short surprises in CI - a -short run that skips the tests you needed, or a suite that ignores te…
"go test ... build failed"Fix Go "go test ./...: build failed" / "[build failed]" in CI - a package or its _test.go files do not compil…
"exit status 2"Fix Go "go test ... exit status 2" in CI - a build or tooling failure, not a test assertion, ended the run. R…
go vet blocks go testFix Go test failures caused by the built-in go vet pass in CI - go test runs vet first and fails on its findi…
"go vet" errorsFix Go vet failures in CI - Printf format mismatches, lost struct tags, unreachable code, or copied locks. go…
"gofmt" needs to be runFix Go "gofmt -l" CI failures - a formatting gate prints files that are not gofmt-clean and fails the build u…
"goimports" diffFix Go goimports CI failures - a gate runs goimports -l/-d and fails on unsorted imports or unused/missing im…
"[no test files]"Fix Go "? pkg [no test files]" surprises in CI - a package you expected to test has none. Verify file nam…
"[no test files]"Fix Go "[no test files]" and "no tests to run" in CI - misnamed test files, a wrong package path, or a -run f…
"-tags integration excluded files"Fix Go test seeing "no test files" because integration files are gated behind a build tag in CI - pass the ma…
"nil pointer dereference"Fix Go "panic: runtime error: invalid memory address or nil pointer dereference" during go test in CI - a nil…
"panic: runtime error" in testFix Go "panic: runtime error" during a test in CI - a nil dereference, index out of range, or similar runtime…
"test timed out after 10m0s"Fix Go "panic: test timed out after 10m0s" in CI - a test exceeded the default timeout, usually a hang or a s…
"panic: test timed out"Fix Go "panic: test timed out after Xm" in CI - a test exceeded the -timeout budget. Fix the hang or raise th…
"panic: test timed out"Fix Go "panic: test timed out after 10m0s" in CI - a test hung on a deadlock, a blocked channel, or a slow op…
"race detected during execution of test"Fix Go "WARNING: DATA RACE / race detected during execution of test" in CI - -race found unsynchronized acces…
"signal SIGSEGV"Fix Go "signal SIGSEGV: segmentation violation" in CI tests - a nil dereference, a bad cgo call, or unsafe po…
"staticcheck" findingsFix Go staticcheck CI failures - SAxxxx/STxxxx findings like deprecated APIs, impossible type assertions, or…
"-race requires cgo"Fix Go "-race requires cgo" / "race detector not supported" in CI - go test -race needs cgo and a C compiler.…
"test timed out after 10m0s"Fix Go "panic: test timed out after 10m0s" in CI - a test exceeded the default timeout, usually a hang or a s…
"no tests to run"Fix Go "testing: warning: no tests to run" in CI - the -run regexp matched nothing. Fix the pattern or the te…
coverage: no statementsFix Go coverage anomalies in CI - "no packages being tested depend on matches" or "coverage: [no statements]"…
"-covermode" with -raceFix Go coverage-with-race failures in CI - combining -race with the default coverage mode races the counters;…
t.Parallel() capture bugFix Go parallel subtests that all see the last table case in CI - a t.Parallel() subtest capturing a shared l…
t.Parallel() shared-state raceFix Go t.Parallel() flakiness in CI - parallel tests racing on a shared global, a shared temp dir, or t.Seten…
-coverprofile write failedFix Go "-coverprofile" write failures with multiple packages in CI - the flag cannot flatten profiles across…
-run matches no testsFix Go "testing: warning: no tests to run" from a -run regex in CI - the pattern matched no test name, so the…
"-coverpkg conflict"Fix Go test -coverpkg conflicts in CI - a pattern matched no packages or clashes with -coverprofile. Use a pa…
"deadlock!"Fix Go "fatal error: all goroutines are asleep - deadlock!" in a test in CI - every goroutine is blocked with…
"failing input written to testdata/fuzz"Fix go test fuzzing failures in CI - a fuzz target found an input that fails, and Go wrote it to testdata/fuz…
"flag provided but not defined"Fix go test "flag provided but not defined: -X" in CI - a custom flag is passed before the package list, so i…
test: no module provides packageFix Go "no required module provides package" during go test in CI - a test imports a package no require provi…
"testing: warning: no tests to run"Fix go test "testing: warning: no tests to run" in CI - the -run regular expression matched no test names, so…
"nil pointer dereference"Fix Go "panic: runtime error: invalid memory address or nil pointer dereference" in a test in CI - a test der…
"(cached)" test resultsUnderstand Go "ok ... (cached)" in CI - go test caches passing results and may skip re-running tests. Force f…
coverage profile write failedFix Go test "-coverprofile" write failures in CI - go test could not write the profile, often a missing direc…
"--- FAIL" / exit 1Diagnose Go "--- FAIL" test failures in CI - read the t.Errorf output and exit code 1, distinguish real asser…
flaky: passes locally, fails in CIFix Go tests that pass locally but fail intermittently in CI - usually timing, ordering, shared state, or env…
"flag provided but not defined"Fix Go test "flag provided but not defined: -X" in CI - a -args flag the test binary does not register, or a…
"too many open files"Fix Go test "too many open files" / "socket: too many open files" in CI - a leaked descriptor or a low ulimit…
tests OOM-killedFix Go tests killed for memory in CI - "fatal error: runtime: out of memory" or "signal: killed" when a suite…
"level=error ... Running error"Fix golangci-lint "level=error msg='Running error'" in CI - a linter that failed to run (typecheck/build erro…
invalid .golangci configFix golangci-lint configuration failures in CI - "unknown linters", a schema error in .golangci.yml, or a con…
golangci-lint timeoutFix golangci-lint "level=error msg='Timeout exceeded'" / context deadline in CI - a lint run that exceeds its…
Explore other topics
GitHub ActionsWorkflow, runner, and YAML errors - diagnosed and fixed.
Node.js & npmnpm, yarn, and pnpm failures in CI - solved.
DockerBuild, run, compose, and registry errors - explained.
Pythonpip, poetry, venv, and pytest failures - fixed.
Java & JVMMaven, Gradle, and JVM failures in CI - resolved.
RustCargo and toolchain failures in CI - fixed.