graphjin icon indicating copy to clipboard operation
graphjin copied to clipboard

WebSocket: http: panic serving [::1]:58359: runtime error: invalid memory address or nil pointer dereference

Open WichardRiezebos opened this issue 6 months ago • 0 comments
trafficstars

What version of GraphJin are you using? graphjin version

v3 -> serve go

Have you tried reproducing the issue with the latest release?

yes

What is the hardware spec (RAM, OS)?

32gb ARM MacOS

Steps to reproduce the issue (config used to run GraphJin).

Error Thrown when i try to run a subscription:

2025/05/07 16:33:49 http: panic serving [::1]:58359: runtime error: invalid memory address or nil pointer dereference goroutine 24 [running]: net/http.(*conn).serve.func1() /opt/homebrew/Cellar/go/1.24.2/libexec/src/net/http/server.go:1947 +0xb0 panic({0x103baa0a0?, 0x10479bd20?}) /opt/homebrew/Cellar/go/1.24.2/libexec/src/runtime/panic.go:792 +0x124 github.com/dosco/graphjin/serv/v3.(*graphjinService).subSwitch(0x140000d7ce0, 0x1400005aa00, {{0x0, 0x0}, {0x140007b00b0, 0xf}, {0x140007b00c0, 0x2, 0x8}}) /Users/wichardriezebos/go/pkg/mod/github.com/dosco/graphjin/serv/[email protected]/ws.go:138 +0x4fc github.com/dosco/graphjin/serv/v3.(*graphjinService).apiV1Ws(0x140000d7ce0, {0x103da3c48, 0x140005b4000}, 0x140001a23c0, 0x0) /Users/wichardriezebos/go/pkg/mod/github.com/dosco/graphjin/serv/[email protected]/ws.go:109 +0x200 github.com/dosco/graphjin/serv/v3.(*HttpService).apiV1GraphQL.func1({0x103da3c48, 0x140005b4000}, 0x140001a23c0) /Users/wichardriezebos/go/pkg/mod/github.com/dosco/graphjin/serv/[email protected]/http.go:124 +0x3fc net/http.HandlerFunc.ServeHTTP(0x14000530820?, {0x103da3c48?, 0x140005b4000?}, 0x140001a23c0?) /opt/homebrew/Cellar/go/1.24.2/libexec/src/net/http/server.go:2294 +0x38 github.com/dosco/graphjin/serv/v3.apiV1Handler.(*Cors).Handler.func1({0x103da3c48, 0x140005b4000}, 0x140001a23c0) /Users/wichardriezebos/go/pkg/mod/github.com/rs/[email protected]/cors.go:289 +0x19c net/http.HandlerFunc.ServeHTTP(0x9?, {0x103da3c48?, 0x140005b4000?}, 0x4?) /opt/homebrew/Cellar/go/1.24.2/libexec/src/net/http/server.go:2294 +0x38 github.com/dosco/graphjin/serv/v3.apiV1Handler.Handler.func2({0x103da3c48, 0x140005b4000}, 0x140001a23c0) /Users/wichardriezebos/go/pkg/mod/github.com/dosco/graphjin/serv/[email protected]/internal/etags/etag.go:13 +0xd4 net/http.HandlerFunc.ServeHTTP(0x1047a33f0?, {0x103da3c48?, 0x140005b4000?}, 0x4?) /opt/homebrew/Cellar/go/1.24.2/libexec/src/net/http/server.go:2294 +0x38 github.com/klauspost/compress/gzhttp.NewWrapper.func1.1({0x103da36a8, 0x140005a80e0}, 0x140001a23c0) /Users/wichardriezebos/go/pkg/mod/github.com/klauspost/[email protected]/gzhttp/compress.go:495 +0x450 net/http.HandlerFunc.ServeHTTP(0x140005b0000?, {0x103da36a8?, 0x140005a80e0?}, 0x1400070e004?) /opt/homebrew/Cellar/go/1.24.2/libexec/src/net/http/server.go:2294 +0x38 github.com/go-chi/chi/v5.(*Mux).routeHTTP(0x1400011a9c0, {0x103da36a8, 0x140005a80e0}, 0x140001a23c0) /Users/wichardriezebos/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:459 +0x280 net/http.HandlerFunc.ServeHTTP(0x103da6190?, {0x103da36a8?, 0x140005a80e0?}, 0x10479b350?) /opt/homebrew/Cellar/go/1.24.2/libexec/src/net/http/server.go:2294 +0x38 github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0x1400011a9c0, {0x103da36a8, 0x140005a80e0}, 0x140001a2280) /Users/wichardriezebos/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:90 +0x280 net/http.serverHandler.ServeHTTP({0x140007b20f0?}, {0x103da36a8?, 0x140005a80e0?}, 0x6?) /opt/homebrew/Cellar/go/1.24.2/libexec/src/net/http/server.go:3301 +0xbc net/http.(*conn).serve(0x140007ae120, {0x103da6158, 0x140004b6e10}) /opt/homebrew/Cellar/go/1.24.2/libexec/src/net/http/server.go:2102 +0x52c created by net/http.(*Server).Serve in goroutine 1 /opt/homebrew/Cellar/go/1.24.2/libexec/src/net/http/server.go:3454 +0x3d8

Expected behaviour and actual result.

WichardRiezebos avatar May 07 '25 14:05 WichardRiezebos