# Themes cause errors. UI not reachable

**URL:** <https://discourse.nodered.org/t/themes-cause-errors-ui-not-reachable/45764>\
**Category:** General\
**Created:** [17 May 2021 08:40 UTC](https://discourse.nodered.org/t/themes-cause-errors-ui-not-reachable/45764 "2021-05-17T08:40:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TotallyFred](https://avatars.discourse-cdn.com/v4/letter/t/9e8a1a/32.png) [@TotallyFred](https://discourse.nodered.org/u/TotallyFred)\
**Post date:** [17 May 2021 08:40 UTC](https://discourse.nodered.org/t/themes-cause-errors-ui-not-reachable/45764/1 "2021-05-17T08:40:33Z")

</div>

Hi,

I installed NR v.1.3.4 on a Debian 10. Then installed NR themes from [GitHub - node-red-contrib-themes/theme-collection: Collection of Node-RED themes published by the Node-RED Contrib Themes team](https://github.com/node-red-contrib-themes/theme-collection) by issuing npm install @node-red-contrib-themes/theme-collection.

Then I modified ~/.node-red/settings.js accordingly. The `editorTheme` now looks like this:

```auto
    editorTheme: {
        theme: "dark",
        projects: {
            // To enable the Projects feature, set this value to true
            enabled: false,
            workflow: {
                // Set the default projects workflow mode.
                // - manual - you must manually commit changes
                // - auto - changes are automatically committed
                // This can be overridden per-user from the 'Git config'
                // section of 'User Settings' within the editor
                mode: "manual"
            }
        }
    }

```

Node-red starts normally though I do not see any mention of the theme being loaded:

```auto
17 May 10:23:30 - [info] 

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

17 May 10:23:30 - [info] Node-RED version: v1.3.4
17 May 10:23:30 - [info] Node.js version: v12.22.1
17 May 10:23:30 - [info] Linux 4.19.0-16-amd64 x64 LE
17 May 10:23:30 - [info] Loading palette nodes
17 May 10:23:31 - [info] Dashboard version 2.29.0 started at /ui
17 May 10:23:31 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
17 May 10:23:31 - [info] Settings file : /home/fred/.node-red/settings.js
17 May 10:23:31 - [info] Context store : 'default' [module=memory]
17 May 10:23:31 - [info] User directory : /home/fred/.node-red
17 May 10:23:31 - [warn] Projects disabled : editorTheme.projects.enabled=false
17 May 10:23:31 - [info] Flows file : /home/fred/.node-red/flows_lab.json
17 May 10:23:31 - [info] Server now running at https://127.0.0.1:1880/
17 May 10:23:31 - [info] Starting flows
17 May 10:23:31 - [info] Started flows

```

At this point, the flows are started, I can navigate to the dashboard - it all looks good.

The problem is when I point a browser to the flow editor. I see those messages and the browser tells me it is "unable to connect".

```auto
17 May 10:23:31 - [info] [mqtt-broker:Local Mosquitto] Connected to broker: mqtt://lmpi.local:1883
(node:13905) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '_' of undefined
    at Object.context (/usr/lib/node_modules/node-red/node_modules/@node-red/editor-api/lib/editor/theme.js:234:32)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async editor (/usr/lib/node_modules/node-red/node_modules/@node-red/editor-api/lib/editor/ui.js:94:49)
(node:13905) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:13905) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

```

I see the HTTP request in Firefox debug's but I can't see any response. The browser tab is "hung". I need to stop the request before seeing the reload option again. Reloading the page has the same effect (keeps waiting for a response).

Removing the `theme=` entry from the config file resolves the problem but I end up with the white theme.

Can someone tell me what I am doing wrong ?

---

<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:** [17 May 2021 08:52 UTC](https://discourse.nodered.org/t/themes-cause-errors-ui-not-reachable/45764/2 "2021-05-17T08:52:21Z")

</div>

Hi @TotallyFred - this is a bug that will be fixed in the next release coming this week.

The workaround is to add a `page` property to your `editorTheme`:

```auto
editorTheme: {
        theme: "dark",
        page: {},
        projects: {

```

---

<div class="post-metadata">

**Author:** ![TotallyFred](https://avatars.discourse-cdn.com/v4/letter/t/9e8a1a/32.png) [@TotallyFred](https://discourse.nodered.org/u/TotallyFred)\
**Post date:** [17 May 2021 08:54 UTC](https://discourse.nodered.org/t/themes-cause-errors-ui-not-reachable/45764/3 "2021-05-17T08:54:54Z")

</div>

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:** [31 May 2021 08:55 UTC](https://discourse.nodered.org/t/themes-cause-errors-ui-not-reachable/45764/4 "2021-05-31T08:55:43Z")

</div>

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