I still face this problem. Should I do this
delete room
room = null
After leave() room ?
I still face this problem. Should I do this
delete room
room = null
After leave() room ?
@endel Is there any way to fix it ?
Ah.. I'm sorry. I didn't make server crash. Just make the client disconnected.
Yes. It crash server
@globallyltd I have this error when I use and empty State. Then I try create a property in that state object and it works.
React native, When I got this error I'm testing on iOS simulator. It just happen sometime.
Sometime I get this error. What is it and how to fix ?
colyseus:errors RangeError: Invalid WebSocket frame: invalid payload length 126
colyseus:errors at Receiver.getInfo (/home/godate/node_modules/ws/lib/receiver.js:216:16)
colyseus:errors at Receiver.startLoop (/home/godate/node_modules/ws/lib/receiver.js:130:22)
colyseus:errors at Receiver._write (/home/godate/node_modules/ws/lib/receiver.js:77:10)
colyseus:errors at doWrite (_stream_writable.js:415:12)
colyseus:errors at writeOrBuffer (_stream_writable.js:399:5)
colyseus:errors at Receiver.Writable.write (_stream_writable.js:299:11)
colyseus:errors at TLSSocket.socketOnData (/home/godate/node_modules/ws/lib/websocket.js:876:35)
colyseus:errors at TLSSocket.emit (events.js:197:13)
colyseus:errors at addChunk (_stream_readable.js:288:12)
colyseus:errors at readableAddChunk (_stream_readable.js:269:11)
colyseus:errors at TLSSocket.Readable.push (_stream_readable.js:224:10)
colyseus:errors at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:145:17) +0ms```
Wow. It's exactly my situation. I just fixed it by using @endel suggestion.
Thank you
@endel said in How to debug MatchMaker:
ming from your application. If you're using TypeScript, the compiler should be able to warn you where the issue is.
This could be happening if you have if (yourCon
No, it come from the MatchMaker request
Please help me. My product is in public test and prepare for official publish. And I got this problem
Sometime, it has error with matchmaker. Like this
The problem is I don't know where the line of code that cause error. How can I debug. It just happen sometime and when I restart the service, it works again.
I tried run with DEBUG=colyseus:* node index.js
but no error output. I tried to add log in your code and find out that in the CreateRoom function,
const roomsSpawnedByProcessId = yield exports.presence.hgetall(getRoomCountKey());
roomsSpawnedByProcessId is null, I used Redis.
No idea why
As you can see in this console log from client, I removeAllListeners then I leave room. But after that, I still get message from server. How is that possible ?
I'm having problem like this.
( problem is sever wait until async call is finished then process the leave room command - I guest ? )
How to make the leave room immediately and force stop all async call on server.
Thank you
From Client, how to disconnect to server ( not only leave room but close websocket connection ).
I can't find the API to do that.
Thank you
@endel said in Can I access gameServer from Room ?:
e gameServer, but you can access the matchMaker via
Thank you.
Is there anyway to access gameServer from inside a Room class ?