Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Nextjs server side component not able to fetch data while running on cloud run

On my local server  side components are able to fetch data both in build and dev environment, but when i put it on GCP cloud run, its throw this error: 

 

 

 [TypeError: fetch failed] {"

 

 

Is it required to enable egress network/firewall rule?currently only ingress rule are there .
How can I fix this issue?

Solved Solved
0 3 550
1 ACCEPTED SOLUTION

hi @Hilda_Arteaga , thanks for the response,
What work in this case is changing the runtime environment,
previously it was set as 

export const runtime = "edge";

Changing it to 

export const runtime = "nodejs";

worked for me, and ok with that for now 

View solution in original post

3 REPLIES 3