Shopify hydrogen: Build works but netlify domain gets 502

Hi Netlify Community,

I am trying to deploy a Shopify hydrogen app to Netflify Edge Functions with the help of this package: GitHub - netlify/hydrogen-platform: Hydrogen support for Netlify Edge Functions

Site name: https://lively-pie-40c37f.netlify.app

The build successfully finishes, but when I try to open the link I’m getting a HTTP 502 error. Someone in the Shopify Discord suggested that it might have to do with the wrong AWS Lambda Node runtime of Netlify Functions, which I tried to solve via environment variables in the UI (like desribed here: AWS_LAMBDA_JS_RUNTIME - nodejs14.x - #2 by lambrospetrou) but this also didn’t help.

I’m really grateful for any hints.

Hi @EdgarNigel,

You seem to be having issues due to Edge Functions. Could you disable those and try again?

Also, about the current error with Edge Functions, it’s already escalated to the developers. Once we hear back from them, we’ll let you know.

Hi @hrishikesh,

how can I disable Edge Functions? I believe the Netlify package was especially build for Edge Functions?

Best,
Philipp

I meant, you could try using Hydrogen without using Edge Functions to see if the issue is solved - at least till we’re able to take a deeper dive in the Edge Function situation.

FYI, our team has found the root cause of this problem. Your edge function must begin returning at least HTTP response headers (it can wait somewhat longer to return more data, such as the body) within 40 seconds, or we will stop executing. Your edge functions do not seem to do so, and thus they are killed off at 40 seconds by us as we assume they are not going to work and will not keep the idle connection open for longer.

This is a (now) documented limitation of the service: Edge Functions limits | Netlify Docs