IMD SolutionComputing LibraryShop main store

Troubleshooting

Why the Node-RED editor canvas is blank after an update

Edge computing and IIoT Published 7 min read

Short answer

Tabs still show and MQTT output keeps flowing, so the flows and the runtime are healthy: the blank canvas is the browser-side editor failing during flow import. Read the console error, roll the runtime back to 0.18.4, and move forward only to a release with the clipped-nodes fix, tested on a bench unit first.

On this page
  1. The runtime and the editor fail independently
  2. Read the console before you change anything
  3. What does not fix it, and why
  4. Roll back one release, then forward to the fixed one
  5. Worked example: a 0.18.5 gateway with MQTT still flowing
  6. Same empty editor, different faults
  7. Questions asked

A canvas that shows the flow tabs but no nodes is not lost work: the browser-side editor fails while it imports the flows, and the runtime keeps executing those same flows in the background. On Node-RED 0.18.5 the editor's import code throws Uncaught ReferenceError: wireClippedNodes is not defined — a defect in that release's own editor bundle, fixed in the development tree with 0.18.6 the next release to carry it. Confirm the fault with one console read, roll the runtime back to 0.18.4 or 0.18.3, and move forward only after a bench test of a release that includes the fix. Restoring flow backups, reinstalling the palette and rebuilding native modules all failed to touch this fault in the tested case, so keep them off the plan.

The runtime and the editor fail independently #

One Node-RED process does two separate jobs. It serves the editor assets and the flow data to the browser, and it loads the flow file, starts the nodes and keeps the broker and serial connections alive. The browser can stop dead while drawing the workspace while the server keeps publishing, which is exactly what a blank canvas with live output shows. The startup log from the failing gateway delivers both verdicts at once:

15 May 06:07:35 - [info] Flows file        : /root/.node-red/flows_raspihub.json
15 May 06:07:35 - [info] Server now running at http://127.0.0.1:1880/
15 May 06:07:37 - [info] Started flows
15 May 06:07:38 - [info] [mqtt-broker:b6c4baa4.adbf78] Connected to broker: raspihub@mqtt://odroid.fritz.box:1883

Started flows together with the broker and serial-port lines means the server loaded the flow file and is producing output; a blank canvas on top of that moves the investigation to the browser. Four observations decide the case:

  • The tab bar renders the flow names, so the browser reached the server and built part of the editor.
  • The output the flows publish keeps arriving, so the runtime is executing them.
  • Every saved copy of the flow file restored into the user directory leaves the canvas equally empty, so the file content is not the variable.
  • The browser console shows a JavaScript exception while the editor imports the flows, so rendering stops before the first node is drawn.

Read the console before you change anything #

Press F12, open the Console tab, clear it and reload the editor page. The first exception is the diagnosis. On the failing gateway it reads:

red.min.js:16 Uncaught ReferenceError: wireClippedNodes is not defined
    at Object.l [as import] (red.min.js:16)
    at Object.success (main.min.js:16)
    at j (vendor.js:2)

A ReferenceError means execution reached a call to a function the loaded bundle never defines. Here the import function in red.min.js lacks wireClippedNodes, so the browser stops after the flow data has arrived — the stack's success callback in main.min.js sits behind a completed request — and before any node is drawn. The server process never sees the exception, which is why its own log stays clean.

Run two quick separators while the console is open. The Network panel should show the editor requests completing; failures there point at a proxy or a wrong port instead. And reload once with cached assets disabled to rule out a stale bundle — if the same exception returns, record it next to the version line from the startup log and treat it as reproducible.

One reproduction clue from the tested case: the same error appeared when the same flows were imported onto a second machine, and both occurrences involved flows containing node-red-contrib-modbus nodes. Keep the affected flow and its installed package versions for a bench reproduction. That is not a reason to strip those nodes from production, because the rollback below restored the canvas without touching the additional nodes.

What does not fix it, and why #

Three remedies were tried and each failed for a reason worth knowing:

  • Restoring flow backups. Several known-good copies produced the same blank canvas, because the fault sits in the code that draws the imported flows, not in the file. Keep the backups; stop treating them as the corrective action.
  • Reinstalling the failing release together with every additional npm module. A reinstall puts the same editor bundle back, defect included, so the canvas stays blank.
  • Running npm rebuild for binary dependencies. Rebuild recompiles add-on binaries on the server after a Node.js change and is worth running after such an upgrade as routine, but this exception fires in the browser before any add-on loads, so it cannot reach it.

For the neighboring failure where flows genuinely vanish after a palette operation, the knowledge-base walkthrough for troubleshooting the Node-RED manage palette and lost flows covers that separate case.

Roll back one release, then forward to the fixed one #

Roll the runtime back one minor release and hold it under change control. In the tested case, switching the same installation back one release brought every node back without touching the additional nodes; the release before that behaved the same, and returning to the failing release reproduced the blank canvas. That matrix isolates the editor bundle of the failing release as the cause. Pin 0.18.4 — the nearest version below the failing one — record the version pair in the change ticket, verify the canvas draws and one live output still arrives, and leave the gateway alone until the forward test.

For the forward path, use a bench gateway. Install 0.18.6, which carries the clipped-nodes fix, or a newer release that includes it, load a copy of the affected flow, and confirm the canvas draws and the output matches the plant host. If the bench unit has no internet access, install the additional nodes from a local npm package as the offline guide to installing a Node-RED node from a local npm package on Windows describes. Move the plant host only in a maintenance window with someone watching the live output, so the alarm or monitoring traffic the gateway carries is never unattended during the switch.

Worked example: a 0.18.5 gateway with MQTT still flowing #

The inputs, taken from the failing gateway's startup log, its browser console and its rollback tests:

  • Runtime: Node-RED v0.18.5 on Node.js v8.11.1, flows loaded from /root/.node-red/flows_raspihub.json (startup log).
  • Editor served at 127.0.0.1 on port 1880 (startup log).
  • Runtime path: Started flows in the log, live MQTT output to the broker on odroid.fritz.box port 1883, serial port /dev/ttyWind opened at 57600 baud, 8N1.
  • Editor path: tab bar rendered, canvas empty, wireClippedNodes is not defined at red.min.js line 16 (browser console).
  • Version tests: 0.18.3 and 0.18.4 drew the canvas; 0.18.5 stayed blank, including once reinstalled with all npm modules.

The rule: score the two paths separately. The runtime path is healthy when the flow file loads and a live output still arrives. The editor path is healthy when the browser imports the flows and draws them. An import ReferenceError on top of a fully green runtime path convicts the browser bundle.

The arithmetic: runtime path, 3 of 3 checks pass (flows started, output arriving, serial port opened). Editor path, 1 of 3 (tabs render: pass; import completes: fail; nodes drawn: fail). Version matrix: 2 of 2 releases below 0.18.5 draw the canvas, 2 of 2 attempts on 0.18.5 fail, reinstalled or not. The single property separating all four version cases is the minor release number.

The result: the fault is the browser-side import in red.min.js. The flow file, the modules and the Node.js install are cleared.

The decision: when the runtime path scores 3 of 3 and the console shows an import ReferenceError, roll the runtime back one minor release — to 0.18.4 — and hold it under change control. If any runtime check is red, the rollback is not the answer; diagnose the broker, serial or serving path instead. Move forward only after a bench test on 0.18.6 or newer.

Same empty editor, different faults #

Two neighboring failures look alike and take different handling. If the palette sidebar itself lists no nodes after an upgrade, the palette failed to load rather than the canvas import — the write-up on S7 nodes disappearing from the Node-RED palette walks that case. If the whole page is blank rather than just the canvas, the browser never received the editor assets at all, which is a serving or proxy problem; resolve the address and the path to port 1880 before touching versions. And once the editor is back, keep flows inside the workspace bounds: nodes parked far outside the canvas are what the clipping code choked on, and the page on configuring Node-RED flows beyond the canvas size limit explains the workspace-size setting that keeps them in bounds.

Questions asked

Are my flows lost when the canvas is blank?

No. The startup log line reporting that flows started, together with output that keeps arriving, proves the server loaded the flow file and is running it. Restoring backup copies changes nothing, because the fault happens after the browser has downloaded the flows, while it builds the workspace. Leave the flow file in place and work on the editor side instead.

Why do reinstalling Node-RED and running npm rebuild not help?

A reinstall puts the same release back, so the editor bundle returns with the same defect. npm rebuild recompiles add-on binaries on the server after a Node.js change; this exception fires in the browser before any add-on code loads. Run a rebuild when the server log shows module-loading errors after a Node.js upgrade, not for a browser console error.

How do I confirm which release is installed before assuming this defect?

Read the version line the runtime prints at startup; it names the Node-RED and Node.js versions exactly. The blank canvas with a rendered tab bar and a console import error is documented for release 0.18.5, with 0.18.3 and 0.18.4 verified working on the same installation. If your version line shows something newer, capture the console error first and compare it before rolling anything back.

What happens to node credentials when I reinstall or move the host?

The credentials file is encrypted. With a system-generated key, a lost key makes the stored credentials unrecoverable, and they would have to be re-entered. Before a reinstall or a move to a new release or host, set your own credentialSecret option in the settings file; the file then re-encrypts with your chosen key at the next deploy.

Keep reading

  • How-to

    Auto restart Node-RED in Docker after exit code 255

    Run the container with `--restart unless-stopped` so Docker restarts Node-RED on its own whenever the process exits with code 255, while a deliberate stop still holds. Then set the console log level in `/data/settings.js` to `debug` until one failure is captured, because exit 255 names an abnormal end, not the fault.

    Edge computing and IIoT

  • Troubleshooting

    Fix ECONNREFUSED when Node-RED connects to a remote SQL database

    ECONNREFUSED 127.0.0.1:3306 means the MySQL node dialed loopback on the machine running Node-RED, so the database computer was never contacted. Put the database computer's LAN address in the node's Host field, confirm MariaDB listens on that interface with TCP 3306 open, and create the account with the edge device's address as its host part.

    Edge computing and IIoT

  • Troubleshooting

    Fix MQTT sensor data missing in Node-RED

    A green MQTT connection in Node-RED proves only a broker session, not that the GSM module published a value or that the flow subscribes to its topic. An http in node cannot receive MQTT publications at all: use an mqtt in node. Trace RS-485 acquisition, publish result, broker identity and topic match in order, and fix the first stage with no positive result.

    Edge computing and IIoT

Process Historian idle after SP2 UPD3 update