# Node-red infinite loop

**URL:** <https://discourse.nodered.org/t/node-red-infinite-loop/36140>\
**Category:** General\
**Created:** [18 November 2020 14:32 UTC](https://discourse.nodered.org/t/node-red-infinite-loop/36140 "2020-11-18T14:32:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ellerre](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@ellerre](https://discourse.nodered.org/u/ellerre)\
**Post date:** [18 November 2020 14:32 UTC](https://discourse.nodered.org/t/node-red-infinite-loop/36140/1 "2020-11-18T14:32:19Z")

</div>

Due to my mistake, I find myself with node-red inaccessible.  
This is what happens:

```auto
18 Nov 14:19:28 - [info] Node-RED version: v1.2.5
18 Nov 14:19:28 - [info] Node.js version: v12.19.0
18 Nov 14:19:28 - [info] Linux 5.4.72-v7l+ arm LE
18 Nov 14:19:29 - [info] Loading palette nodes
18 Nov 14:19:30 - [warn] [RED.events] Deprecated use of "nodes-started" event from "/home/pi/.node-red/node_modules/node-red-contrib-actionflows/actionflows/actionflows.js:615:14". Use "flows:started" instead.
18 Nov 14:19:31 - [info] Dashboard version 2.23.4 started at /ui
18 Nov 14:19:32 - [info] Settings file : /home/pi/.node-red/settings.js
18 Nov 14:19:32 - [info] HTTP Static : /home/pi/static
18 Nov 14:19:32 - [info] Context store : 'default' [module=memory]
18 Nov 14:19:32 - [info] User directory : /home/pi/.node-red
18 Nov 14:19:32 - [info] Server now running at http://127.0.0.1:1880/
18 Nov 14:19:32 - [info] Active project : LRHome
18 Nov 14:19:32 - [info] Flows file : /home/pi/.node-red/projects/LRHome/lrhome.json
18 Nov 14:19:32 - [info] Starting flows
18 Nov 14:19:32 - [error] [config:c29ecfbf.afc65] Error: Invalid property expression: zero-length
18 Nov 14:19:32 - [info] Started flows
18 Nov 14:19:32 - [info] [sqlitedb:b9c2c79a.f51318] opened /home/pi/LRHome.db ok
18 Nov 14:19:32 - [info] [mqtt-broker:mqtt@LRHome] Connected to broker: mqtt://192.168.251.50:1883
18 Nov 14:19:33 - [error] [function:865c2eb3.95e9b] [OK!] nE=0 LOC=mns_lgt ON=5 rtn=on
18 Nov 14:19:33 - [error] [function:865c2eb3.95e9b] [OK!] nE=0 LOC=mns_lgt ON=5 rtn=on
18 Nov 14:19:33 - [error] [function:865c2eb3.95e9b] [OK!] nE=0 LOC=mns_lgt ON=5 rtn=on
18 Nov 14:19:33 - [error] [function:865c2eb3.95e9b] [OK!] nE=0 LOC=ppn_lgt ON=1 rtn=on
18 Nov 14:19:33 - [error] [function:865c2eb3.95e9b] [OK!] nE=0 LOC=ppn_lgt ON=1 rtn=on
18 Nov 14:19:33 - [error] [function:865c2eb3.95e9b] [ERR] nE=0 LOC=_ ON=0 rtn=off
18 Nov 14:19:33 - [error] [function:865c2eb3.95e9b] [ERR] nE=0 LOC=_ ON=0 rtn=off
(...never end...)
18 Nov 14:31:23 - [error] [function:865c2eb3.95e9b] [ERR] nE=0 LOC=_ ON=0 rtn=off
18 Nov 14:31:23 - [error] [function:865c2eb3.95e9b] [ERR] nE=0 LOC=_ ON=0 rtn=off
(CTRL-C)
18 Nov 14:31:23 - [error] [function:865c2eb3.95e9b] [ERR] nE=0 LOC=_ ON=0 rtn=off
18 Nov 14:31:23 - [error] [mqtt-broker:mqtt@LRHome] Error stopping node: Close timed out
18 Nov 14:31:23 - [info] Stopped flows

```

I found a reference to the function indicated in the log in the lrhome.json file:

```auto
  {
        "id": "865c2eb3.95e9b",
        "type": "function",
        "z": "a46ce386.b7383",
        "name": "",
(...)
"wires": [
            [
                "1305eeb0.a16011",
                "d9ae59d4.cab1d8"
            ]
        ]
    },

```

I tried to:

- delete the included function, the one that generates the infinite loop
- replace the json file
- reboot the system

I was hoping to be able to recompile node red from the web, but it wasn't possible.

I replaced the json file with one from a few days ago. No changes.

Do you have a suggestion to get out of this impasse, excluding a Colt or a slipknot? 🙂

LR

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [18 November 2020 14:34 UTC](https://discourse.nodered.org/t/node-red-infinite-loop/36140/2 "2020-11-18T14:34:48Z")

</div>

If you restart Node-RED with the `--safe` command-line argument then it will load your flows without starting them. You can then edit them to remove the offending node(s) and hit deploy to start things up.

---

<div class="post-metadata">

**Author:** ![ellerre](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@ellerre](https://discourse.nodered.org/u/ellerre)\
**Post date:** [18 November 2020 14:50 UTC](https://discourse.nodered.org/t/node-red-infinite-loop/36140/3 "2020-11-18T14:50:00Z")

</div>

Grazie mille!!!!!!  
thanks you!!!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 January 2021 14:50 UTC](https://discourse.nodered.org/t/node-red-infinite-loop/36140/4 "2021-01-17T14:50:01Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
