It’s been a while I’m stuck on this
ApiResponseException(StatusCode=401, Message=‘Server key invalid’, GrpcStatusCode=16)
The error is clear, the problem is that both my keys on client & server are the same.
{“level”:“info”,“ts”:“2021-02-15T13:52:28.166Z”,“caller”:“server/config.go:87”,“msg”:“Successfully loaded config file”,“path”:“/nk-config/nakama-config.yml”}
Server
# /nk-config/nakama-config.yml
socket:
server_key: fooBar
port: 7350
max_message_size_bytes: 4096 # bytes
...
Client
_client = new Client("http", RemoteConfig.Host, RemoteConfig.Port, "fooBar", UnityWebRequestAdapter.Instance)
I don’t understand … It was working fine and suddenly happening. I tried to change both, rebuild my Docker image, rebuild the client (or simply run from the editor …).
Is it possibly related to some versions?
My Nakama Dockerfile
FROM heroiclabs/nakama-pluginbuilder:3.0.0 AS builder
ENV GO111MODULE on
ENV CGO_ENABLED 1
WORKDIR /backend
COPY . .
RUN go build -mod=mod --trimpath --buildmode=plugin -o ./backend.so ./cmd/main
FROM heroiclabs/nakama:3.0.0
COPY --from=builder /backend/*.so /nakama/data/modules
I deploy Nakama + the DB on Kubernetes using https://github.com/louis030195/helm-charts/tree/main/charts/nakama but that doesn’t matter, the node clearly loads the config, and doing a cat while ssh’ing into the container is what I expect.
Any idea in which direction I should look ?