Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Cannot call method 'push' of undefined #4

Closed
lboynton opened this issue Feb 10, 2012 · 2 comments
Closed

Cannot call method 'push' of undefined #4

lboynton opened this issue Feb 10, 2012 · 2 comments

Comments

@lboynton
Copy link
Contributor

Just had one of my bosh servers die with this error:

/usr/lib/nodejs/node-xmpp-bosh/src/session.js:807
this.pending_bosh_responses[stream.name].push(attrs);
^
TypeError: Cannot call method 'push' of undefined
at Object.enqueue_bosh_response (/usr/lib/nodejs/node-xmpp-bosh/src/session.js:807:50)
at Object.send_stream_terminate_response (/usr/lib/nodejs/node-xmpp-bosh/src/stream.js:79:17)
at /usr/lib/nodejs/node-xmpp-bosh/src/session.js:633:24
at Array.forEach (native)
at Object.handle_client_stream_terminate_request (/usr/lib/nodejs/node-xmpp-bosh/src/session.js:625:30)
at Object._process_one_request (/usr/lib/nodejs/node-xmpp-bosh/src/session.js:276:18)
at Object.process_requests (/usr/lib/nodejs/node-xmpp-bosh/src/session.js:320:22)
at process_bosh_request (/usr/lib/nodejs/node-xmpp-bosh/src/bosh.js:182:25)
at bosh_request_handler (/usr/lib/nodejs/node-xmpp-bosh/src/bosh.js:237:9)
at /usr/lib/nodejs/node-xmpp-bosh/src/http-server.js:69:17

I assume the pending_bosh_responses[stream.name] array hasn't been initialised for some reason. I've temporarily fixed this by checking if it's undefined just before push is called on it, and initialising it if so, but there is probably a better fix.

node-xmpp-bosh 0.5.6
nodejs 0.6.8
CentOS 5.7

@dhruvbird
Copy link
Collaborator

Yes, this is a known bug which has been fixed on master (which is currently not stable). We'll release a download in a few days.

satyamshekhar added a commit that referenced this issue Feb 11, 2012
@lboynton
Copy link
Contributor Author

Thanks, will test once released.

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

No branches or pull requests

2 participants