# Node-Red Crashing Upon a power fault

**URL:** <https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520>\
**Category:** General\
**Created:** [15 July 2024 15:12 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520 "2024-07-15T15:12:57Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![jundo](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jundo](https://discourse.nodered.org/u/jundo)\
**Post date:** [15 July 2024 15:12 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/1 "2024-07-15T15:12:57Z")

</div>

This night I had a power fault.  
After that my node-red does'nt open correctly and crash.  
I have no idea about what to do.  
I saw a similar old thread and I tried to start in --safe mode node-red. Unfortunately I was not able to enter the editor as node-red halts with a white screen.  
The " Unknown context store 'ram' specified" message worried me as I used "ram" since a couple years.

```auto
roberto@RCORE:~ $ node-red-start --safe

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.37:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
15 Jul 17:06:21 - [info]
Welcome to Node-RED
===================
15 Jul 17:06:21 - [info] Node-RED version: v4.0.0
15 Jul 17:06:21 - [info] Node.js version: v20.14.0
15 Jul 17:06:21 - [info] Linux 6.6.31+rpt-rpi-2712 arm64 LE
15 Jul 17:06:21 - [info] Loading palette nodes
15 Jul 17:06:22 - [info] Settings file : /home/roberto/.node-red/settings.js
15 Jul 17:06:22 - [info] Context store : 'default' [module=memory]
15 Jul 17:06:22 - [info] User directory : /home/roberto/.node-red
15 Jul 17:06:22 - [info] Projects directory: /home/roberto/.node-red/projects
15 Jul 17:06:22 - [warn] No active project : using default flows file
15 Jul 17:06:22 - [info] Flows file : /home/roberto/.node-red/flows.json
15 Jul 17:06:22 - [info] Server now running at http://127.0.0.1:1880/
15 Jul 17:06:22 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
15 Jul 17:06:22 - [info] Starting flows
15 Jul 17:06:22 - [info] Started flows
15 Jul 17:06:22 - [info] [zigbee2mqtt-server:CORE] MQTT Connected
15 Jul 17:06:22 - [info] [mqtt-broker:OLL] Connected to broker: mqtt://192.168.1.37:1883
15 Jul 17:06:22 - [info] [alexa-remote-account:alexa] intialising "alexa" with the PROXY method and saved data...
15 Jul 17:06:23 - [info] [zigbee2mqtt-server:CORE] MQTT Subscribed to: "zigbee2mqtt/#
15 Jul 17:06:23 - [warn] Unknown context store 'ram' specified. Using default store.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:BT-LUCI-LETTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:PR_SALOTTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:PR_SALOTTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:TH_MATTEO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT_STANZINO-MURO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT-STANZINOINGRESSO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT_CUCINA-MURO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT_CUCINA-MURO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_UCINA-SOFFITTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW05-CUCINA] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:WL_CUCINA-LAVELLO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:WL_CUCINA-LAVELLO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:LU_CUCINA-TERRAZZO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:PS_SALOTTO-LIBRERIA] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:TH_SALOTTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:TR_SALOTTO-FINESTRA] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:TR_SALOTTO-BALCONE] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_SALOTTO-BALCONE] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT_INGRESSO-MURO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT-INGRESSO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT_CORRIDOIO-INGRESSO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT_CORRIDOIO-INGRESSO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT_CORRIDOIO-LETTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT_CORRIDOIO-LETTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:PR_CUCINA-CAPPA] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:PR_CUCINA-CAPPA] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_CUCINA-BALCONE] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW-CUCINA-BALCONE] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_CUCINA-SERRANDA] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_DOCCIA-SPECCHIO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_DOCCIA-SOFFITTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:PR-DOCCIA-SOFFITTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:PR_DOCCIA-SOFFITTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:PL_LETTO-COMODINO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:TR_LETTO-FINESTRA] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_BAGNO-SPECCHIO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_BAGNO-SOFFITTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT_BAGNO-MURO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:MT_BAGNO-MURO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:TH_LETTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_MATTEO-SOFFITTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_IACOPO-SOFFITTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:SW_IACOPO-BALCONE] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:TH_DOCCIA] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:TH_TERRAZZO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:WL_SALOTTO-TERMOSIFONE] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:WL-SALOTTO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:WL_CUCINA-LAVELLO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:WL_INGRESSO-TERMOSIFONE] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [warn] [zigbee2mqtt-in:WL_INGRESSO] You need to turn on the "retain" option for the device in Zigbee2MQTT to be able to read it before a state change.
15 Jul 17:06:23 - [info] [vsh-connection:roberto_brunialti@tiscali.it] MQTT: attempting connection: a1pv0eq8s016ut-ats.iot.eu-west-1.amazonaws.com:8883 (clientId: vsht-350c0237-04ec-4a1d-a8d0-5d405f77f486)
15 Jul 17:06:23 - [red] Uncaught Exception:
15 Jul 17:06:23 - [error] TypeError: Configuration is not a constructor
    at main._inputCallback (/home/roberto/.node-red/node_modules/node-red-contrib-custom-chatgpt/chatgpt.js:31:35)
    at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:214:26
    at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
    at Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:206:11)
    at Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:190:25)
    at Node.receive (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:499:10)
    at deliverMessageToDestination (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:803:40)
    at Immediate.<anonymous> (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:819:21)
    at process.processImmediate (node:internal/timers:478:21)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Consumed 3.367s CPU time.

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 July 2024 15:30 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/2 "2024-07-15T15:30:26Z")

</div>

What does your settings file `/home/roberto/.node-red/settings.js` say about context stores?

Did the MQTT warnings show before the power fail?

The crash is from the chatgpt node. I suggest you disable or remove that for the moment.

It is possible your SD card has been corrupted by the power fail. It is rare but not unknown. Assuming you have a good backup you might just be better to restore from that (using a new SD card).

---

<div class="post-metadata">

**Author:** ![jundo](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jundo](https://discourse.nodered.org/u/jundo)\
**Post date:** [15 July 2024 15:42 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/3 "2024-07-15T15:42:14Z")

</div>

This should be the settings.js sectionù

```auto
     /** Context Storage
      * The following property can be used to enable context storage. The configuration
      * provided here will enable file-based context that flushes to disk every 30 seconds.
      * Refer to the documentation for further options: https://nodered.org/docs/api/context/
      */
     //contextStorage: {
     // default: {
     // module:"localfilesystem"
     // },
     //},

```

I always used "ram" or "file" as store. I do'nt know if and how them have to be declared in settings.  
MQTT seems working correctly  
How can I disable chatgpt node if I cannot access the editor?

Ehm... I have not a good sd backup unfortunately. I had to. ☹

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 July 2024 15:48 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/4 "2024-07-15T15:48:14Z")

</div>

> [@jundo](#):
>
> ```auto
> //contextStorage: {
> // default: {
> // module:"localfilesystem"
> // },
> //},
> 
> ```

There is no `ram` context store there.

> [@jundo](#):
>
> MQTT seems working correctly

> [@jundo](#):
>
> I have not a good sd backup unfortunately.

That isn't what I asked, which was whether the warnings are new or not. You may not know.

Immediately backup the whole .node-red folder, apart from the `node_modules` folder. Then if you have to, at least you have backup of your flows.

> [@jundo](#):
>
> How can I disable chatgpt node if I cannot access the editor?

Show us the startup log if you use  
`node-red --safe`  
to start node-red

---

<div class="post-metadata">

**Author:** ![jundo](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jundo](https://discourse.nodered.org/u/jundo)\
**Post date:** [15 July 2024 17:23 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/5 "2024-07-15T17:23:04Z")

</div>

I changed context default module to "memory".  
and used the command node-red --safe  
I have an "all flows" backup. Do this type of backup preserve the palette packages?

```auto
roberto@RCORE:~/.node-red $ node-red --safe
15 Jul 19:20:35 - [info]

Welcome to Node-RED
===================

15 Jul 19:20:35 - [info] Node-RED version: v4.0.0
15 Jul 19:20:35 - [info] Node.js version: v20.14.0
15 Jul 19:20:35 - [info] Linux 6.6.31+rpt-rpi-2712 arm64 LE
15 Jul 19:20:36 - [info] Loading palette nodes
15 Jul 19:20:37 - [info] Settings file : /home/roberto/.node-red/settings.js
15 Jul 19:20:37 - [info] Context store : 'default' [module=memory]
15 Jul 19:20:37 - [info] User directory : /home/roberto/.node-red
15 Jul 19:20:37 - [info] Projects directory: /home/roberto/.node-red/projects
15 Jul 19:20:37 - [warn] No active project : using default flows file
15 Jul 19:20:37 - [info] Flows file : /home/roberto/.node-red/flows.json
15 Jul 19:20:37 - [info] Server now running at http://127.0.0.1:1880/
15 Jul 19:20:37 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

15 Jul 19:20:37 - [info] *****************************************************************
15 Jul 19:20:37 - [info] Flows stopped in safe mode. Deploy to start.
15 Jul 19:20:37 - [info] *****************************************************************

```

---

<div class="post-metadata">

**Author:** ![jundo](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jundo](https://discourse.nodered.org/u/jundo)\
**Post date:** [15 July 2024 17:43 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/6 "2024-07-15T17:43:45Z")

</div>

After

node-red-stop  
node-red --safe

node-red editor started with flows disabled.  
I disabled the chatgpt node ans deployed the flows  
The flows seems working.  
I did not understand what happened after the power fault.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 July 2024 17:45 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/7 "2024-07-15T17:45:05Z")

</div>

Can you get into the editor now? If not, open the developer console in the browser and then refresh the page and see if there are any errors.

> [@jundo](#):
>
> and used the command node-red --safe  
> I have an "all flows" backup. Do this type of backup preserve the palette packages

I don't know what an all flows backup is. Provided you have backed up package.json then you can re install additional nodes by going into the .node-red folder and running  
`npm install`

---

<div class="post-metadata">

**Author:** ![jundo](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jundo](https://discourse.nodered.org/u/jundo)\
**Post date:** [15 July 2024 17:54 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/8 "2024-07-15T17:54:16Z")

</div>

I can get into the editor now. In this way, I was able to disable the ChatGPT node.  
An "all flows backup" is the export of all flows as a json file  
I did not change my node-red folder, so I still have all my previous packages  
I do not understand what happened , neverthless now it seems working

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 July 2024 19:35 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/9 "2024-07-15T19:35:41Z")

</div>

> [@jundo](#):
>
> An "all flows backup" is the export of all flows as a json file

That will only allow you to restore your flows, not your installed nodes, settings, node credentials etc.  
Do what I suggested, which is to backup the complete .node-red folder. Then if you need to restore that all you need to do is install node-red if not already installed, restore the .node-red folder from your backup, go into that folder in a command window, and run  
`npm install`

---

<div class="post-metadata">

**Author:** ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)\
**Post date:** [15 July 2024 20:30 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/10 "2024-07-15T20:30:07Z")

</div>

I just pushed an update to the ChatGPT node that should fix this error, it seems there were some breaking changes when switching from v3 to v4 of the OpenAI SDK.

```auto
15 Jul 17:06:23 - [red] Uncaught Exception:
15 Jul 17:06:23 - [error] TypeError: Configuration is not a constructor
    at main._inputCallback (/home/roberto/.node-red/node_modules/node-red-contrib-custom-chatgpt/chatgpt.js:31:35)
    at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:214:26
    at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
    at Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:206:11)
    at Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:190:25)
    at Node.receive (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:499:10)
    at deliverMessageToDestination (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:803:40)
    at Immediate.<anonymous> (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:819:21)
    at process.processImmediate (node:internal/timers:478:21)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Consumed 3.367s CPU time.

```

Let me know if you have any further problems.

---

<div class="post-metadata">

**Author:** ![jundo](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jundo](https://discourse.nodered.org/u/jundo)\
**Post date:** [17 July 2024 11:16 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/11 "2024-07-17T11:16:40Z")

</div>

It does'nt crash anymore but I get the following error in nodered:

17/7/2024, 13:12:12[node: CHATGpt](http://192.168.1.37:1880/#)  
msg : string[55]  
"Cannot read properties of undefined (reading 'choices')"

---

<div class="post-metadata">

**Author:** ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)\
**Post date:** [17 July 2024 16:11 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/12 "2024-07-17T16:11:52Z")

</div>

Thank you for letting me know, that issue should be corrected now as well. (Sorry I don't have any way to test out my changes right now so I'm going in blind)

---

<div class="post-metadata">

**Author:** ![jundo](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jundo](https://discourse.nodered.org/u/jundo)\
**Post date:** [17 July 2024 17:33 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/13 "2024-07-17T17:33:38Z")

</div>

It is working now.  
Thank 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:** [15 October 2024 17:34 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-a-power-fault/89520/14 "2024-10-15T17:34:30Z")

</div>

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