[BUG] In the case of new deployment, when obtaining an administrator token and obtaining a user token, an auth error will appear and the service will crash. #2880
Labels
bug
Categorizes issue or PR as related to a bug.
OpenIM Server Version
v3.8.2
Operating System and CPU Architecture
Linux (AMD)
Deployment Method
Source Code Deployment
Bug Description and Steps to Reproduce
ubuntu@ip-172-31-18-24:~/next-im$ panic: runtime error: slice bounds out of range [:2] with capacity 1
goroutine 75 [running]:
github.com/xxxxxxxxxx/next-im/pkg/common/storage/controller.(*authDatabase).checkToken(0xc000115810, {0x1696008?, 0xc00060acc0?}, 0xc000a0d860, 0x7)
/home/ubuntu/next-im/pkg/common/storage/controller/auth.go:161 +0x1158
github.com/xxxxxxxxxx/next-im/pkg/common/storage/controller.(*authDatabase).CreateToken(0xc000115810, {0x1696008, 0xc00060acc0}, {0xc000133230, 0x11}, 0x7)
/home/ubuntu/next-im/pkg/common/storage/controller/auth.go:90 +0xf1
github.com/xxxxxxxxxx/next-im/internal/rpc/auth.(*authServer).GetUserToken(0xc0003a18f0, {0x1696008, 0xc00060acc0}, 0xc0004c2800)
/home/ubuntu/next-im/internal/rpc/auth/auth.go:120 +0x12a
github.com/xxxxxxxxxx/next-protocol/auth._Auth_GetUserToken_Handler.func1({0x1696008?, 0xc00060acc0?}, {0x13b7580?, 0xc0004c2800?})
/root/go/pkg/mod/github.com/xxxxxxxxxx/[email protected]/auth/auth.pb.go:1118 +0xcb
github.com/xxxxxxxxxx/next-im/pkg/common/startrpc.Start[...].prommetricsUnaryInterceptor.func6({0x13b7580?, 0xc0004c2800?}, 0xc000a4f840?, 0x0?)
/home/ubuntu/next-im/pkg/common/startrpc/start.go:185 +0x58
google.golang.org/grpc.getChainUnaryHandler.func1({0x1696008, 0xc00060acc0}, {0x13b7580, 0xc0004c2800})
/root/go/pkg/mod/google.golang.org/[email protected]/server.go:1211 +0xb2
github.com/xxxxxxxxxx/next-tools/mw.RpcServerInterceptor({0x1696008, 0xc00060aa50}, {0x13b7580, 0xc0004c2800}, 0xc000a4f840?, 0xc0004c2840)
/root/go/pkg/mod/github.com/xxxxxxxxxx/[email protected]/mw/rpc_server_interceptor.go:50 +0x233
google.golang.org/grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1({0x1696008, 0xc00060aa50}, {0x13b7580, 0xc0004c2800}, 0xc000a4f840, 0x78?)
/root/go/pkg/mod/google.golang.org/[email protected]/server.go:1202 +0x85
github.com/xxxxxxxxxx/next-protocol/auth._Auth_GetUserToken_Handler({0x13b7040, 0xc0003a18f0}, {0x1696008, 0xc00060aa50}, 0xc000434680, 0xc0000911a0)
/root/go/pkg/mod/github.com/xxxxxxxxxx/[email protected]/auth/auth.pb.go:1120 +0x143
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000031600, {0x1696008, 0xc00060a9c0}, {0x169dc80, 0xc0001309c0}, 0xc0003a6a20, 0xc0003a1980, 0x2168938, 0x0)
/root/go/pkg/mod/google.golang.org/[email protected]/server.go:1394 +0xe2b
google.golang.org/grpc.(*Server).handleStream(0xc000031600, {0x169dc80, 0xc0001309c0}, 0xc0003a6a20)
/root/go/pkg/mod/google.golang.org/[email protected]/server.go:1805 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
/root/go/pkg/mod/google.golang.org/[email protected]/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 72
/root/go/pkg/mod/google.golang.org/[email protected]/server.go:1040 +0x125
Screenshots Link
No response
The text was updated successfully, but these errors were encountered: