Skip to content

Auth 0.38.0 causes panics and auth problems #630

@dionjwa

Description

@dionjwa

This issue is causing all kinds of hard to debug auth issues. Downgrading auth to 0.37.1 solved the crashes reported below

[auth]
version = '0.38.0'
auth-1  | {"time":"2025-05-08T17:15:08.821332611Z","level":"INFO","msg":"call completed","trace":{"trace_id":"796273be-12f2-4c42-9171-0a8c8ffc7f58","span_id":"","parent_span_id":""},"request":{"client_ip":"127.0.0.1","method":"HEAD","url":"/healthz"},"response":{"status_code":200,"latency_time":936732,"errors":null}}
auth-1  | {"time":"2025-05-08T17:15:13.877288358Z","level":"INFO","msg":"call completed","trace":{"trace_id":"7acd5c4c-5045-4c73-b9c2-1e4b87f5fe0f","span_id":"","parent_span_id":""},"request":{"client_ip":"127.0.0.1","method":"HEAD","url":"/healthz"},"response":{"status_code":200,"latency_time":3474243,"errors":null}}
auth-1  | {"time":"2025-05-08T17:15:17.005800621Z","level":"ERROR","msg":"could not find user by refresh token","trace":{"trace_id":"f11d6976-6b61-4404-98be-0d23ee3be10a","span_id":"","parent_span_id":""},"request":{"client_ip":"192.168.147.1","method":"POST","url":"/v1/token"}}
auth-1  | {"time":"2025-05-08T17:15:17.005902294Z","level":"INFO","msg":"call completed","trace":{"trace_id":"f11d6976-6b61-4404-98be-0d23ee3be10a","span_id":"","parent_span_id":""},"request":{"client_ip":"192.168.147.1","method":"POST","url":"/v1/token"},"response":{"status_code":401,"latency_time":4734289,"errors":null}}
auth-1  | {"time":"2025-05-08T17:15:17.006203815Z","level":"ERROR","msg":"could not find user by refresh token","trace":{"trace_id":"910f3d14-2e21-45f6-808c-b2a49cb03f45","span_id":"","parent_span_id":""},"request":{"client_ip":"192.168.147.1","method":"POST","url":"/v1/token"}}
auth-1  | {"time":"2025-05-08T17:15:17.006269195Z","level":"INFO","msg":"call completed","trace":{"trace_id":"910f3d14-2e21-45f6-808c-b2a49cb03f45","span_id":"","parent_span_id":""},"request":{"client_ip":"192.168.147.1","method":"POST","url":"/v1/token"},"response":{"status_code":401,"latency_time":8276870,"errors":null}}
auth-1  | {"time":"2025-05-08T17:15:17.006249152Z","level":"ERROR","msg":"could not find user by refresh token","trace":{"trace_id":"cd12cb15-9532-4d35-9b4c-89ddf2302e27","span_id":"","parent_span_id":""},"request":{"client_ip":"192.168.147.1","method":"POST","url":"/v1/token"}}
auth-1  | {"time":"2025-05-08T17:15:17.006420497Z","level":"INFO","msg":"call completed","trace":{"trace_id":"cd12cb15-9532-4d35-9b4c-89ddf2302e27","span_id":"","parent_span_id":""},"request":{"client_ip":"192.168.147.1","method":"POST","url":"/v1/token"},"response":{"status_code":401,"latency_time":2189111,"errors":null}}
auth-1  | {"time":"2025-05-08T17:15:18.912408274Z","level":"INFO","msg":"call completed","trace":{"trace_id":"968afd46-0d42-4f36-9b57-c6418ccad398","span_id":"","parent_span_id":""},"request":{"client_ip":"127.0.0.1","method":"HEAD","url":"/healthz"},"response":{"status_code":200,"latency_time":1131663,"errors":null}}
auth-1  | {"time":"2025-05-08T17:15:23.931682123Z","level":"INFO","msg":"call completed","trace":{"trace_id":"cc6a2488-5ef3-48d4-92ff-ab16c7f8b370","span_id":"","parent_span_id":""},"request":{"client_ip":"127.0.0.1","method":"HEAD","url":"/healthz"},"response":{"status_code":200,"latency_time":734552,"errors":null}}
auth-1  | {"time":"2025-05-08T17:15:28.984665372Z","level":"INFO","msg":"call completed","trace":{"trace_id":"936aad1a-7400-472b-a89d-31747f876e81","span_id":"","parent_span_id":""},"request":{"client_ip":"127.0.0.1","method":"HEAD","url":"/healthz"},"response":{"status_code":200,"latency_time":4685411,"errors":null}}
auth-1  | {"time":"2025-05-08T17:15:31.215003704Z","level":"INFO","msg":"call completed","trace":{"trace_id":"59d85231-afd4-4815-b47a-1e73efb2b750","span_id":"","parent_span_id":""},"request":{"client_ip":"192.168.147.1","method":"POST","url":"/v1/signin/email-password"},"response":{"status_code":200,"latency_time":98504971,"errors":null}}
auth-1  | {"time":"2025-05-08T17:15:34.024451822Z","level":"INFO","msg":"call completed","trace":{"trace_id":"0c377361-3b01-4e01-a1a7-25e0986b43fa","span_id":"","parent_span_id":""},"request":{"client_ip":"127.0.0.1","method":"HEAD","url":"/healthz"},"response":{"status_code":200,"latency_time":1763457,"errors":null}}
auth-1  | {"time":"2025-05-08T17:15:37.55254315Z","level":"INFO","msg":"call completed","trace":{"trace_id":"4ef1e050-0905-4ea1-afdd-311cc203c441","span_id":"","parent_span_id":""},"request":{"client_ip":"192.168.147.1","method":"POST","url":"/v1/token"},"response":{"status_code":200,"latency_time":31117551,"errors":null}}
auth-1  |
auth-1  |
auth-1  | 2025/05/08 17:15:37 [Recovery] 2025/05/08 - 17:15:37 panic recovered:
auth-1  | runtime error: index out of range [0] with length 0
auth-1  | runtime/panic.go:115 (0x46903)
auth-1  | github.com/nhost/hasura-auth/go/controller/workflows.go:447 (0x813243)
auth-1  | github.com/nhost/hasura-auth/go/controller/post_token.go:33 (0x80b247)
auth-1  | github.com/nhost/hasura-auth/go/api/server.gen.go:1634 (0x75ccf7)
auth-1  | github.com/nhost/hasura-auth/go/api/server.gen.go:1640 (0x75ca93)
auth-1  | github.com/nhost/hasura-auth/go/api/server.gen.go:349 (0x753fa7)
auth-1  | github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x862633)
auth-1  | github.com/nhost/hasura-auth/go/middleware/ratelimit/rate_limit.go:119 (0x862614)
auth-1  | github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x521bdf)
auth-1  | github.com/nhost/hasura-auth/go/middleware/logger.go:58 (0x86c063)
auth-1  | github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x521bdf)
auth-1  | github.com/nhost/hasura-auth/go/cmd/cors.go:33 (0x86c467)
auth-1  | github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x52e43b)
auth-1  | github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0x52e41c)
auth-1  | github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x52d303)
auth-1  | github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0x52ce8c)
auth-1  | github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0x52cab3)
auth-1  | net/http/server.go:3210 (0x31ea2b)
auth-1  | net/http/server.go:2092 (0x2ffdab)
auth-1  | runtime/asm_arm64.s:1223 (0x894b3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions