auth icon indicating copy to clipboard operation
auth copied to clipboard

Panic error in middleware when using Send SMS Hook

Open Imperacltd opened this issue 1 month ago • 0 comments

  1. full panic stack trace. below
  2. both HTTP and PostgreSQL hooks cause the same panic

"{"component":"api","error":"500: Internal Server Error","level":"error","method":"POST","msg":"500: Internal Server Error","panic":"interface conversion: interface {} is nil, not string","path":"/signup","referer":"https://preview--agro-naija-ask.lovable.app/","remote_addr":"81.221.149.106","request_id":"9a45420c471a8bbd-ZRH","stack":"goroutine 75 [running]:\nruntime/debug.Stack()\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/runtime/debug/stack.go:26 +0x64\ngithub.com/supabase/auth/internal/api.recoverer.func1.1()\n\t/home/runner/work/auth/auth/internal/api/errors.go:49 +0x60\npanic({0xcc3c40?, 0x4000575e00?})\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/runtime/panic.go:791 +0x124\ngithub.com/supabase/auth/internal/api.NewAPIWithVersion.timeoutMiddleware.func5.1({0xffff42f11fa0, 0x400035a300}, 0x4000304780)\n\t/home/runner/work/auth/auth/internal/api/middleware.go:431 +0x2cc\nnet/http.HandlerFunc.ServeHTTP(0x40004ec0e0?, {0xffff42f11fa0?, 0x400035a300?}, 0x10ef1c0?)\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/net/http/server.go:2220 +0x38\ngithub.com/supabase/auth/internal/api.recoverer.func1({0xffff42f11fa0?, 0x400035a300?}, 0x40004ec0e0?)\n\t/home/runner/work/auth/auth/internal/api/errors.go:62 +0x70\nnet/http.HandlerFunc.ServeHTTP(0x4000304780?, {0xffff42f11fa0?, 0x400035a300?}, 0x932dcc?)\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/net/http/server.go:2220 +0x38\ngithub.com/sebest/xff.(*XFF).Handler-fm.(*XFF).Handler.func1({0xffff42f11fa0, 0x400035a300}, 0x4000304780)\n\t/home/runner/go/pkg/mod/github.com/sebest/[email protected]/xff.go:128 +0x94\nnet/http.HandlerFunc.ServeHTTP(0x19b2300?, {0xffff42f11fa0?, 0x400035a300?}, 0x30?)\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/net/http/server.go:2220 +0x38\ngithub.com/go-chi/chi/v5/middleware.RequestLogger.func1.1({0x11042c0, 0x40001909a0}, 0x4000304640)\n\t/home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/logger.go:55 +0x118\nnet/http.HandlerFunc.ServeHTTP(0x10f8bc0?, {0x11042c0?, 0x40001909a0?}, 0x3b7abc?)\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/net/http/server.go:2220 +0x38\ngithub.com/supabase/auth/internal/api.NewAPIWithVersion.NewStructuredLogger.func3.1({0x11042c0, 0x40001909a0}, 0x4000304640)\n\t/home/runner/work/auth/auth/internal/observability/request-logger.go:37 +0x124\nnet/http.HandlerFunc.ServeHTTP(0x4000304500?, {0x11042c0?, 0x40001909a0?}, 0xba6b2a934aaa0988?)\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/net/http/server.go:2220 +0x38\ngithub.com/supabase/auth/internal/api.NewAPIWithVersion.AddRequestID.func4.1({0x11042c0, 0x40001909a0}, 0x4000304500)\n\t/home/runner/work/auth/auth/internal/observability/request-logger.go:25 +0xd4\nnet/http.HandlerFunc.ServeHTTP(0x1108750?, {0x11042c0?, 0x40001909a0?}, 0x19abc40?)\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/net/http/server.go:2220 +0x38\ngithub.com/go-chi/chi/v5.(*Mux).ServeHTTP(0x400040b7a0, {0x11042c0, 0x40001909a0}, 0x4000304000)\n\t/home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:90 +0x280\ngithub.com/supabase/auth/internal/api.(*router).ServeHTTP(0x40003016c0?, {0x11042c0?, 0x40001909a0?}, 0x4000304000?)\n\t/home/runner/work/auth/auth/internal/api/router.go:55 +0x30\ngithub.com/supabase/auth/internal/api.NewAPIWithVersion.(*Cors).Handler.func9({0x11042c0, 0x40001909a0}, 0x4000304000)\n\t/home/runner/go/pkg/mod/github.com/rs/[email protected]/cors.go:289 +0x19c\nnet/http.HandlerFunc.ServeHTTP(0x4000363b28?, {0x11042c0?, 0x40001909a0?}, 0xffff89cb9108?)\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/net/http/server.go:2220 +0x38\ngithub.com/supabase/auth/internal/api.(*API).ServeHTTP(0x400035a1ec?, {0x11042c0?, 0x40001909a0?}, 0x3c67a8?)\n\t/home/runner/work/auth/auth/internal/api/api.go:415 +0x30\ngithub.com/supabase/auth/internal/reloader.(*AtomicHandler).ServeHTTP(0x10?, {0x11042c0?, 0x40001909a0?}, 0x40001909a0?)\n\t/home/runner/work/auth/auth/internal/reloader/handler.go:41 +0x80\nnet/http.serverHandler.ServeHTTP({0x11000c0?}, {0x11042c0?, 0x40001909a0?}, 0x6?)\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/net/http/server.go:3210 +0xbc\nnet/http.(*conn).serve(0x40004fc090, {0x1108718, 0x40003225a0})\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/net/http/server.go:2092 +0x4fc\ncreated by net/http.(*Server).Serve in goroutine 1\n\t/opt/hostedtoolcache/go/1.23.7/x64/src/net/http/server.go:3360 +0x3dc\n","time":"2025-11-26T00:27:05Z"}"

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to '…'
  2. Click on '…'
  3. Scroll down to '…'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

Add any other context about the problem here.

Imperacltd avatar Nov 26 '25 00:11 Imperacltd