Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server is down when game start #97

Open
ikeda-yuko opened this issue Oct 5, 2016 · 4 comments
Open

Server is down when game start #97

ikeda-yuko opened this issue Oct 5, 2016 · 4 comments

Comments

@ikeda-yuko
Copy link

first, start server.

$ node ./bin/slither

second, access slither.io on chrome and execute.

forceServer("localhost", 8080)

finally, start game. but, server is down :(

console log display following (ver 0.0.12-dev)

/Users/yuko/sandbox/slither/src/server.coffee:114
          if (value === conn.snake.direction.angle) {
                                  ^
TypeError: Cannot read property 'direction' of undefined
  at Server.module.exports.Server.handleMessage (/Users/yuko/sandbox/slither/src/server.coffee:101:38)
  at WebSocket.emit (events.js:110:17)
  at Receiver.onbinary (/Users/yuko/sandbox/slither/node_modules/ws/lib/WebSocket.js:823:10)
  at /Users/yuko/sandbox/slither/node_modules/ws/lib/Receiver.js:537:18
  at /Users/yuko/sandbox/slither/node_modules/ws/lib/Receiver.js:361:7
  at /Users/yuko/sandbox/slither/node_modules/ws/lib/PerMessageDeflate.js:238:5
  at afterWrite (_stream_writable.js:361:3)
  at onwrite (_stream_writable.js:352:7)
  at WritableState.onwrite (_stream_writable.js:105:5)
  at afterTransform (_stream_transform.js:99:5)
  at TransformState.afterTransform (_stream_transform.js:74:12)
  at Zlib.callback (zlib.js:611:5)

I tried 0.0.11... but, I have like that result.
is there any solution ?
thanks :)

@carcabot
Copy link

I'm new into NodeJS, I want to learn little more and I wanted to start with this game :)

I runed into same issue when tried to use slither original client. Maybe this is a client side problem...

@Randy-Ram
Copy link

Any update on this issue? I'm currently experiencing this as well.

@Mergim1992
Copy link

Is there any update on this issue?

@dounoit
Copy link

dounoit commented Jul 24, 2017

I have same problem
I'm a node newbie but this is what I got so far:
[Application][DEBUG] You are running slither-server 0.0.11
[Application][INFO] Starting the server in dev at port 8080...
[Server][INFO] Listening for connections
Snake going to 99
/usr/lib/node_modules/slither-server/src/server.coffee:116
conn.snake.direction.x = x * 125;
^

TypeError: Cannot read property 'direction' of undefined
at Server.module.exports.Server.handleMessage (/usr/lib/node_modules/slither-server/src/server.coffee:104:19)
at emitTwo (events.js:106:13)
at WebSocket.emit (events.js:191:7)
at Receiver.onbinary (/usr/lib/node_modules/slither-server/node_modules/ws/lib/WebSocket.js:823:10)
at /usr/lib/node_modules/slither-server/node_modules/ws/lib/Receiver.js:537:18
at /usr/lib/node_modules/slither-server/node_modules/ws/lib/Receiver.js:361:7
at /usr/lib/node_modules/slither-server/node_modules/ws/lib/PerMessageDeflate.js:238:5
at afterWrite (_stream_writable.js:385:3)
at onwrite (_stream_writable.js:376:7)
at WritableState.onwrite (_stream_writable.js:90:5)
at afterTransform (_stream_transform.js:79:3)
at TransformState.afterTransform (_stream_transform.js:54:12)
at Zlib.callback (zlib.js:639:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants