For my app, I need to download images from intagram posts. I get the url of the image with a scrapping api, then I use a http request node to download the image.
I paused my project in June this year, the http request node was working like a charm. Since I got back to working on it at the begginning of september,
I updated to 1.58.2, now it’s catastrophic, it almost never work. Sometimes it does, most of the times it doesn’t no matter how many time I retry. Currently I am sending around 10 images in a worklow, I try batching them, split batch them etc… nothing works.
It is a real pain for me since getting this image is a main step of my workflow.
Any Idea will be much appreciate. I did try on a simple workflow a http request node with different adresses, sometimes it works, sometimes it doesn’t.
Thanks a lot for you time.
What is the error message (if any)?
connect ENETUNREACH 2602:107:f000:4:face:b00c:3333:a3f:443 - Local (:::0)
Please share your workflow
Share the output returned by the last node
connect ENETUNREACH 2602:107:f000:4:face:b00c:3333:a3f:443 - Local (:::0)
Information on your n8n setup
**n8n version: 1.58.2
**Database (default: SQLite): Google Sheet
**n8n EXECUTIONS_PROCESS setting (default: own, main): Auto and manual
Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.
```
<your workflow>
```
That implies to any JSON output you would like to share with us.
It sounds like a network issue to me which could be contributed by dodgy URLs. Have you tried accessing the images manually for those URLs that results in connection failure? My guess is, your scrapping API could be not parsing all the URLs correctly. You might also benefit from utilizing the method isUrl() and the others to ensure URL is in the correct format before trying to send HTTP GET request.
Thank you for your quick answer. I will look the method isUrl(). But I can already confirm that I can access the images with a browser when I copy past the url from the item in n8n so it’s not a matter with a wrong url. (As the picture in my first post can show it, the url is correct to reach the image).
Did you access that URL from the browser or HTTP Request node? The real browser could handle URL differently forgiving some offending format of the URL.
I just tried validating the adresses with isUrl() before sending them to the http node and they all got a true result. Still I’m getting the same error : connect ENETUNREACH 2602:107:f000:4:face:b00c:3333:a3f:443 - Local (:::0)
Which means that Instagram has that domain configured to resolve to an ipv6 address which is not functional (for at least me and for cloud instances).
The only fix I can think of in this case would be for n8n to add a “Force IPv4” option to the Http node, or if you were self-hosting you could set NODEJS_PREFER_IPV4 env variable to true.
I don’t understand. It was working fine in June. CUrrently it also works sometimes but it is totally random, how can it works sometimes and some others not ?
n8n is built on top of nodejs, which uses this standard algorithm to deal with services that work over both IPv4 and IPv6.
So sometimes when the IPv4 connection opens and responds faster, the http call succeeds.
Other times when the IPv6 connection throws the error quicker, the http call fails.
From what I can tell node.js’s implementation of this algorithm still has open issues.
The reason why this might be happening more often for you on n8n cloud is that we recently switched our DNS servers, because the one we were using before had completely different set of IPv6 related issues.
The main issue in this particular case is that Instagram says that their domain resolves to an IPv6 address, but when we try to talk to that address, Instagram refuses the request.
One last question, I’ve noticed that when I try one or two adresses, it works most of the time, Could it be that Instagram start refusing request after a certain number of request comming from the same IP adress ?
While that is entirely possible, I have currently no proof to support or dismiss that claim.
Also since I can talk to IPv4 address of the same domain, my suspicion is that this likely an ISP infrastructure issue somewhere between n8n cloud and Instagram’s CDN servers.
Thank you again for all your answers.
I will try to limitate the failed attempt with one by one worklow with long delay in between and retries.
But I hope this will be fixed soon since my main workflow starts with getting images from instagram.
Can you please go to the cloud dashboard, and either upgrade your instance to the latest version, or try restarting the instance. This will reconfigure your instance to prioritize IPv4, which should hopefully resolve this issue