zabsalahid / serialport-gsm

SerialPort-GSM is a simplified plugin for communicating with gsm modems. (Primarily for sms) (Focused in PDU mode)
MIT License
88 stars 46 forks source link

Incoming USSD and message errors #118

Open umwdeveloper opened 1 year ago

umwdeveloper commented 1 year ago

I am getting following errors I think in onIncomingUSSD or onNewMessage

Error 1 ----- Unhandled Rejection at ----- Promise {

TypeError: Cannot read properties of undefined (reading 'index') at item.logic (C:\Users\DELL\Downloads\Node\node_modules\serialport-gsm\lib\functions\modem.js:157:72) at C:\Users\DELL\Downloads\Node\node_modules\serialport-gsm\lib\functions\modem.js:1118:50 at Array.forEach () at C:\Users\DELL\Downloads\Node\node_modules\serialport-gsm\lib\functions\modem.js:1046:16 at Array.forEach () at modem.dataReceived (C:\Users\DELL\Downloads\Node\node_modules\serialport-gsm\lib\functions\modem.js:1044:11) at SerialPort.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) } **Error 2** ----- Unhandled Rejection at ----- Promise { { status: 'ERROR', request: 'deleteMessage', data: { deleted: [], errors: [Array] } } } ----- Reason ----- { status: 'ERROR', request: 'deleteMessage', data: { deleted: [], errors: [ Error: timeout: {"_events":{},"_eventsCount":1,"command":"AT+CMGD=2","add_time":"2022-11-27T09:50:19.567Z","id":21,"timeout":10000,"execute_time":"2022-11-27T09:50:19.567Z"} at EventEmitter. (C:\Users\DELL\Downloads\Node\node_modules\serialport-gsm\lib\functions\modem.js:946:27) at EventEmitter.emit (node:events:513:28) at Timeout._onTimeout (C:\Users\DELL\Downloads\Node\node_modules\serialport-gsm\lib\functions\modem.js:1030:14) at listOnTimeout (node:internal/timers:564:17) at process.processTimers (node:internal/timers:507:7) ] } }
Apollon77 commented 1 year ago

Which version do you use? Please try the most current 4.0.1

umwdeveloper commented 1 year ago

I updated to latest version but still getting the error

Apollon77 commented 1 year ago

In the same linkes and positions? Please post the current error mesae and I have a look