.../socketio/demo/demo-server/app.js:20
socket.username = data.username;
^
TypeError: Cannot read property 'username' of undefined
at Socket.<anonymous> (.../socketio/demo/demo-server/app.js:20:25)
at emitNone (events.js:86:13)
at Socket.emit (events.js:185:7)
at .../socketio/demo/demo-server/node_modules/socket.io/lib/socket.js:503:12
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
Hi. I've got an error when trying to run demo app on iOS. After emitting 'add user' with JSON object
demo-server throws an error:
at this lines of code:
Looks like JSON data is not transmitted through socket.