FetchError: request to https://.../api/v1/projects failed, reason: connect ETIMEDOUT 34.241.115.67:443
See original GitHub issueWhat version of Next.js are you using?
^12.0.4
What version of Node.js are you using?
16.13.0
What browser are you using?
Google Chrome
What operating system are you using?
Windows
How are you deploying your application?
next export
Describe the Bug
Getting this error, I don’t really understand why. I really want your help 🙏
My API link: https://mvp4startup-api.herokuapp.com/api/v1/projects
export async function getStaticProps() {
const res = await fetch(`${server}/api/v1/projects`);
const projects = await res.json();
const formations = await fetch(`${server}/api/v1/formations`).then((res) =>
res.json()
);
const businessplans = await fetch(`${server}/api/businessplans`).then((res) =>
res.json()
);
return {
props: {
projects,
formations,
businessplans,
},
};
}
Expected Behavior
I expect to receive data and render it to the page, through props.
To Reproduce
Setup next app (version ^12.0.4) and make a getStaticProps call.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
What version of Next.js are you using? - GitHub
FetchError : request to https://.../api/v1/projects failed, reason: connect ETIMEDOUT 34.241.115.67:443. ... How are you deploying your application?
Read more >What could cause "connect ETIMEDOUT" error when the URL ...
Anyway, I've got Problem with request: connect ETIMEDOUT when I run the code and I have no idea how to fix it. What...
Read more >Error: connect ETIMEDOUT - Salesforce Stack Exchange
This is a Temporary issue when the Salesforce API is timed out. ETIMEDOUT comes from the Node.js engine and the error implies.
Read more >Fetch Error on Dev and Production Builds - Prismic People
FetchError : request to https://nuvinair.prismic.io/api/v2?access_token=[REMOVED] failed, reason: connect ETIMEDOUT 34.238.5.239:443
Read more >Fixing Etimedout error - Postman
The ETIMEDOUT error means that the request took more time than the webserver configuration allows and the connection has been closed by the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this:
works fr me and I can succesfully receive both projects and formations.
Including businessplans gives me
FetchError: invalid json response body at https://mvp4startup-api.herokuapp.com/api/businessplans reason: Unexpected end of JSON input
In any case, it doesn’t seem like its an issue with nextjs.
just checked using postman here
It works fine, I’ve got the JSON data
But I still got this error while fetching data 😦