generated from AMRC-FactoryPlus/acs-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
The UNS ingester is choking on BigInts. I'm not sure where they're coming from, I though the Sparkplug libraries decoded to Longs, but maybe it's pulling in my function which translates? Either way this will need handling with a custom JSON encoder function, probably.
[13:24:04.757] INFO (ACS UNS Ingester Sparkplug/7): 👶 Received birth certificate for XXX/XXX/XXX with Instance_UUID YYY using Schema_UUID ZZZ
file:///home/node/app/lib/mqttclient.js:398
this.sparkplugBroker.publish(topic, JSON.stringify(payload), {
^
TypeError: Do not know how to serialize a BigInt
at JSON.stringify (<anonymous>)
at file:///home/node/app/lib/mqttclient.js:398:54
at Array.forEach (<anonymous>)
at MQTTClient.publishToUNS (file:///home/node/app/lib/mqttclient.js:364:42)
at MQTTClient.onMessage (file:///home/node/app/lib/mqttclient.js:224:22)
at MqttClient.emit (node:events:518:28)
at handlePublish (/home/node/app/node_modules/mqtt/build/lib/handlers/publish.js:97:20)
at handle (/home/node/app/node_modules/mqtt/build/lib/handlers/index.js:28:35)
at work (/home/node/app/node_modules/mqtt/build/lib/client.js:237:40)
at process.processTicksAndRejections (node:internal/process/task_queues:85:11)