Koenkk / zigbee-herdsman

A Node.js Zigbee library
MIT License
481 stars 300 forks source link

fix(ignore): Fix crash due to BigInt serialization #1191

Closed Koenkk closed 2 months ago

Koenkk commented 2 months ago

See title, currently Z2M crashes with:

TypeError: Do not know how to serialize a BigInt
    at JSON.stringify (<anonymous>)
    at ZclFrame.toString (/app/node_modules/zigbee-herdsman/src/zspec/zcl/zclFrame.ts:34:21)
    at Controller.onZclPayload (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:729:69)
    at ZStackAdapter.emit (node:events:517:28)
    at ZStackAdapter.onZnpRecieved (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:1001:26)
    at Znp.emit (node:events:517:28)
    at Znp.onUnpiParsed (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:77:18)
    at Parser.emit (node:events:517:28)
    at Parser.parseNext (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/unpi/parser.ts:46:26)
    at Parser.parseNext (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/unpi/parser.ts:52:22)