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.
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