Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

error on send pdu

Open
#233 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, node.js
Domain
backend

Research direction

Reproduce the failure with the PDU and session.send call in project-test/fake_server.js. Start at PDU.encode in lib/defs.js:545, then trace the _filter and toBuffer calls in lib/pdu.js and the send path in lib/smpp.js. Done means the source of the invalid list entry is identified and the expected send behavior is verified.

Written by the indexing model from the issue text.

Description

hi
i get error on sending this pdu

		var pdu = new smpp.PDU( Buffer.from('0000008f000000050000000000000263313030380001013938393336363830373337300000013430343031303036363630300040000000000000080052050003f3020206310645000a063406450627063106470020062a0644064106460020062b0628062a0020062f06310020063306cc0633062a0645002006f006f906f306f906f306f306f906f306f906f506f1' , 'hex'));
		session.send(pdu)

node:buffer:559
throw new ERR_INVALID_ARG_TYPE(
^

TypeError [ERR_INVALID_ARG_TYPE]: The "list[0]" argument must be an instance of Buffer or Uint8Array. Received an instance of Array
at new NodeError (node:internal/errors:371:5)
at Object.concat (node:buffer:559:13)
at PDU.encode (D:\wamp64\www\product\SmppClient\node_modules\smpp\lib\defs.js:545:17)
at PDU._filter (D:\wamp64\www\product\SmppClient\node_modules\smpp\lib\pdu.js:144:41)
at PDU.toBuffer (D:\wamp64\www\product\SmppClient\node_modules\smpp\lib\pdu.js:177:7)
at Session.send (D:\wamp64\www\product\SmppClient\node_modules\smpp\lib\smpp.js:247:19)
at Session. (D:\wamp64\www\product\SmppClient\project-test\fake_server.js:37:11)
at Session.emit (node:events:390:28)
at Session._extractPDUs (D:\wamp64\www\product\SmppClient\node_modules\smpp\lib\smpp.js:206:8)
at Socket. (D:\wamp64\www\product\SmppClient\node_modules\smpp\lib\smpp.js:93:8) {
code: 'ERR_INVALID_ARG_TYPE'

Dominant language
JavaScript
Stars
434
Forks
194
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from farhadi/node-smpp

All issues in farhadi/node-smpp

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.