Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TypeError: Object #<WebSocket> has no method 'payload' #523

Closed
level09 opened this issue Sep 13, 2011 · 6 comments
Closed

TypeError: Object #<WebSocket> has no method 'payload' #523

level09 opened this issue Sep 13, 2011 · 6 comments
Labels
bug Something isn't working

Comments

@level09
Copy link

level09 commented Sep 13, 2011

/home/realtime/node_modules/socket.io/lib/manager.js:624
        transport.payload(this.closed[data.id]);
                  ^
TypeError: Object #<WebSocket> has no method 'payload'
    at Manager.handleClient (/home/realtime/node_modules/socket.io/lib/manager.js:624:19)
    at Manager.handleUpgrade (/home/realtime/node_modules/socket.io/lib/manager.js:578:8)
    at Server.<anonymous> (/home/realtime/node_modules/socket.io/lib/manager.js:104:10)
    at Server.emit (events.js:81:20)
    at Socket.<anonymous> (http.js:1045:14)
    at Socket._onReadable (net.js:683:27)
    at IOWatcher.onReadable [as callback] (net.js:177:10)
@3rd-Eden
Copy link
Contributor

got steps to reproduce?

@level09
Copy link
Author

level09 commented Sep 13, 2011

No idea how this happened, just got a huge number of connections (around 10K) . will see if I can get it again.

@nookiepl
Copy link

+1 for this, same exception, same traceback.

@kainosnoema
Copy link

+1, we've been getting this randomly recently, even with very few connections. Same backtrace, slightly different line numbers:

/home/deploy/whistle/node_modules/socket.io/lib/manager.js:610
        transport.payload(this.closed[data.id]);
                  ^
TypeError: Object #<WebSocket> has no method 'payload'
    at Manager.handleClient (/home/deploy/whistle/node_modules/socket.io/lib/manager.js:610:19)
    at Manager.handleUpgrade (/home/deploy/whistle/node_modules/socket.io/lib/manager.js:564:8)
    at HTTPServer.<anonymous> (/home/deploy/whistle/node_modules/socket.io/lib/manager.js:100:10)
    at HTTPServer.emit (events.js:81:20)
    at Socket.<anonymous> (http.js:1017:14)
    at Socket._onReadable (net.js:677:27)
    at IOWatcher.onReadable [as callback] (net.js:177:10)

@kainosnoema
Copy link

It must be using the hybi-07-12 transport, which doesn't provide the payload method.

It looks like WebSocket#payload is used exclusively for writing messages that were dispatched after a client is closed, once its been reopened. I'm ignorant about WebSocket implementations, but is there any reason why hybi-07-12 can't handle those in a similar way? If not, maybe the WebSocket#payload method for hybi-07-12 should be a noop.

@einaros
Copy link
Contributor

einaros commented Sep 20, 2011

Ok, confirmed and fixed this. Will open a pull req after fixing another issue as well.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants