Error map

legacy CN Go: x509: certificate relies on legacy Common Name field, use SANs instead

SSL / TLS · layer 2, Network

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

legacy CN — Go: x509: certificate relies on legacy Common Name field, use SANs instead (SSL / TLS)legacy CNpanic: close of closed channel — Go: panic: close of closed channel (or close of nil channel) (Go)panic: close of clo…no new variables on left side of := — Go: ./main.go:9:6: no new variables on left side of := (Go)no new variables on…missing return — Go: ./main.go:18:1: missing return (Go)missing returnjson: cannot unmarshal string into Go struct field — Go: json: cannot unmarshal string into Go struct field User.age of type int (Go)json: cannot unmars…reflect: call of reflect.Value.X on zero Value — Go: panic: reflect: call of reflect.Value.Elem on zero Value (Go)reflect: call of re…go: updates to go.mod needed — Go: go: updates to go.mod needed; to update it: go mod tidy (Go)go: updates to go.m…wildcard certificate does not cover a.b.example.com — Browser: *.example.com certificate does not match a.b.example.com (ERR_CERT_COMMON_NAME_INVALID) (SSL / TLS)wildcard certificat…not enough / too many arguments in call — Go: not enough arguments in call to f have (int) want (int, string) (Go)not enough / too ma…fatal error: concurrent map writes — Go: fatal error: concurrent map writes (Go)fatal error: concur…undefined: x — Go: ./main.go:12:2: undefined: handler (Go)undefined: xx509: certificate is valid for X, not Y — Go: x509: certificate is valid for www.example.com, not api.example.com (Go)x509: certificate i…missing go.sum entry — Go: missing go.sum entry for module providing package github.com/pkg/errors (imported by app); to add: go get app (Go)missing go.sum entryall goroutines are asleep - deadlock — Go: fatal error: all goroutines are asleep - deadlock! (Go)all goroutines are …fatal error: concurrent map read and map write — Go: fatal error: concurrent map read and map write (Go)fatal error: concur…panic: send on closed channel — Go: panic: send on closed channel (Go)panic: send on clos…declared and not used — Go: declared and not used: x / "fmt" imported and not used (Go)declared and not us…cannot assign to struct field m[k].f in map — Go: cannot assign to struct field users["bob"].Age in map (Go)cannot assign to st…cannot use x as type in assignment/argument — Go: cannot use "5" (untyped string constant) as int value in argument to f (Go)cannot use x as typ…imported and not used — Go: ./main.go:5:2: "os" imported and not used (Go)imported and not us…does not implement interface (missing method) — Go: cannot use &Dog{} (value of type *Dog) as Animal value: *Dog does not implement Animal (missing method Speak) (Go)does not implement …assignment mismatch: 1 variable but f returns 2 values — Go: assignment mismatch: 1 variable but os.Open returns 2 values (Go)assignment mismatch…cannot refer to unexported name — Go: cannot refer to unexported name pkg.helper (undefined: pkg.helper) (Go)cannot refer to une…panic: assignment to entry in nil map — Go: panic: assignment to entry in nil map (Go)panic: assignment t…panic: interface conversion — Go: panic: interface conversion: interface {} is string, not int (Go)panic: interface co…invalid memory address or nil pointer dereference — Go: panic: runtime error: invalid memory address or nil pointer dereference (Go)invalid memory addr…panic: runtime error: index out of range — Go: panic: runtime error: index out of range [3] with length 3 (Go)panic: runtime erro…panic: slice bounds out of range — Go: panic: runtime error: slice bounds out of range [:5] with capacity 3 (Go)panic: slice bounds…cannot find package in any of GOROOT / GOPATH — Go: cannot find package "github.com/pkg/errors" in any of: /usr/local/go/src/github.com/pkg/errors (from $GOROOT) /go/src/github.com/pkg/errors (from $GOPATH) (Go)cannot find package…listen tcp :8080: bind: address already in use — Go: listen tcp :8080: bind: address already in use (Go)listen tcp :8080: b…no required module provides package — Go: no required module provides package github.com/foo/bar; to add it: go get github.com/foo/bar (Go)no required module …NET::ERR_CERT_COMMON_NAME_INVALID — NET::ERR_CERT_COMMON_NAME_INVALID: Your connection is not private (certificate is for a different domain) (SSL / TLS)NET::ERR_CERT_COMMO…SSL_ERROR_BAD_CERT_DOMAIN — Firefox: Websites prove their identity via certificates — the certificate is only valid for other names. Error code: SSL_ERROR_BAD_CERT_DOMAIN (SSL / TLS)SSL_ERROR_BAD_CERT_…no alternative certificate subject name matches target host name — curl: (51) SSL: no alternative certificate subject name matches target host name 'example.com' (SSL / TLS)no alternative cert…import cycle not allowed — Go: package app/models imports app/utils imports app/models: import cycle not allowed (Go)import cycle not al…function main is undeclared in the main package — Go: runtime.main_main·f: function main is undeclared in the main package (Go)function main is un…E0061: this function takes N arguments but M were supplied — Rust: error[E0061]: this function takes 2 arguments but 1 argument was supplied (Rust)E0061: this functio…panic: sync: negative WaitGroup counter — Go: panic: sync: negative WaitGroup counter (Go)panic: sync: negati…WARNING: DATA RACE — Go: WARNING: DATA RACE — Write at 0x00c0000 by goroutine 7: / Previous read at ... by goroutine 6 (Go)WARNING: DATA RACEGo TLS — Go: tls: first record does not look like a TLS handshake (HTTP server spoken to with HTTPS) (SSL / TLS)Go TLSsyntax error: unexpected newline — Go: ./main.go:8:2: syntax error: unexpected newline, expected comma or ) (Go)syntax error: unexp…dial tcp: connect: connection refused — Go: dial tcp 127.0.0.1:5432: connect: connection refused (Go)dial tcp: connect: …x509: certificate signed by unknown authority — Go: x509: certificate signed by unknown authority (Go)x509: certificate s…gRPC: Ssl handshake failed / authentication handshake failed — gRPC: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: x509: certificate signed by unknown authority" (SSL / TLS)gRPC: Ssl handshake…invalid version: unknown revision — Go: go: github.com/foo/bar@v1.2.3: invalid version: unknown revision v1.2.3 (Go)invalid version: un…verifying module: checksum mismatch / SECURITY ERROR — Go: verifying module: checksum mismatch — SECURITY ERROR This download does NOT match an earlier download recorded in go.sum (Go)verifying module: c…terminal prompts disabled / 410 Gone (private module) — Go: fatal: could not read Username for 'https://github.com': terminal prompts disabled (Go)terminal prompts di…

Directly related (12)

panic: close of closed channelGo

Go: panic: close of closed channel (or close of nil channel)

`close(ch)` was called twice, or on a nil channel.

no new variables on left side of :=Go

Go: ./main.go:9:6: no new variables on left side of :=

`:=` declares variables, but all names on the left already exist in the same scope.

missing returnGo

Go: ./main.go:18:1: missing return

A function with a return type can reach its end without a return statement on some path.

json: cannot unmarshal string into Go struct fieldGo

Go: json: cannot unmarshal string into Go struct field User.age of type int

The JSON value's type does not match the Go field type (string vs number, object vs array).

reflect: call of reflect.Value.X on zero ValueGo

Go: panic: reflect: call of reflect.Value.Elem on zero Value

Reflection code operated on an invalid (zero) `reflect.Value`, often derived from a nil pointer or a missing struct field.

go: updates to go.mod neededGo

Go: go: updates to go.mod needed; to update it: go mod tidy

`go.mod` is out of sync with the imports in your code, and Go is running with `-mod=readonly` (the default).

wildcard certificate does not cover a.b.example.comSSL / TLS

Browser: *.example.com certificate does not match a.b.example.com (ERR_CERT_COMMON_NAME_INVALID)

A wildcard certificate covers exactly one label: `*.example.com` matches `www.example.com` but not `a.b.example.com` or the bare…

not enough / too many arguments in callGo

Go: not enough arguments in call to f have (int) want (int, string)

A function was called with fewer or more arguments than it declares.

fatal error: concurrent map writesGo

Go: fatal error: concurrent map writes

Two goroutines wrote to the same map at the same time; the runtime detects it and aborts the program (not recoverable).

undefined: xGo

Go: ./main.go:12:2: undefined: handler

The compiler cannot find an identifier — a typo, a missing import, or it lives in another file/package that wasn't built.

x509: certificate is valid for X, not YGo

Go: x509: certificate is valid for www.example.com, not api.example.com

The server's certificate does not list the hostname you connected to (SAN mismatch), or it has expired.

missing go.sum entryGo

Go: missing go.sum entry for module providing package github.com/pkg/errors (imported by app); to add: go get app

`go.sum` lacks the checksum for a dependency that your build needs.

Two steps away (34)

all goroutines are asleep - deadlockGo

Go: fatal error: all goroutines are asleep - deadlock!

Every goroutine is blocked waiting (on a channel, mutex or WaitGroup), so the program can never continue.

fatal error: concurrent map read and map writeGo

Go: fatal error: concurrent map read and map write

One goroutine read from a map while another wrote to it; the runtime aborts.

panic: send on closed channelGo

Go: panic: send on closed channel

A goroutine sent a value to a channel after it had been closed.

declared and not usedGo

Go: declared and not used: x / "fmt" imported and not used

Go refuses to compile code with unused local variables or unused imports.

cannot assign to struct field m[k].f in mapGo

Go: cannot assign to struct field users["bob"].Age in map

Map values are not addressable, so you cannot modify a field of a struct stored directly in a map.

cannot use x as type in assignment/argumentGo

Go: cannot use "5" (untyped string constant) as int value in argument to f

A value's type is not assignable to the type required by the variable, parameter or return value.

imported and not usedGo

Go: ./main.go:5:2: "os" imported and not used

The file imports a package that no code in that file uses; Go treats this as a compile error, not a warning.

does not implement interface (missing method)Go

Go: cannot use &Dog{} (value of type *Dog) as Animal value: *Dog does not implement Animal (missing method Speak)

A type was used as an interface but lacks a method or has it with a different signature or receiver type.

assignment mismatch: 1 variable but f returns 2 valuesGo

Go: assignment mismatch: 1 variable but os.Open returns 2 values

The number of variables on the left does not match the number of values the function returns.

cannot refer to unexported nameGo

Go: cannot refer to unexported name pkg.helper (undefined: pkg.helper)

You used a lowercase (unexported) identifier from another package; only capitalised names are visible outside their package.

panic: assignment to entry in nil mapGo

Go: panic: assignment to entry in nil map

You wrote to a map that was declared but never initialised.

panic: interface conversionGo

Go: panic: interface conversion: interface {} is string, not int

A type assertion `x.(T)` failed because the dynamic type of the interface is not T.

invalid memory address or nil pointer dereferenceGo

Go: panic: runtime error: invalid memory address or nil pointer dereference

The program used a pointer, map, interface or struct field that was nil — usually an uninitialised value or an ignored error.

panic: runtime error: index out of rangeGo

Go: panic: runtime error: index out of range [3] with length 3

Code accessed a slice, array or string element beyond its length.

panic: slice bounds out of rangeGo

Go: panic: runtime error: slice bounds out of range [:5] with capacity 3

A slice expression `s[a:b]` used bounds outside the slice's length or capacity.

cannot find package in any of GOROOT / GOPATHGo

Go: cannot find package "github.com/pkg/errors" in any of: /usr/local/go/src/github.com/pkg/errors (from $GOROOT) /go/src/github.com/pkg/errors (from $GOPATH)

Go could not locate an imported package — it is not downloaded, the module is not initialised, or GOPATH mode is in effect.

listen tcp :8080: bind: address already in useGo

Go: listen tcp :8080: bind: address already in use

The port your Go server wants is already taken by another process (or a previous instance of your app).

no required module provides packageGo

Go: no required module provides package github.com/foo/bar; to add it: go get github.com/foo/bar

The code imports a package whose module is not listed in `go.mod`.

NET::ERR_CERT_COMMON_NAME_INVALIDSSL / TLS

NET::ERR_CERT_COMMON_NAME_INVALID: Your connection is not private (certificate is for a different domain)

The certificate presented doesn’t include the hostname you visited — e.g. visiting www.example.com with a certificate only for ex…

SSL_ERROR_BAD_CERT_DOMAINSSL / TLS

Firefox: Websites prove their identity via certificates — the certificate is only valid for other names. Error code: SSL_ERROR_BAD_CERT_DOMAIN

The certificate does not include the hostname you typed.

no alternative certificate subject name matches target host nameSSL / TLS

curl: (51) SSL: no alternative certificate subject name matches target host name 'example.com'

The certificate's names (SANs) don't include the host curl connected to.

import cycle not allowedGo

Go: package app/models imports app/utils imports app/models: import cycle not allowed

Two or more packages import each other directly or indirectly, which Go forbids.

function main is undeclared in the main packageGo

Go: runtime.main_main·f: function main is undeclared in the main package

The package is named `main` but contains no `func main()`, or you tried to build a library as an executable.

E0061: this function takes N arguments but M were suppliedRust

Rust: error[E0061]: this function takes 2 arguments but 1 argument was supplied

A call has too few or too many arguments for the function signature.

panic: sync: negative WaitGroup counterGo

Go: panic: sync: negative WaitGroup counter

`wg.Done()` was called more times than `wg.Add()`.

WARNING: DATA RACEGo

Go: WARNING: DATA RACE — Write at 0x00c0000 by goroutine 7: / Previous read at ... by goroutine 6

The race detector (`-race`) observed two goroutines accessing the same memory concurrently with at least one write and no synchro…

Go TLSSSL / TLS

Go: tls: first record does not look like a TLS handshake (HTTP server spoken to with HTTPS)

A Go TLS client or server received plain HTTP bytes instead of a TLS handshake.

syntax error: unexpected newlineGo

Go: ./main.go:8:2: syntax error: unexpected newline, expected comma or )

The parser met a line break where it needed more tokens, usually a missing trailing comma in a multi-line literal or a misplaced…

dial tcp: connect: connection refusedGo

Go: dial tcp 127.0.0.1:5432: connect: connection refused

Nothing is listening on the host and port your Go program tried to connect to.

x509: certificate signed by unknown authorityGo

Go: x509: certificate signed by unknown authority

The Go TLS client does not trust the CA that signed the server's certificate.

gRPC: Ssl handshake failed / authentication handshake failedSSL / TLS

gRPC: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: x509: certificate signed by unknown authority"

A gRPC client could not complete TLS to the server — untrusted certificate, name mismatch, or plaintext/TLS mismatch.

invalid version: unknown revisionGo

Go: go: github.com/foo/bar@v1.2.3: invalid version: unknown revision v1.2.3

Go cannot fetch the requested module version — the tag or branch doesn't exist, the repository is private or the proxy hasn't see…

verifying module: checksum mismatch / SECURITY ERRORGo

Go: verifying module: checksum mismatch — SECURITY ERROR This download does NOT match an earlier download recorded in go.sum

A module's content hash differs from the one recorded in `go.sum` (or the public checksum database).

terminal prompts disabled / 410 Gone (private module)Go

Go: fatal: could not read Username for 'https://github.com': terminal prompts disabled

Go tried to fetch a private repository without credentials (and, via the public proxy, got 404/410).