NodeRed not loading up when adding modules to the flow

Can you click on one of those 'bad request' entries in the log and see what is being returned exactly via the Network tab of the developer tools?

There may be more information in the response to give a clue as to what is going on. All the evidence points to an issue with your nginx configuration, but we can't really help debug that from here without more information.

{
"name": "node-red-project",
"description": "A Node-RED Project",
"version": "0.0.1",
"private": true,
"dependencies": {
"node-red-dashboard": "~3.2.3"
}
}

Okay - now please do as I asked and click on one of the entries for the messages?lng... routes in red. That will let you see more details about the response the browser got. You might have to click around a bit to find the response details.


I WILL BE ONLINE TILL YOUR NEXT MESSAGE @knolleary

Okay - this is much clearer, and I now understand this is where you were getting that error message from in your earlier posts in this thread.

So this means the runtime is hitting an internal error for some reason on that request. We need to figure out how to debug this on the node-red runtime side.

Have you checked the node-red runtime logs for any corresponding error when you try to load the editor? If there's nothing there, then we'll need to step through the node-red runtime code to try to figure out where it is hitting that error.

I am using docker to run nodered I can see

TypeError: Cannot read properties of undefined (reading 'indexOf')
at ResourceStore.getResource (/usr/src/node-red/node_modules/i18next/dist/cjs/i18next.js:444:15)
at ResourceStore.getResourceBundle (/usr/src/node-red/node_modules/i18next/dist/cjs/i18next.js:535:19)
at I18n._this2. [as getResourceBundle] (/usr/src/node-red/node_modules/i18next/dist/cjs/i18next.js:2375:56)
at /usr/src/node-red/node_modules/@node-red/runtime/lib/api/nodes.js:397:55
at Array.forEach ()
at /usr/src/node-red/node_modules/@node-red/runtime/lib/api/nodes.js:395:26
at done (/usr/src/node-red/node_modules/i18next/dist/cjs/i18next.js:2562:23)
at /usr/src/node-red/node_modules/i18next/dist/cjs/i18next.js:2581:11
at /usr/src/node-red/node_modules/i18next/dist/cjs/i18next.js:2456:11
at Connector.prepareLoading (/usr/src/node-red/node_modules/i18next/dist/cjs/i18next.js:2046:37)
14 Dec 06:17:22 - [error] TypeError: Cannot read properties of undefined (reading 'indexOf')

in docker logs

Great - that is the sort of detail that could have helped at the start :wink:

A tip - if something isn't working, check all the logs.

That gives us something more solid to look at - but I'm not going to be able to do that immediately, so please don't sit waiting for me to respond at this point.

@Vikas-Konaparthi said previously that he only sees that error in the browser when accessing through nginx. Does that make sense?

Yeah Sure @knolleary but please reply me haha.

My best guess is that nginx is stripping off the query parameters when passing the request through. That's the only thing I can think of that would cause a change in behaviour.

So if you wanted to check anything, that's where I'd start. I don't know enough nginx to advise if your config is doing that or not.

this /nodes/messages?lng=... is working fine before addition of plugins so if that would be the cause it should not work before right @knolleary

Not if it is the added module that is pulling in that data.

Please run the browser the other side of nginx and look in the developer tools for those urls and see if they are accessed ok.

Make sure you use the same computer and browser to access node-red.

Yes it is working without nginx with same nodered docker container and browser. @Colin

In the browser console, can you see it fetching the exact URL that fails through nginx?

Yes I see in both the cases

If the browser successfully fetches that URL when nginx is not in the way, but cannot fetch it when nginx is in the way then it is clear that it is nginx that is the cause of the problem. You may need an nginx expert to help sort it out. Since no-one here has volunteered a solution I guess that means you will have to look elsewhere. Sorry.

thank you

Hi @Colin and @knolleary thank you for your time, issue got fixed, the problem as @knolleary stated, Nginx is stripping of the parameters being passed,

In the location block proxy pass of nginx I have added at the end $is_args$args.

That is odd, I thought parameters were passed by default.