drachtio / drachtio-sip

sip message implementation for dracht.io
MIT License
4 stars 9 forks source link

App Crashed with the following error.. #7

Open jbmyid opened 3 years ago

jbmyid commented 3 years ago

App Crashed with the following error.

/home/asdf/node_modules/drachtio-sip/lib/message.js:14 Object.assign(this.headers, msg.headers || {});

TypeError: Cannot read property 'headers' of undefined at new SipMessage (/home/asdf/node_modules/drachtio-sip/lib/message.js:14:39) at DrachtioAgent._onMsg (/home/asdf/node_modules/drachtio-srf/lib/drachtio-agent.js:548:24) at WireProtocol.emit (events.js:310:20) at WireProtocol.EventEmitter.emit (domain.js:482:12) at WireProtocol.processMessageBuffer (/home/asdf/node_modules/drachtio-srf/lib/wire-protocol.js:270:12) at WireProtocol._onData (/home/asdf/node_modules/drachtio-srf/lib/wire-protocol.js:304:14) at Socket.emit (events.js:310:20) at Socket.EventEmitter.emit (domain.js:482:12) at addChunk (_stream_readable.js:286:12) at readableAddChunk (_stream_readable.js:264:11)

The app was running fine, and the next day it was crashed with the above error. There was no more trace other than this.

davehorton commented 3 years ago

what version of drachtio-srf are you using?

davehorton commented 3 years ago

can you update to drachtio 4.4.45 and try again?

t seems like the issue is that the SIP message coming in is unparseable -- that was causing the crash. I have modified the code in 4.4.45 to log the unparseable message and continue. It should not crash, but I need you to see if you can find a log message including 'unable to parse incoming message'.

Please test with this version and let me know if you see the message above, and provide details on it

jbmyid commented 3 years ago

The version we are using is 4.4.44.

Will try 4.4.45.