IMD SolutionComputing LibraryShop main store

Troubleshooting

Node-RED stops after a firmware update: ABI mismatch, not a bad flow

Edge computing and IIoT Published 6 min read By IMD Solution engineering team

Short answer

A Node-RED restart cycle that begins right after a controller firmware update is an ABI mismatch, not a flow bug: retained native add-ons were compiled for NODE_MODULE_VERSION 64 while the updated Node.js v12.22.1 runtime requires 72. Reinstall the affected nodes so they rebuild for the current runtime, then deploy the serial flow on its own to confirm.

On this page
  1. Read the failure signature before touching anything
  2. Why an update breaks a working install
  3. Isolate the failing node with two deployments
  4. Recover: retire the stale binary, reinstall under the new runtime
  5. Verify the repair
  6. The decision for each case
  7. Questions asked

A Node-RED restart cycle that begins immediately after a controller firmware update is an ABI mismatch in a retained native add-on, not a broken flow. In the documented case, a groov EPIC updated to firmware 3.3.1 came up with Node-RED 2.0.6 on Node.js v12.22.1, and every start ended the same way: flows loaded, an uncaught exception named a serialport binding compiled for NODE_MODULE_VERSION 64 where the runtime requires 72, the process stopped, and the controller started it again, repeatedly. The fix that worked was to remove the retained node set and reinstall the palette nodes so their native code rebuilds against the current runtime. This article gives the log signature, the two-deployment test that isolates the failing node, the recovery order, and the decision for each version of the symptom.

Read the failure signature before touching anything #

Right after the update, the startup log on the controller showed:

9 Nov 18:56:45 - [info] Node.js version: v12.22.1
9 Nov 18:56:45 - [info] Linux 4.1.15-rt18-nxtio-2.1.0+g74af60a arm LE
9 Nov 18:56:47 - [info] Loading palette nodes

Palette loading completed, so the JavaScript packages themselves were present. The loop then ran the installed flows, and the deploy that reproduced the fault printed the pair that identifies it:

9 Nov 21:32:49 - [info] Started flows
9 Nov 21:32:49 - [red] Uncaught Exception:
Error: The module '/home/dev/.node-red/node_modules/node-red-contrib-modbus/node_modules/@serialport/bindings/build/Release/bindings.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 72.

Read the signature line by line:

  • Loading palette nodes completes, so the palette is intact and nothing is missing at the package level.
  • Started flows and Uncaught Exception share one timestamp: the crash fires the instant a flow opens its native resource, not during startup.
  • The exception names a path ending in build/Release/bindings.node, which is a compiled binary, not JavaScript.
  • The process stops and the controller starts Node-RED again, so the restart count grows and the editor is unreachable between attempts.

Treat the neighbors as noise: the same log shows deprecation warnings about the nodes-started event and the httpRoot setting, and nothing ties them to the crash. The first uncaught exception after Started flows is the fault; fix that and the rest of the log settles.

Why an update breaks a working install #

Native Node.js add-ons carry C or C++ code compiled for one runtime ABI. Node.js records that ABI as NODE_MODULE_VERSION, and the loader admits a compiled binary only when its number equals the runtime's own, with no fallback and no partial load. Firmware 3.3.1 moved Node-RED from the 1.x line to 2.0.6 and Node.js up a major line at the same time. The update keeps the flows and the installed node tree, so the JavaScript survives untouched while the compiled binaries beneath it keep the ABI of the previous runtime. That stale binary is compiled code sitting in storage across the update while the interpreter above it is swapped, the flash-versus-memory split described in ROM vs RAM in embedded systems: where compiled code resides.

Worked example, using the two numbers the captured exception itself prints:

  1. Compiled value: 64. Required value: 72. Both come from the runtime's own error text, so no version table is needed to read them.
  2. Load rule: admit the binary only if its number equals the required one. Here 64 − 72 = −8, meaning the binary targets an ABI eight generations behind the runtime. Refused.
  3. Every flow that opens that binding dies in the same instant, one uncaught exception per attempt, which is the loop.
  4. After a fresh install under the updated runtime the binary embeds 72, and 72 − 72 = 0, so it loads.

The comparison decides every future case: read the compiled and required values from your own exception. Equal means the binary matches and the cause is elsewhere. Different means rebuild or reinstall that package. A later firmware can print a different pair, so the numbers are case-specific while the comparison is not.

Isolate the failing node with two deployments #

The reproduced case used one Modbus Read node with two transports:

  • The Modbus TCP flow deployed and ran, with no crash.
  • The serial Modbus flow, through an RS-485-to-USB adapter on the controller's USB port, deployed and brought the cycle straight back, with the same @serialport/bindings exception.

That contrast pins the fault. Same node, same flow logic; one transport loads a compiled serial binding and the other does not. node-red-contrib-modbus pulls @serialport/bindings from its own node_modules for serial transports, so the serial path was the one executing the stale binary. The conclusion generalizes: the failing dependency is whichever native binding the crashing path actually loads, and the module path in your exception names it even when the package differs.

If the crash began right after installing a palette node rather than after a firmware update, the trigger and the fix are different, and that case is covered in Node-RED crashes after a node install: safe mode and rollback.

Recover: retire the stale binary, reinstall under the new runtime #

The confirmed recovery order:

  1. Export the flows and check the copy. Deleting the Node-RED project deletes the flows with it, so take the controller's logic out of service or confirm its outputs are safe before you delete anything.
  2. Delete the Node-RED project. This removes the retained node_modules tree, stale binary included. Both confirmed recoveries ran this step.
  3. Reinstall firmware 3.3.1 as the confirmed recovery did, then install the palette nodes fresh, node-red-contrib-modbus and everything else the flows need. A fresh install compiles or downloads its native bindings for the runtime now in place, which retires the old ABI.
  4. Rebuild the flows from the export and deploy them one at a time, with the serial flow on its own deploy so the native path is tested in isolation.

The exception text asks you to re-compile or re-install the module. On this controller, with its managed Node.js and its own Node-RED supervision, the demonstrated field procedure is the clean project and palette reinstall above; nothing in the evidence shows a manual rebuild inside the controller's managed tree as a supported step. On an edge PC where you own the Node.js install yourself, the equivalent repair is to rebuild the serialport modules against the installed runtime, and Rebuild Node-RED serialport modules on a 32-bit ARM edge PC walks through it.

Verify the repair #

  • Node-RED stays up and the restart count stops growing.
  • Restart Node-RED once more yourself and read the startup log: no Uncaught Exception, no NODE_MODULE_VERSION line anywhere.
  • Deploy the serial Modbus flow and push real traffic through the RS-485-to-USB adapter, because Modbus TCP alone never exercises the binding that failed.
  • Leave the deprecation warnings alone; they were present before and after the fix and mean nothing here.

The decision for each case #

  • The cycle begins right after a firmware update and the exception names NODE_MODULE_VERSION: a retained binary, full stop. Run the recovery order above.
  • The same cycle, but your flows are TCP-only and the error path shows no native module: not this fault. Read the first uncaught exception and treat that cause on its own.
  • The crash began after a palette install with no firmware update involved: different trigger, different fix, and the safe mode and rollback path applies.
  • Node-RED stays up but the editor canvas stays blank after an update: a rendering fault, not a load failure, and why the Node-RED editor canvas is blank after an update covers it.
  • You want these flows to survive the controller's next firmware move: keep that runtime off the controller and update it on your own schedule, on a dedicated fanless mini PC as the Node-RED host.

Questions asked

What Node.js versions do NODE_MODULE_VERSION 64 and 72 correspond to?

64 is the ABI number of the Node.js 10 line, and 72 belongs to Node.js 12, the line v12.22.1 comes from. The number rises across major releases, and the loader accepts a compiled add-on only when its embedded number equals the runtime's. That is why a binary built for a Node 10 runtime fails outright on a Node 12 runtime instead of running degraded.

Does the fix require reinstalling the firmware, or is deleting the project enough?

Both orders were reported to work: one recovery deleted only the Node-RED project and installed the palette nodes fresh, another deleted the project, reinstalled the firmware, then rebuilt the flows. The outcome that matters is identical, meaning no binary compiled for the old ABI survives. Export and verify a flow copy before deleting anything.

Why does Node-RED keep restarting instead of simply failing once?

The controller supervises Node-RED and starts it again after every abnormal exit, so the same incompatible binary loads on each attempt and the exception repeats. The growing restart count is that supervision working as designed, not a second fault. You usually cannot reach the editor between attempts, which is why the fix happens at the project and palette level rather than inside a flow.

Can flows that never open a serial port still trigger this?

The documented crash needed a native serial binding, and the reproduced TCP-only flows ran normally. Any installed node that ships or compiles a native binary stays exposed, though: serial and USB adapters, GPIO access, crypto or binary-parsing add-ons. Read the module path in your exception. If it passes through a build or Release folder, a compiled binary is the failing part.

Keep reading

  • How-to

    Disable the pre-installed Node-RED startup on an edge PC

    Killing the pre-installed Node-RED on an edge PC frees memory for a few seconds only, because its startup registration relaunches the process. Connect over SSH, disable the init script's boot links with the update-rc.d disable command, then reboot once and prove the result: zero start links for the script and a 30-second quiet process list.

    Edge computing and IIoT

  • Troubleshooting

    Fix Node-RED InfluxDB write errors after a network outage

    When InfluxDB output nodes throw ECONNRESET after a network outage, Node-RED is usually still holding dead TCP client sessions. Confirm the database is reachable from the Node-RED host, then use the Deploy menu's flow-restart option to rebuild every connection while the runtime stays up.

    Edge computing and IIoT

  • Troubleshooting

    Node-RED crashes after a node install: safe mode and rollback

    The fatal log line is the one reading Uncaught Exception with a stack trace; palette warnings above it are survived. Stop the nodered systemd unit, start node-red with --safe so the editor opens with flows stopped, then roll the package the stack names back to its previous release with npm install --save-exact and confirm the pin with npm ls before you let the flows run.

    Edge computing and IIoT

Why S7 Connector status turns bad after one minute