fh1ch / node-bacstack

A BACnet protocol stack written in pure JavaScript
MIT License
174 stars 98 forks source link

RangeError [ERR_OUT_OF_RANGE]: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 0 #135

Open TsuFujiwara opened 5 years ago

TsuFujiwara commented 5 years ago

Hello, I try to use writePropertyMultiple and I get this error .

internal/buffer.js:53
 throw new ERR_OUT_OF_RANGE(type || 'offset',   
 ^

RangeError[ERR_OUT_OF_RANGE]: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 0
at boundsError (internal/buffer.js:53:9)     
at Uint8Array.readUIntBE (internal/buffer.js:160:3)     
at module.exports.decodeUnsigned (C:\Users\home\node-bacstack\node_modules\bacstack\lib\asn1.js:87:19)     
at Object.module.exports.decodeEnumerated (C:\Users\home\node-bacstack\node_modules\bacstack\lib\asn1.js:92:10)     
at Object.module.exports.decodeError (C:\Users\home\node-bacstack\node_modules\bacstack\lib\services.js:964:27)     
at processError (C:\Users\home\node-bacstack\node_modules\bacstack\lib\client.js:93:29)     
at handlePdu (C:\Users\home\node-bacstack\node_modules\bacstack\lib\client.js:308:9)     
at handleNpdu (C:\Users\home\node-bacstack\node_modules\bacstack\lib\client.js:342:5)     
at self.receiveData (C:\Users\home\node-bacstack\node_modules\bacstack\lib\client.js:353:7)     
at Socket.<anonymous> (C:\Users\home\node-bacstack\node_modules\bacstack\lib\transport.js:13:25)

Any idea what happens? Thanks in advance.

Node Version: v10.15.0 Node BACstack Version: 0.0.1-beta.13

Apollon77 commented 4 years ago

Can you please check with the updated fork at https://github.com/BiancoRoyal/node-bacstack and tell us if it works or open an issue there.