# Ninja Battle Sample incompatible since 3.8.0

**URL:** <https://forum.heroiclabs.com/t/ninja-battle-sample-incompatible-since-3-8-0/2934>\
**Category:** Documentation\
**Tags:** getting-started, typescript\
**Created:** [August 16, 2022, 2:02pm UTC](https://forum.heroiclabs.com/t/ninja-battle-sample-incompatible-since-3-8-0/2934 "2022-08-16T14:02:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deity](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/deity/32/1265_2.png) [@Deity](https://forum.heroiclabs.com/u/Deity)\
**Post date:** [August 16, 2022, 2:02pm UTC](https://forum.heroiclabs.com/t/ninja-battle-sample-incompatible-since-3-8-0/2934/1 "2022-08-16T14:02:21Z")

</div>

In the [Ninja Battle sample](https://github.com/heroiclabs/ninja-battle-nakama/tree/main/Nakama), the signal handler function is missing that is required by the Match handlers since 3.8.0.  
I tried to patch it, by adding the code snipper from [Heroic Labs Documentation | Match Handler API](https://heroiclabs.com/docs/nakama/server-framework/typescript-runtime/function-reference/match-handler/#MatchSignal) but I first ended up with error

> TS2345: Argument of type ‘ArrayBuffer’ is not assignable to parameter of type ‘string’

in match\_handler.ts  
And I tried to cast the string to Array Buffer for some of the argument with JSON.parse using  
`new TextDecoder("utf-8").decode`. which get me through the Docker build stage but when I actually trying to spin up the image, I am seeing

> nakama | {“level”:“info”,“ts”:…timestanp…,“caller”:“server/runtime\_javascript.go:578”,“msg”:“Initialising JavaScript runtime provider”,“path”:“/nakama/data/modules”,“entrypoint”:“build/index.js”}  
> nakama | panic: interface conversion: ast.Property is \*ast.PropertyShort, not \*ast.PropertyKeyed [recovered]  
> nakama | panic: interface conversion: ast.Property is \*ast.PropertyShort, not \*ast.PropertyKeyed [recovered]  
> nakama | panic: interface conversion: ast.Property is \*ast.PropertyShort, not \*ast.PropertyKeyed  
> nakama |  
> nakama | goroutine 1 [running]:  
> nakama | [github.com/dop251/goja.AssertFunction.func1.1()](http://github.com/dop251/goja.AssertFunction.func1.1())

at which point I declare my patch attempt fail and come here for advice.

```auto
const matchSignal = function (ctx: nkruntime.Context, logger: nkruntime.Logger, nk: nkruntime.Nakama, dispatcher: nkruntime.MatchDispatcher, tick: number, state: nkruntime.MatchState, data: string) : { state: nkruntime.MatchState, data?: string } | null {
	logger.debug('Lobby match signal received: ' + data);
  
	return {
	  state,
	  data: "Lobby match signal received: " + data
	};
  }

```

📺 **Media:**

---

<div class="post-metadata">

**Author:** ![sean](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sean/32/643_2.png) [@sean](https://forum.heroiclabs.com/u/sean)\
**Post date:** [August 22, 2022, 9:07am UTC](https://forum.heroiclabs.com/t/ninja-battle-sample-incompatible-since-3-8-0/2934/2 "2022-08-22T09:07:50Z")

</div>

Hi @Deity. Thanks for reporting the issue. We’ll update the sample.

---

<div class="post-metadata">

**Author:** ![sean](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sean/32/643_2.png) [@sean](https://forum.heroiclabs.com/u/sean)\
**Post date:** [August 22, 2022, 3:00pm UTC](https://forum.heroiclabs.com/t/ninja-battle-sample-incompatible-since-3-8-0/2934/3 "2022-08-22T15:00:18Z")

</div>

We’ve updated the sample [Updates server to use Nakama 3.13.1 by tomglenn · Pull Request #2 · heroiclabs/ninja-battle-nakama · GitHub](https://github.com/heroiclabs/ninja-battle-nakama/pull/2)
