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

TypeError: Cannot read property 'direction' of undefined #101

Open
mysterywave opened this issue Jul 16, 2017 · 1 comment
Open

TypeError: Cannot read property 'direction' of undefined #101

mysterywave opened this issue Jul 16, 2017 · 1 comment

Comments

@mysterywave
Copy link

[Application][DEBUG] You are running slither-server 0.0.12-dev
[Application][INFO] Starting the server in dev at port 8080...
[Server][INFO] Listening for connections
Snake going to 99

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

@ulwanski
Copy link

Same bug here

> node ./bin/slither

[Application][DEBUG] You are running slither-server 0.0.12-dev
[Application][INFO] Starting the server in dev at port 8080...
[Server][INFO] Listening for connections
Snake going to 99
/usr/src/slither/src/server.coffee:114
          if (value === conn.snake.direction.angle) {
                                   ^

TypeError: Cannot read property 'direction' of undefined
    at Server.module.exports.Server.handleMessage (/usr/src/slither/src/server.coffee:101:39)
    at emitTwo (events.js:126:13)
    at WebSocket.emit (events.js:214:7)
    at Receiver.onbinary (/usr/src/slither/node_modules/ws/lib/WebSocket.js:823:10)
    at /usr/src/slither/node_modules/ws/lib/Receiver.js:537:18
    at /usr/src/slither/node_modules/ws/lib/Receiver.js:361:7
    at /usr/src/slither/node_modules/ws/lib/PerMessageDeflate.js:238:5
    at afterWrite (_stream_writable.js:454:3)
    at onwrite (_stream_writable.js:445:7)
    at InflateRaw.afterTransform (_stream_transform.js:90:3)
    at Zlib.callback (zlib.js:515: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

2 participants