Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

battle is undefined (not sure how to reproduce) #14

Open
s4y opened this issue Aug 28, 2011 · 1 comment
Open

battle is undefined (not sure how to reproduce) #14

s4y opened this issue Aug 28, 2011 · 1 comment
Labels

Comments

@s4y
Copy link

s4y commented Aug 28, 2011

/Users/sidtech/src/notmysegfault/server.js:197
        battle.state = 'fighting';
               ^
28 Aug 12:34:29 - [ERROR] TypeError
TypeError: Cannot set property 'state' of undefined
    at Socket.<anonymous> (/Users/sidtech/src/notmysegfault/server.js:197:16)
    at Socket.$emit (events.js:61:17)
    at SocketNamespace.handlePacket (/Users/sidtech/src/notmysegfault/node_modules/socket.io/lib/namespace.js:330:20)
    at Manager.onClientMessage (/Users/sidtech/src/notmysegfault/node_modules/socket.io/lib/manager.js:436:38)
    at WebSocket.onMessage (/Users/sidtech/src/notmysegfault/node_modules/socket.io/lib/transport.js:387:20)
    at Parser.<anonymous> (/Users/sidtech/src/notmysegfault/node_modules/socket.io/lib/transports/websocket.js:37:10)
    at Parser.emit (events.js:64:17)
    at Parser.parse (/Users/sidtech/src/notmysegfault/node_modules/socket.io/lib/transports/websocket.js:331:12)
    at Parser.add (/Users/sidtech/src/notmysegfault/node_modules/socket.io/lib/transports/websocket.js:303:8)
    at Socket.<anonymous> (/Users/sidtech/src/notmysegfault/node_modules/socket.io/lib/transports/websocket.js:157:17)
@s4y
Copy link
Author

s4y commented Aug 28, 2011

again, in production:

data:   2011-08-28T19:45:27.795Z jsninjabattle: /usr/local/src/see/jsninjabattle/notmysegfault/server.js:240
data:   2011-08-28T19:45:27.795Z jsninjabattle:         battle.sockets.forEach(function(socket) {
data:   2011-08-28T19:45:27.795Z jsninjabattle:         ^
data:   2011-08-28T19:45:27.794Z jsninjabattle: TypeError: Cannot read property 'sockets' of undefined
data:   2011-08-28T19:45:27.794Z jsninjabattle:     at Socket.<anonymous> (/usr/local/src/see/jsninjabattle/notmysegfault/server.js:240:9)
data:   2011-08-28T19:45:27.794Z jsninjabattle:     at Socket.$emit (events.js:64:17)
data:   2011-08-28T19:45:27.794Z jsninjabattle:     at SocketNamespace.handlePacket (/usr/local/src/see/jsninjabattle/notmysegfault/node_modules/socket.io/...
data:   2011-08-28T19:45:27.794Z jsninjabattle:     at Manager.onClientMessage (/usr/local/src/see/jsninjabattle/notmysegfault/node_modules/socket.io/lib/m...
data:   2011-08-28T19:45:27.794Z jsninjabattle:     at WebSocket.onMessage (/usr/local/src/see/jsninjabattle/notmysegfault/node_modules/socket.io/lib/trans...
data:   2011-08-28T19:45:27.794Z jsninjabattle:     at Parser.<anonymous> (/usr/local/src/see/jsninjabattle/notmysegfault/node_modules/socket.io/lib/transp...
data:   2011-08-28T19:45:27.794Z jsninjabattle:     at Parser.emit (events.js:64:17)
data:   2011-08-28T19:45:27.794Z jsninjabattle:     at Parser.parse (/usr/local/src/see/jsninjabattle/notmysegfault/node_modules/socket.io/lib/transports/w...
data:   2011-08-28T19:45:27.794Z jsninjabattle:     at Parser.add (/usr/local/src/see/jsninjabattle/notmysegfault/node_modules/socket.io/lib/transports/web...
data:   2011-08-28T19:45:27.794Z jsninjabattle:     at Socket.<anonymous> (/usr/local/src/see/jsninjabattle/notmysegfault/node_modules/socket.io/lib/transp...

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

No branches or pull requests

1 participant