Skip to content

Server panic when checking out a Git branch #10861

Open
@willfaught

Description

@willfaught
Change detected, rebuilding site.
2023-03-22 23:19:05.524 -0700
ERROR 2023/03/22 23:19:05 Failed to reload config: add site dependencies: load resources: loading templates: "/Users/Will/Developer/paige/layouts/partials/paige/subpages.html:130:1": parse failed unexpected EOF
Rebuilt in 33 ms
2023/03/22 23:23:21 http: panic serving 127.0.0.1:65080: runtime error: invalid memory address or nil pointer dereference
goroutine 23818 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1854 +0xbf
panic({0x101b84aa0, 0x1034c0460})
	runtime/panic.go:890 +0x263
github.com/gohugoio/hugo/commands.(*commandeer).serve.func1(0xc005f52000?)
	github.com/gohugoio/hugo/commands/server.go:562 +0x32
github.com/gohugoio/hugo/commands.(*commandeer).serve.func2({0x101b711a0, 0xc003cd8180})
	github.com/gohugoio/hugo/commands/server.go:578 +0x4f
github.com/gohugoio/hugo/commands.(*fileServer).createEndpoint.func1.1({0x1024890e0, 0xc00152e1c0}, 0xc004950100)
	github.com/gohugoio/hugo/commands/server.go:380 +0x464
net/http.HandlerFunc.ServeHTTP(0xc00523c000?, {0x1024890e0?, 0xc00152e1c0?}, 0x1000125a8?)
	net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0x1024890e0, 0xc00152e1c0}, 0xc004950100)
	net/http/server.go:2500 +0x149
net/http.serverHandler.ServeHTTP({0xc003cd8090?}, {0x1024890e0, 0xc00152e1c0}, 0xc004950100)
	net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc00303e000, {0x10248a5e0, 0xc002a390e0})
	net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	net/http/server.go:3089 +0x5ed
2023/03/22 23:23:21 http: panic serving 127.0.0.1:65082: runtime error: invalid memory address or nil pointer dereference
goroutine 23842 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1854 +0xbf
panic({0x101b84aa0, 0x1034c0460})
	runtime/panic.go:890 +0x263
github.com/gohugoio/hugo/commands.(*commandeer).serve.func1(0xc005f52000?)
	github.com/gohugoio/hugo/commands/server.go:562 +0x32
github.com/gohugoio/hugo/commands.(*commandeer).serve.func2({0x101b711a0, 0xc0047ca210})
	github.com/gohugoio/hugo/commands/server.go:578 +0x4f
github.com/gohugoio/hugo/commands.(*fileServer).createEndpoint.func1.1({0x1024890e0, 0xc003fa6000}, 0xc004154100)
	github.com/gohugoio/hugo/commands/server.go:380 +0x464
net/http.HandlerFunc.ServeHTTP(0xc00664e080?, {0x1024890e0?, 0xc003fa6000?}, 0x1000125a8?)
	net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0x1024890e0, 0xc003fa6000}, 0xc004154100)
	net/http/server.go:2500 +0x149
net/http.serverHandler.ServeHTTP({0xc0047ca0f0?}, {0x1024890e0, 0xc003fa6000}, 0xc004154100)
	net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc004a34990, {0x10248a5e0, 0xc002a390e0})
	net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	net/http/server.go:3089 +0x5ed
2023/03/22 23:23:21 http: panic serving 127.0.0.1:65084: runtime error: invalid memory address or nil pointer dereference
goroutine 23640 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1854 +0xbf
panic({0x101b84aa0, 0x1034c0460})
	runtime/panic.go:890 +0x263
github.com/gohugoio/hugo/commands.(*commandeer).serve.func1(0xc005f52000?)
	github.com/gohugoio/hugo/commands/server.go:562 +0x32
github.com/gohugoio/hugo/commands.(*commandeer).serve.func2({0x101b711a0, 0xc005036180})
	github.com/gohugoio/hugo/commands/server.go:578 +0x4f
github.com/gohugoio/hugo/commands.(*fileServer).createEndpoint.func1.1({0x1024890e0, 0xc001bae000}, 0xc00305a000)
	github.com/gohugoio/hugo/commands/server.go:380 +0x464
net/http.HandlerFunc.ServeHTTP(0xc002644000?, {0x1024890e0?, 0xc001bae000?}, 0x1000125a8?)
	net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0x1024890e0, 0xc001bae000}, 0xc00305a000)
	net/http/server.go:2500 +0x149
net/http.serverHandler.ServeHTTP({0xc005036090?}, {0x1024890e0, 0xc001bae000}, 0xc00305a000)
	net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc0005fc3f0, {0x10248a5e0, 0xc002a390e0})
	net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	net/http/server.go:3089 +0x5ed
2023/03/22 23:24:57 http: panic serving 127.0.0.1:65095: runtime error: invalid memory address or nil pointer dereference
goroutine 23820 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1854 +0xbf
panic({0x101b84aa0, 0x1034c0460})
	runtime/panic.go:890 +0x263
github.com/gohugoio/hugo/commands.(*commandeer).serve.func1(0xc005f52000?)
	github.com/gohugoio/hugo/commands/server.go:562 +0x32
github.com/gohugoio/hugo/commands.(*commandeer).serve.func2({0x101b711a0, 0xc005036d50})
	github.com/gohugoio/hugo/commands/server.go:578 +0x4f
github.com/gohugoio/hugo/commands.(*fileServer).createEndpoint.func1.1({0x1024890e0, 0xc003fa6000}, 0xc004951900)
	github.com/gohugoio/hugo/commands/server.go:380 +0x464
net/http.HandlerFunc.ServeHTTP(0xc00523cf00?, {0x1024890e0?, 0xc003fa6000?}, 0x1000125a8?)
	net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0x1024890e0, 0xc003fa6000}, 0xc004951900)
	net/http/server.go:2500 +0x149
net/http.serverHandler.ServeHTTP({0xc005036c90?}, {0x1024890e0, 0xc003fa6000}, 0xc004951900)
	net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc004a34990, {0x10248a5e0, 0xc002a390e0})
	net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	net/http/server.go:3089 +0x5ed
2023/03/22 23:24:57 http: panic serving 127.0.0.1:65097: runtime error: invalid memory address or nil pointer dereference
goroutine 23845 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1854 +0xbf
panic({0x101b84aa0, 0x1034c0460})
	runtime/panic.go:890 +0x263
github.com/gohugoio/hugo/commands.(*commandeer).serve.func1(0xc005f52000?)
	github.com/gohugoio/hugo/commands/server.go:562 +0x32
github.com/gohugoio/hugo/commands.(*commandeer).serve.func2({0x101b711a0, 0xc005036e40})
	github.com/gohugoio/hugo/commands/server.go:578 +0x4f
github.com/gohugoio/hugo/commands.(*fileServer).createEndpoint.func1.1({0x1024890e0, 0xc003fa60e0}, 0xc004154900)
	github.com/gohugoio/hugo/commands/server.go:380 +0x464
net/http.HandlerFunc.ServeHTTP(0xc00664e500?, {0x1024890e0?, 0xc003fa60e0?}, 0x1000125a8?)
	net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0x1024890e0, 0xc003fa60e0}, 0xc004154900)
	net/http/server.go:2500 +0x149
net/http.serverHandler.ServeHTTP({0xc0047caa20?}, {0x1024890e0, 0xc003fa60e0}, 0xc004154900)
	net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc00303e090, {0x10248a5e0, 0xc002a390e0})
	net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	net/http/server.go:3089 +0x5ed
2023/03/22 23:24:57 http: panic serving 127.0.0.1:65096: runtime error: invalid memory address or nil pointer dereference
goroutine 23844 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1854 +0xbf
panic({0x101b84aa0, 0x1034c0460})
	runtime/panic.go:890 +0x263
github.com/gohugoio/hugo/commands.(*commandeer).serve.func1(0xc005f52000?)
	github.com/gohugoio/hugo/commands/server.go:562 +0x32
github.com/gohugoio/hugo/commands.(*commandeer).serve.func2({0x101b711a0, 0xc005036f60})
	github.com/gohugoio/hugo/commands/server.go:578 +0x4f
github.com/gohugoio/hugo/commands.(*fileServer).createEndpoint.func1.1({0x1024890e0, 0xc003fa62a0}, 0xc004154800)
	github.com/gohugoio/hugo/commands/server.go:380 +0x464
net/http.HandlerFunc.ServeHTTP(0xc00664e380?, {0x1024890e0?, 0xc003fa62a0?}, 0x1000125a8?)
	net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0x1024890e0, 0xc003fa62a0}, 0xc004154800)
	net/http/server.go:2500 +0x149
net/http.serverHandler.ServeHTTP({0xc0047ca960?}, {0x1024890e0, 0xc003fa62a0}, 0xc004154800)
	net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc00303e000, {0x10248a5e0, 0xc002a390e0})
	net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	net/http/server.go:3089 +0x5ed

What version of Hugo are you using (hugo version)?

$ hugo env
hugo v0.111.3+extended darwin/amd64 BuildDate=unknown
GOOS="darwin"
GOARCH="amd64"
GOVERSION="go1.20.2"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.2.4"
github.com/sass/dart-sass-embedded/protocol="1.2.0"
github.com/sass/dart-sass-embedded/compiler="1.59.3"
github.com/sass/dart-sass-embedded/implementation="1.59.3"

Does this issue reproduce with the latest release?

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions