Http request flow error

Hi,
I have basic flow that triggers 5hours from a website everyday at 00:00 and write them in a times.txt file.
Until Dec. 12th it was working but now I'm getting the error on the screenshot.

[{"id":"c905ee12da44453a","type":"html","z":"b8a01411d25c8f49","name":"","property":"payload","outproperty":"payload","tag":"#today-pray-times-row div[class=tpt-cell]","ret":"html","as":"multi","x":415,"y":100,"wires":[["63ed769d1f785e1c","6ac3f5aacd7f1664"]],"l":false},{"id":"2b2a9bbc796fbadd","type":"inject","z":"b8a01411d25c8f49","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":100,"wires":[["1316bdb5c0a8c752"]]},{"id":"1316bdb5c0a8c752","type":"http request","z":"b8a01411d25c8f49","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://namazvakitleri.diyanet.gov.tr/en-US/9132/prayer-time-for-montreal","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"User-Agent","keyValue":"","valueType":"other","valueValue":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0"}],"x":290,"y":100,"wires":[["c905ee12da44453a"]]},{"id":"daf1ac4bf1cd7606","type":"debug","z":"b8a01411d25c8f49","name":"debug 122","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":790,"y":100,"wires":[]},{"id":"63ed769d1f785e1c","type":"html","z":"b8a01411d25c8f49","name":"","property":"payload","outproperty":"payload","tag":"div[class=tpt-title]","ret":"html","as":"multi","x":485,"y":80,"wires":[["5f4eca7604092473"]],"l":false},{"id":"6ac3f5aacd7f1664","type":"html","z":"b8a01411d25c8f49","name":"","property":"payload","outproperty":"payload","tag":"div[class=tpt-time]","ret":"html","as":"multi","x":485,"y":120,"wires":[["5f4eca7604092473"]],"l":false},{"id":"5f4eca7604092473","type":"join","z":"b8a01411d25c8f49","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":555,"y":100,"wires":[["4198e8a4659a8f31"]],"l":false},{"id":"4198e8a4659a8f31","type":"change","z":"b8a01411d25c8f49","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"temp","tot":"msg"},{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"payload.prayer","pt":"msg","to":"temp[0]","tot":"msg"},{"t":"set","p":"payload.time","pt":"msg","to":"temp[1]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":615,"y":100,"wires":[["19d626209f440d07"]],"l":false},{"id":"19d626209f440d07","type":"join","z":"b8a01411d25c8f49","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"1","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":675,"y":100,"wires":[["daf1ac4bf1cd7606"]],"l":false}]

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json

Sorry, I just updated the code.. Thanks

1 Like

I'm using Home Assistant and Note-Red was updating couple days ago.. wondering if that caused the issue. I have Home Assistant running in another computer with Note-Red that was not updated and the flow above works there..

I see that problem is related to Note-Red version. The flow works with 13.5.3 but if I upgrade to 14.0.0 im getting the error above..
image

It is ok for me running node red 3.0.2 with nodejs 16

I think you will need to post on an HA forum, Perhaps they are not using a good version of nodejs, or an out of date node red version.

I tried your http request and it worked fine 3 times, then after that all that is returned is a html page containing a Javascript function, I suspect that the site has started to monitor the useage and is blocking automated requests. i suggest sending the request nodes return payload to console or file to see what is returned.

It isn't giving the EPROTO error though, which is coming from nodejs I believe.

You are correct, I had not seen the error in the image, I just tested the flow.

I suspect this is a HA thing. They have probably updated the image to use Nodejs v18.x

Can you see if diagnostics is available on that container? In node-red, open the command palette (ctrl+shift+p) and type info then see if there is a system info option in the list. Click that, you should see what versions are used (plus much more)

system info is not listed as mentioned above could be related to Home Assistant, I just restored to Note-RED version 13.5.3 and it's working

Please do feed the issue into wherever you report Home Assistant problems so that others won't keep falling over this.

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