Error creating a tournament

Hello there, I’m trying to create a tournament via server runtime code but I get an error while creating it.

Here is the error : TypeError: expects boolean at*runtimeJavascriptNakamaModule).tournamentCreate.func1 (native)"}

From what I saw the typescript signature doesn’t have the authoritative param anymore and the go signature needs it.

I’m running Nakama version 3.14.0.
I tried downgrading to Nakama 3.13.0 but I still have the error.

Thanks in advance for your help.

Hello @Clement_A_Madbox, it’s likely you’re using an outdated version of the typescript definitions, please update them from master at GitHub - heroiclabs/nakama-common: The runtime framework for Nakama server. .

Thanks for the answer, I’m not sure how to update the nakama common as I have this in my package.json
“dependencies”: {
“nakama-runtime”: “github:heroiclabs/nakama-common”

Delete the node-modules folder, as well as the package.json and package-lock.json files and run npm i ', then recompile.

Thanks a lot it solved my problems!

I have another error when updating nakama-common to the last version when creating a leaderboard I get this
nakama | {“level”:“fatal”,“ts”:“2022-11-28T16:54:13.754Z”,“caller”:“main.go:158”,“msg”:“Failed initializing runtime modules”,“error”:"TypeError: expects sort order to be ‘asc’ or ‘desc’\n\tat*runtimeJavascriptNakamaModule).leaderboardCreate.func1
signature for SortOrder is not correct.
I use Nakama 3.14.0 and the lastest nakama-common

The TS definitions master branch reflects some changes to be included in Nakama 3.15.0 (to be released soon). We shall improve the versioning around the typescript definitions in the future, for now I’d suggest you do not use the provided ENUM but pass in the respective sort order string representation as ‘asc’ or ‘desc’.

I rolled back to tag 1.24 of nakama-common and it seems ok

I’m experiencing the same problem right now. I am using all the latest versions of nakama-runtime, nakama-common.

I tried to set is as string, but typescript won’t allow it.

Edit: For now i have added // @ts-ignore to the line to have typescript ignore the string provided on sortOrder and scoreOperator