# NODE RED Error Cannot convert undefined or null to object

**URL:** <https://discourse.nodered.org/t/node-red-error-cannot-convert-undefined-or-null-to-object/63172>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [28 May 2022 07:05 UTC](https://discourse.nodered.org/t/node-red-error-cannot-convert-undefined-or-null-to-object/63172 "2022-05-28T07:05:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cisco351](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cisco351/32/62255_2.png) [@cisco351](https://discourse.nodered.org/u/cisco351)\
**Post date:** [28 May 2022 07:05 UTC](https://discourse.nodered.org/t/node-red-error-cannot-convert-undefined-or-null-to-object/63172/1 "2022-05-28T07:05:40Z")

</div>

## I am unable to access NODE RED in Home assistant. I receive 502 Bad Gateway error.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.  
[s6-init] ensuring user provided files have correct perms...exited 0.  
[fix-attrs.d] applying ownership & permissions fixes...  
[fix-attrs.d] done.  
[cont-init.d] executing container initialization scripts...  
[cont-init.d] 00-banner.sh: executing...

## Add-on: Node-RED

Flow-based programming for the Internet of Things

## Add-on version: 11.1.2

You are running the latest version of this add-on.  
System: Home Assistant OS 8.1 (aarch64 / odroid-n2)  
Home Assistant Core: 2022.5.5  
Home Assistant Supervisor: 2022.05.3

## Please, share the above information when looking for help

or support in, e.g., GitHub, forums or the Discord chat.

## [cont-init.d] 00-banner.sh: exited 0.

[cont-init.d] 01-log-level.sh: executing...  
[cont-init.d] 01-log-level.sh: exited 0.  
[cont-init.d] customizations.sh: executing...  
[cont-init.d] customizations.sh: exited 0.  
[cont-init.d] nginx.sh: executing...  
[cont-init.d] nginx.sh: exited 0.  
[cont-init.d] node-red.sh: executing...  
patching file nodes/ui\_base.html  
Hunk [#1](https://github.com/hassio-addons/addon-node-red/pull/1) succeeded at 1164 (offset 633 lines).  
npm ERR! Cannot convert undefined or null to object  
npm ERR! A complete log of this run can be found in:  
npm ERR! /root/.npm/\_logs/2022-05-27T23\_23\_17\_824Z-debug.log  
[16:23:17] FATAL: Failed un-installing conflicting packages  
[cont-init.d] node-red.sh: exited 1.  
[cont-finish.d] executing container finish scripts...  
[cont-finish.d] 99-message.sh: executing...

```auto
            Oops! Something went wrong.

```

We are so sorry, but something went terribly wrong when  
starting or running this add-on.

## Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.  
[cont-finish.d] done.  
[s6-finish] waiting for services.  
[s6-finish] sending all processes the TERM signal.  
[s6-finish] sending all processes the KILL signal and exiting.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 May 2022 07:16 UTC](https://discourse.nodered.org/t/node-red-error-cannot-convert-undefined-or-null-to-object/63172/2 "2022-05-28T07:16:25Z")

</div>

Hi, unfortunately this is not something many here will be able to help with. From the look of that info, it is a Home Assistant initialisation problem (nothing at all to do with node-red I'm afraid)

As a courtesy, a quick search of ...

> [@cisco351](#):
>
> We are so sorry, but something went terribly wrong when  
> starting or running this add-on

... reveals many results and most answers say "did you set credential secret"

So perhaps you didnt follow the instructions?

e.g: [node-red addon won't start · Issue #7 · hassio-addons/addon-node-red · GitHub](https://github.com/hassio-addons/addon-node-red/issues/7)

---

<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:** [27 July 2022 07:16 UTC](https://discourse.nodered.org/t/node-red-error-cannot-convert-undefined-or-null-to-object/63172/3 "2022-07-27T07:16:40Z")

</div>

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