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

error on send pdu #233

Open
parsibox opened this issue Jul 6, 2023 · 4 comments
Open

error on send pdu #233

parsibox opened this issue Jul 6, 2023 · 4 comments

Comments

@parsibox
Copy link

parsibox commented Jul 6, 2023

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'

@elhananjair
Copy link

@parsibox as the log implies you are using an instance of Array as a parameter instead of Buffer or Uint8Array. Is the snippet you sent at 37:11 on your source code?

@parsibox
Copy link
Author

it is a real packet
i do not create it myself

@dotsinspace
Copy link

@parsibox did you found out the solution ?

@parsibox
Copy link
Author

@parsibox did you found out the solution ?

no

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

No branches or pull requests

3 participants