Could not open go module Again


  1. Versions: Nakama {3.13.1}, {Windows with Docker}, {client library (SDK) and version}
  2. Server Framework Runtime language {Go}

So I am trying to follow the getting started with GO. And I keep knocking my head against the issue with Plugin was built with different version.
I have tried to follow the guides closely and consoluted the table of Nakama versions. I have also looked through the similar posts relating to this issue. But I still cannot resolve this plugin.

backend     | {"level":"info","ts":"2022-08-24T12:55:34.880Z","caller":"server/runtime.go:596","msg":"Runtime event queue processor started","size":65536,"workers":8}
backend     | {"level":"info","ts":"2022-08-24T12:55:34.880Z","caller":"server/runtime_go.go:2516","msg":"Initialising Go runtime provider","path":"/nakama/data/modules"}
backend     | {"level":"error","ts":"2022-08-24T12:55:34.888Z","caller":"server/runtime_go.go:2612","msg":"Could not open Go module","path":"/nakama/data/modules/","error":"plugin.Open(\"/nakama/data/modules/backend\"): plugin was built with a different version of package"}
backend     | {"level":"error","ts":"2022-08-24T12:55:34.889Z","caller":"server/runtime.go:602","msg":"Error initialising Go runtime provider","error":"plugin.Open(\"/nakama/data/modules/backend\"): plugin was built with a different version of package"}
backend     | {"level":"fatal","ts":"2022-08-24T12:55:34.889Z","caller":"main.go:158","msg":"Failed initializing runtime modules","error":"plugin.Open(\"/nakama/data/modules/backend\"): plugin was built with a different version of package"}

My Dockerfile is as follows

FROM heroiclabs/nakama-pluginbuilder:3.13.0 AS builder


WORKDIR /backend

WORKDIR /backend
COPY go.mod .
COPY main.go .
COPY vendor/ vendor/

RUN go build --trimpath --mod=vendor --buildmode=plugin -o ./

FROM heroiclabs/nakama:3.13.0

COPY --from=builder /backend/ /nakama/data/modules/
COPY local.yml /nakama/data/

And my go.mod is as follows


go 1.17

require v1.24.0

require v1.27.1 // indirect

What is it that I am missing here with the version numbers?

Ok so I was very stuck with this one. I have changed the Nakama version to 3.13.1 and everything is working.

Please note I followed the table here:

And it led to me using Nakama Version 3.13.0 which did not work. I noticed the latest was 3.13.1 and tried that. Which works. A bit painful.

Is there something I have overlooked here?

Thank you - I believe there was regressions around 3.13.0, you should use 3.13.1; I’ll make sure that the team knows about this. (cc @gabe)