express-socket.io-session
express-socket.io-session copied to clipboard
Crashing on URL issue?
Hello!
Thanks for this wondering plugin!
I'm receiving an error that's crashing my server whenever a new io() object is created in my browser. Express seems to be looking for a non-existent req.originalUrl field, then crashing when it doesn't find it. I'd really like to use this library, but this issue is preventing me.
I'm using Node 0.10.25, Express ~4.0.0, and Express-socket.io-session ~1.3.1
Thanks!
url.js:107 throw new TypeError("Parameter 'url' must be a string, not " + typeof url) ^ TypeError: Parameter 'url' must be a string, not undefined at Url.parse (url.js:107:11) at urlParse (url.js:101:5) at session (/home/ubuntu/whynotmedia/trunk/server/node_modules/express-session/index.js:98:24) at /home/ubuntu/whynotmedia/trunk/server/node_modules/express-socket.io-session/index.js:66:7 at cookieParser (/home/ubuntu/whynotmedia/trunk/server/node_modules/express-socket.io-session/node_modules/cookie-parser/index.js:48:5) at Array.socketIoSharedSessionMiddleware as 0 at run (/home/ubuntu/whynotmedia/trunk/server/node_modules/socket.io/lib/namespace.js:114:11) at Namespace.run (/home/ubuntu/whynotmedia/trunk/server/node_modules/socket.io/lib/namespace.js:126:3) at Namespace.add (/home/ubuntu/whynotmedia/trunk/server/node_modules/socket.io/lib/namespace.js:155:8) at Client.connect (/home/ubuntu/whynotmedia/trunk/server/node_modules/socket.io/lib/client.js:74:20) at Server.onconnection (/home/ubuntu/whynotmedia/trunk/server/node_modules/socket.io/lib/index.js:315:10) at Server.EventEmitter.emit (events.js:95:17) at Server.handshake (/home/ubuntu/whynotmedia/trunk/server/node_modules/socket.io/node_modules/engine.io/lib/server.js:262:8) at /home/ubuntu/whynotmedia/trunk/server/node_modules/socket.io/node_modules/engine.io/lib/server.js:184:12 at Server.checkRequest (/home/ubuntu/whynotmedia/trunk/server/node_modules/socket.io/lib/index.js:68:51) at Server.verify (/home/ubuntu/whynotmedia/trunk/server/node_modules/socket.io/node_modules/engine.io/lib/server.js:127:17)
I'm getting the same error using:
- node v0.10.45
- express v4.4.5
- express-session v1.6.3
- express-socket.io-session v1.3.1
@pthai Did you manage to get it working? Would love to know how you got around this.