markabrahams / node-asn1-ber

Generate and parse ASN.1 BER objects
7 stars 8 forks source link

InvalidAsn1Error on ans1-ber #25

Open mohanrajanna15 opened 1 year ago

mohanrajanna15 commented 1 year ago

Can someone explain the below error?

Critical uncaught exception: Error [InvalidAsn1Error]: Expected 0x4: got 0x0 at InvalidAsn1Error (product/node_modules/asn1-ber/lib/ber/errors.js:4:11) at Reader.readString (product/node_modules/asn1-ber/lib/ber/reader.js:179:9) at new ResponseMessage (product/node_modules/net-snmp/index.js:532:26) at Session.onMsg (product/node_modules/net-snmp/index.js:911:17) at Socket.emit (events.js:375:28) at UDP.onMessage [as onmessage] (dgram.js:941:8) at UDP.callbackTrampoline (internal/async_hooks.js:131:17)

markabrahams commented 2 months ago

Typically this would indicate that your data does not adhere to the rules of BER encoding, which are used by the library to deconstruct the data.