# NodeRed not loading up when adding modules to the flow

**URL:** https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755
**Category:** General
**Created:** [6 December 2022 09:23 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755 "2022-12-06T09:23:36Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [6 December 2022 09:23 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/1 "2022-12-06T09:23:36Z")

</div>

I'm working on a project using NodeRed deployed with docker, I am using nginx location block to navigate to the particular container like [http://localhost/project/projectId/port/](http://localhost/project/projectId/port/)? when I trigger this url first time it is showing up the node red flow but when I add modules from the Manage pallet and hit the same url [http://localhost/project/projectId/port/](http://localhost/project/projectId/port/)? is not opening the flow and it is getting stuck at loading, what is the thing happening when adding modules to not adding modules and how to resolve this issue is any thing we can do it from nginx location block?

Before adding modules

[![enter image description here](https://i.stack.imgur.com/eMPPZ.png)](https://i.stack.imgur.com/eMPPZ.png)

After adding modules

[![Nodered is getting stuck](https://i.stack.imgur.com/mk9cg.png)](https://i.stack.imgur.com/mk9cg.png)

---

<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: [6 December 2022 10:05 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/2 "2022-12-06T10:05:48Z")

</div>

I suspect that websockets are getting blocked somewhere. Perhaps you have to do something in nginx to allow websockets. To confirm that is the problem look in the browser developer console to see if there is an error.

---

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [6 December 2022 10:32 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/3 "2022-12-06T10:32:04Z")

</div>

I can see in the logs Failed to load resource: the server responded with a status of 400 (Bad Request)

---

<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: [6 December 2022 10:55 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/4 "2022-12-06T10:55:43Z")

</div>

What resource? Refresh the page after opening the tools.

Did you look up the nginx docs to see what you need to do to allow websocket connections?

---

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [6 December 2022 11:12 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/5 "2022-12-06T11:12:41Z")

</div>

I have written these

proxy\_http\_version 1.1;  
proxy\_set\_header Upgrade $http\_upgrade;  
proxy\_set\_header Connection "upgrade";

for websocket but not change Colin

---

<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: [6 December 2022 11:15 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/6 "2022-12-06T11:15:39Z")

</div>

So what are you now seeing in the developer tools when you refresh the page?

---

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [6 December 2022 11:18 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/7 "2022-12-06T11:18:44Z")

</div>

Failed to load resource: the server responded with a status of 400 (Bad Request)

[http://localhost/project/projectId/port/nodes/messages?lng=en-GB&\_=1670325432158](http://localhost/project/projectId/port/nodes/messages?lng=en-GB&_=1670325432158)

Loading Node catalogs screen stuck there

---

<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: [6 December 2022 11:57 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/8 "2022-12-06T11:57:19Z")

</div>

I have never seen the editor look for a url anything like that.  
Can you post a screenshot of that in the developer console, with the messages around it as well?

---

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [6 December 2022 12:00 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/9 "2022-12-06T12:00:43Z")

</div>

Sure

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/25026aedac267d1bd3f9ac730fe90d125b3a4475.png)

---

<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: [6 December 2022 12:10 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/10 "2022-12-06T12:10:36Z")

</div>

Some plugins and nodes load a message catalog (for internationalisation) from the endpoint `messages`

---

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [6 December 2022 12:24 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/11 "2022-12-06T12:24:41Z")

</div>

> [@Steve-Mcl](#):
>
> odes load a message catalog (for internationalisation) from

So how to resolve it Steve

---

<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: [6 December 2022 12:29 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/12 "2022-12-06T12:29:37Z")

</div>

Fix up your nginx setup to NOT block access to this resource.

I assume this all works if you do NOT use nginx and simply access the URL locally?

---

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [6 December 2022 13:01 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/13 "2022-12-06T13:01:20Z")

</div>

So how to make nginx to not block the resource i am using regex nginx location block, yes this may work fine without nginx

```auto
   location ~ "/project/projectid/([0-9]+)/(.*)" {
            set $port $3;
            set $token $4;
            rewrite ^/project/projectid/[0-9]+(.*) $1 break;
            proxy_pass http://127.0.0.1:$port/$token;
            proxy_set_header Host $host;
            add_header Access-Control-Allow-Methods *;
            proxy_set_header Connection upgrade;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
    }

```

---

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [7 December 2022 08:32 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/14 "2022-12-07T08:32:57Z")

</div>

If havent found the solution can any one, it is getting stuck when adding modules to the flow before adding modules from Manage it is working fine

---

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [7 December 2022 10:43 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/15 "2022-12-07T10:43:39Z")

</div>

the issue i found is with the nginx location block not with the node red any solution @Colin @Steve-Mcl

I can also see

expected\_error", message: "Cannot read properties of undefined (reading 'indexOf')"

---

<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: [7 December 2022 11:05 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/16 "2022-12-07T11:05:49Z")

</div>

Where are you seeing that? What is the text around that message?

---

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [7 December 2022 11:31 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/17 "2022-12-07T11:31:43Z")

</div>

1. {code: "unexpected\_error", message: "Cannot read properties of undefined (reading 'indexOf')"}

2. code: "unexpected\_error"

3. message: "Cannot read properties of undefined (reading 'indexOf')"

In Network --\> Preview

---

<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: [7 December 2022 11:51 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/18 "2022-12-07T11:51:22Z")

</div>

> [@Vikas-Konaparthi](#):
>
> In Network --\> Preview

Where is Network -\> Preview? Is this in node-red or somewhere else?

---

<div class="post-metadata">

### Author: ![Vikas-Konaparthi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikas-konaparthi/32/70446_2.png) [@Vikas-Konaparthi](https://discourse.nodered.org/u/Vikas-Konaparthi)
#### Post date: [7 December 2022 12:06 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/19 "2022-12-07T12:06:58Z")

</div>

This is from browser Network--\> preview, in browser network i am seeing this error for

nodes/messages?lng=en-GB&\_=1670414803827

Is there any thing should i add to the nginx location block

---

<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: [7 December 2022 12:20 UTC](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755/20 "2022-12-07T12:20:28Z")

</div>

> [@Vikas-Konaparthi](#):
>
> {code: "unexpected\_error", message: "Cannot read properties of undefined (reading 'indexOf')"}

I don't see what that error has got to do with the message in the browser.

As for the nginx issue, I don't know about nginx so can't help with that.

[Next page](https://discourse.nodered.org/t/nodered-not-loading-up-when-adding-modules-to-the-flow/71755.md?page=2)
