panic: runtime error: invalid memory address or nil pointer dereference[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2222501]goroutine 566 [running]:github.com/coder/coder/v2/coderd.(*OIDCConfig).TokenSource(0x14ec6a30?, {0x96cdb10?, 0xc0134cf3e0?}, 0x27286230?) <autogenerated>:1 +0x21github.com/coder/coder/v2/coderd/provisionerdserver.obtainOIDCAccessToken({0x96cdb10, 0xc0134cf3e0}, {0x9743df8, 0xc000ec87e0}, {0x96c7740, 0x0}, {0x47, 0x4d, 0xca, 0x46, ...}) /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver.go:2024 +0x322github.com/coder/coder/v2/coderd/provisionerdserver.(*server).acquireProtoJob(_, {_, _}, {{0x86, 0x61, 0x84, 0xd, 0x1f, 0xc2, 0x44, ...}, ...}) /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver.go:503 +0x20fegithub.com/coder/coder/v2/coderd/provisionerdserver.(*server).AcquireJobWithCancel(0xc01346d380, {0x96dd800, 0xc000968e40}) /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver.go:390 +0xb9agithub.com/coder/coder/v2/provisionerd/proto.DRPCProvisionerDaemonDescription.Method.func2({0x2de0c20?, 0xc01346d380}, {0xc000bcffc0?, 0x34?}, {0x2e33760?, 0xc0133f26c8}, {0x54d0b4?, 0x96cd608?}) /home/runner/work/coder/coder/provisionerd/proto/provisionerd_drpc.pb.go:197 +0x134storj.io/drpc/drpcmux.(*Mux).HandleRPC(0x30?, {0x96d6be0, 0xc0133f26c8}, {0xc000bcffc0, 0x34}) /home/runner/go/pkg/mod/storj.io/drpc@v0.0.33/drpcmux/handle_rpc.go:33 +0x207github.com/coder/coder/v2/coderd/tracing.(*DRPCHandler).HandleRPC(0xc000778da0, {0x96d6be0, 0xc0133f26c8}, {0xc000bcffc0, 0x34}) /home/runner/work/coder/coder/coderd/tracing/drpc.go:23 +0x1bbstorj.io/drpc/drpcserver.(*Server).handleRPC(0xc013461dc0?, 0xc0133f26c8, {0xc000bcffc0?, 0xb0b7d00?}) /home/runner/go/pkg/mod/storj.io/drpc@v0.0.33/drpcserver/server.go:124 +0x36storj.io/drpc/drpcserver.(*Server).ServeOne(0xc000b62000, {0x96d1cc8, 0xc0134cf320}, {0x7f57576e2b20?, 0xc013468818?}) /home/runner/go/pkg/mod/storj.io/drpc@v0.0.33/drpcserver/server.go:66 +0x1d2storj.io/drpc/drpcserver.(*Server).Serve.func2({0x96d1cc8?, 0xc0134cf320?}) /home/runner/go/pkg/mod/storj.io/drpc@v0.0.33/drpcserver/server.go:114 +0x57storj.io/drpc/drpcctx.(*Tracker).track(0xc0134cf320, 0x0?) /home/runner/go/pkg/mod/storj.io/drpc@v0.0.33/drpcctx/tracker.go:35 +0x25created by storj.io/drpc/drpcctx.(*Tracker).Run in goroutine 563 /home/runner/go/pkg/mod/storj.io/drpc@v0.0.33/drpcctx/tracker.go:30 +0x79
We should instead return early here instead of trying to continue the OIDC flow.
Uh oh!
There was an error while loading.Please reload this page.
This happend to@timquinlan and myself when we tried manually converting an OIDC user to password login type. We had updated the user row directly in the database without removing the corresponding
user_link
. We then created some provisioner jobs, which caused Coder (v2.15.3+6f68315) to panic with the following:Looking at the defintion of
obtainOIDCAccessToken
, I think the culprit is:We should instead return early here instead of trying to continue the OIDC flow.