Closed mehr74 closed 3 months ago
Thanks, can you add yourself to the CONTRIBUTORS file please?
I haven't run that code in a long time, is it working?
Added my name to CONTRIBUTORS @ardan-bkennedy.
The frontend is operational, but when adding a new user, I get CORS issues in the backend, which is not handled. I'm looking into the cause of it.
{"time":"2024-08-06T12:33:39.236979259Z","level":"ERROR","file":"server.go:3416","msg":"http: panic serving 192.168.65.1:62240: runtime error: invalid memory address or nil pointer dereference\ngoroutine 182 [running]:\nnet/http.(*conn).serve.func1()\n\t/usr/local/go/src/net/http/server.go:1903 +0xb0\npanic({0xbd03c0?, 0x1cd5980?})\n\t/usr/local/go/src/runtime/panic.go:770 +0x124\ngithub.com/ardanlabs/service/foundation/web.(*App).corsHandler-fm.(*App).corsHandler.func1({0x1400f88, 0x4000578f00}, 0x40004f6900)\n\t/service/foundation/web/web.go:94 +0x68\ngithub.com/ardanlabs/service/foundation/web.(*App).EnableCORS.func2({0x120?, 0xffff7fe38108?}, 0x120?)\n\t/service/foundation/web/web.go:81 +0x48\nnet/http.HandlerFunc.ServeHTTP(0x4000300340?, {0x14002f0?, 0x400045b0e0?}, 0x77bf28?)\n\t/usr/local/go/src/net/http/server.go:2171 +0x38\nnet/http.(*ServeMux).ServeHTTP(0x1400f88?, {0x14002f0, 0x400045b0e0}, 0x40004f6900)\n\t/usr/local/go/src/net/http/server.go:2688 +0x1a4\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*middleware).serveHTTP(0x4000328000, {0x13fe350, 0x4000517340}, 0x40004f67e0, {0x13f34e0, 0x4000300340})\n\t/service/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go:218 +0xdec\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewMiddleware.func1.1({0x13fe350?, 0x4000517340?}, 0x4000097b18?)\n\t/service/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go:74 +0x40\nnet/http.HandlerFunc.ServeHTTP(0x4000097b68?, {0x13fe350?, 0x4000517340?}, 0x2f2784?)\n\t/usr/local/go/src/net/http/server.go:2171 +0x38\ngithub.com/ardanlabs/service/foundation/web.(*App).ServeHTTP(0x0?, {0x13fe350?, 0x4000517340?}, 0x4000097b50?)\n\t/service/foundation/web/web.go:66 +0x30\nnet/http.serverHandler.ServeHTTP({0x4000578de0?}, {0x13fe350?, 0x4000517340?}, 0x6?)\n\t/usr/local/go/src/net/http/server.go:3142 +0xbc\nnet/http.(*conn).serve(0x40005394d0, {0x1400f88, 0x4000306cf0})\n\t/usr/local/go/src/net/http/server.go:2044 +0x508\ncreated by net/http.(*Server).Serve in goroutine 19\n\t/usr/local/go/src/net/http/server.go:3290 +0x3f0","service":"SALES"}
Current Makefile is pointing to the wrong path for frontend. Gitignore also configured to point to the existing frontend path.