HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

HI

I have been developing an app on my RPi4 no problem at home office, all good. Twice now, when I deploy the Pi physically to site, the nodes fail to load up. At first I thought it maybe a Node.js version problem from what I read, but as soon as I brought my Pi back home it started working again.

The progress bar gets stuck and edit mode does not open, However, I notice at home when node-red does open correctly, the node loading bar does get 'bogged down' around about the same place where it stops when on site - but it seems to resolve itself.

More development at home - time passes, I forgot about the issue, until today I take Pi back to site and again same problem...after reading on the forum my chrome browser developer console shows this error:

DevTools failed to load SourceMap: Could not load content for http://192.168.1.246:1880/vendor/purify.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
:1880/nodes?_=1614178821871:1 Failed to load resource: net::ERR_CONNECTION_RESE

I tried Chrome, Firefox and Opera all the same problem?

I access the Pi as will all other devices via ZeroTier. I assume I have a node with a bug from reading other forums, how do I know which node is causing the problem?

now for something even stranger, I just remembered that I checked on site if node-red would open and port 1880 was working correctly and it loaded! But it won't load from remote?

As a note my NR dashboard is loading.

Any other ideas?

Thanks
Chris

That is not the problem, the .map file is only needed for debugging and that error is normal.

It isn't clear what device is where. Where is node-red running? Where is the browser running? What is it that you take with you when you go on site? Where does ZeroTier come into it. When you are on site what network are you connecting to from the device running the browser? If you are connecting to a network on-site then possibly that does not have access to ZeroTier

Edit:

Do you mean the NR dashboard loads but the editor does not? What url are you using for each?

Node-Red running on the PI
Browser is running on PC at home(remote)
ZT is working, I can access all my Mikrotik kit, CCTV cam, CCTV NVR no problem on the same remote network. I just made an edit to my original post saying while im at site Node-Red boots up fine! ?

In that case tell us again what isn't working and where the browser and the pi are at that time, and what url you are using to access it.
You suggested, I think, that the dashboard works but the editor doesn't, if so then what urls are you using for those and is it always those urls wherever you are?

Colin
Nothing changed, i'll repeat:
Node-Red running on the PI(at site)
Browser is running on PC/tablet/phone at home(remote) nodes don't load but dashboard does.
Browser is running on PC/tablet/phone at site(local) both editor and dashboard work normally
Above behavior repeats on Android Tablet and Phone.

NR Url: http://192.x.x.x:1880/
NR Dash Url: Url: http://192.x.x.x:1880/alarm

Re your comment about .map, the way this has been coded I believe there is a request url to the internet which is blocked by my network(I have some routing issues) for some reason, there are at least two general threads (nothing to do with NR) on other forums discussing the problem at length, in regard to the error I posted above where coding gurus(thats not me) are discussing the matter.

I would like to ask the question again, how can I find the offending node/code to remove or is it intrinsic to node-red?

Thanks, C

You could try
npm list purify
and
npm list -g purify
to see if one of the nodes has installed that module.

Thanks Colin, I'll check

I do have to repeat, however, that the lack of a .map file is not a problem. If you look for that file under your .node-red folder I am sure you will find that the file does not exist.

Colin, I searched for purify as per your commands and found nothing. Let's think about this in reverse, is the lack of .nmap the problem? and the pi is trying to download a resource it cannot reach(there's a mozilla thread that talks about malformed urls etc) I have tested this 5 times now, when the PI is installed on site and I access by remote(ZT) from home the editor never loads and the progress bar stalls for ever before you see the prompt to load 1/out of x nodes (the prompt never shows) When the PI is back home everything works, no progress bar stalling no browser error.

I assume I must have a corruption somewhere? before I un-install node-red and start again, I was wondering are there any cleanup scripts/command I can run find any issues?

Before you ask, I installed NR using the script as per NR docs, my node version is v12.20.2

Thanks again C.

Let me check I understand again. The only thing you change to make it fail is to move the pi from to on site?
If so then is it to do with the fact that the connection is going via zerotier to the remote network? Are websockets open on zero tier?

Yes you understand absolutely correctly :slight_smile:
Even though Zerotier is 'fully open' it still has to transit the 4G router firewall, i'll check websockets, I assume nothing more special than 80 and 443? I don't think 80 is an issue, i'll check 443.

I have looked back and realise I missed something. I thought the editor worked but not the dashboard, but I see it is the other way round.
In settings.js enable trace logging and see if you get anything in the node red log when you restart node red and open the editor, though I am not particularly hopeful.

Hi Colin, I did try enabling logging as per node-red documentation but keep getting errors with the settings file so I gave up. In the end I had to get access to my pi somehow and so used a vpn in the end and now access to the editor works fine. As mentioned I know I have some sort of routing nuance on my network I have yet to learn/find which seems to the problem preventing outbound requests to the internet. Thanks for your help, you can close this thread now - cheers.

I've been running into this error myself. I'm using UI Builder from @TotallyInformation which runs perferctly in dashboard when I open it from within my local network (the UI builder is actually a frame which allows neat things to display within the dashboard). When I a friend of mine, who has access to my machine through VPN he can see the dashboard, but not the UI builder frame, resulting in the same ERR_HTTP_RESPONSE_CODE_FAILURE:

So far I was not able to figure it out, but as you can see the console shows the SourceMap warning.

(In case my problem is a very different one from yours, let me know and I'll move my topic to a separate thread.)

That is usually not a problem. The map files are symbol tables for debugging and won't be there unless you have included them. I expect that same error appears when you access it locally.

Is the VPN setup to allow websockets through?

I never resolved this, as a coincidence I was already reviewing a linux remote admin solution from qbee .io, part of the feature set is a remote access vpn this worked from the day I set it in motion it has been faultless ever since, trying to access the NR editor via zerotier never worked for me, but the dashboard worked fine. I still notice every time I open the editor even when I'm physically at the remote site where the pi is installed and accessing that pi from that local network the editor 'baulks' and trying to load the the nodes, the progress bar is stuck sometimes for almost a minute or more before 'node 1/x' is displayed, at this point all nodes are loaded at the expected rate and everything is fine. Since my days of the ZX81 I have learnt that in the computer world 'things that work normally' can quite often turn into a problem...could it be the problem is with the software build of the pi rather than NR itself?

I'd need to see more to begin to know what is happening. IFrames can be funny things and I do set some security settings on uibuilder delivery.

When the iframe isn't showing - does the network tab tell you that the resource has loaded?

Hoi mates,

sorry for the delay. I figured out it is a simply hostname resolution thing since my buddy who's connecting through VPN to my server can only see IPs not hostnames. I'll have to adjust the VPN configuration (or whatever is required to achieve that..)

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