theseus icon indicating copy to clipboard operation
theseus copied to clipboard

nodejs: SyntaxError: Unexpected token o

Open mattsoftware opened this issue 11 years ago • 2 comments

Latest sprint (sprint 36 experimental build 0.36.0-11506 (release 942505c3a)) Latest version of node from brew (v0.10.25) Latest version of node-theseus ([email protected]) Latest version of brackets extension (0.4.10 2014-02-10)

Running my node app with node-theseus, which listens to socket.io port, starts fine, client connects to socket.io fine, but when the client sends its first message the following exception occurs...

SyntaxError: Unexpected token o at Object.parse (native) at eval (eval at createTracer (/.../socket.io-2/node_modules/node-theseus/node-theseus.js:169:14), :992:17) at Socket. (/.../socket.io-2/app.js:78:305) at Socket.eval (eval at (eval at createTracer (/.../socket.io-2/node_modules/node-theseus/node-theseus.js:169:14)), :1:90) at Socket.EventEmitter.emit (events.js:95:17) at Socket.global.__tracer.EventEmitter.emit [as $emit](eval at createTracer %28/.../socket.io-2/node_modules/node-theseus/node-theseus.js:169:14%29, :1151:20) at SocketNamespace.handlePacket (/.../socket.io-2/node_modules/socket.io/lib/namespace.js:335:22) at Manager.onClientMessage (/.../socket.io-2/node_modules/socket.io/lib/manager.js:488:38) at WebSocket.Transport.onMessage (/.../socket.io-2/node_modules/socket.io/lib/transport.js:387:20) at Parser. (/.../socket.io-2/node_modules/socket.io/lib/transports/websocket/hybi-16.js:39:10) [node-theseus] caught process.exit() 1 time, not exiting

mattsoftware avatar Feb 14 '14 22:02 mattsoftware

Well that's no good. Lemme see if I can reproduce.

(Sorry about the delay, this e-mail got a little buried.)

alltom avatar Mar 08 '14 22:03 alltom

Hm, could you share the code that crashes? It doesn't occur when I try with https://github.com/alltom/theseus-lab-study-files/tree/master/chat (with the bug fix of listening for 'message' instead of 'msg' here).

What node module versions do you have? All the ones you listed match mine, except I'm running Node 10.4.

alltom avatar Mar 08 '14 22:03 alltom