SSR Pages failed to render on Preview Deploys of a Gatsby Project

Hello Community,

We have a project in (Gatsby x Sanity x Shopify) Stack.
We are hosting it on netlify.

The local builds and develop commands are able to serve us SSG and SSR Pages successfully.

  • gatsby develop
  • gatsby build && gatsby serve
  • netlify build --context deploy-preview

But when we try to visit the Server-Side Rendered (SSR) Product Page in the preview deploy, we get the following error message.

This function has crashed
An unhandled error in the function code triggered the following message:

Runtime.ExitError - RequestId: a6def5be-fd69-4db0-893c-ecc237fc3ec8 Error: Runtime exited with error: exit status 127

Connection details
Netlify internal ID: 01GSFK25EZW96MTSSYYCS4SC5Q

Next steps
Site visitors: Contact the site owner or try again.
Site owners: Review the function logs for more info.

Functions logs are empty.

These SSG pages are running fine.
Home - https://63ef3186be0b4f000834916d--owyn-dev.netlify.app/
Catalog - All Products | Plant Protein | OWYN

What we’ve tried so far

  • CI='' yarn build
  • gatsby clean && gatsby build
  • Clear cache and redeploy
  • Deleting yarn.lock and pushing commits

Note

  • The preview deploys were made automatically from PRs
  • At times I did try clear cache and redeploy

Expectations

  • Clear logs on what crashed specifically on our end so that we can fix it.

Any help is appreciated.
Thank you.

Hi @em1,

I’m seeing this in your function logs:

Feb 19, 05:12:35 PM: 34e3b13e Preparing Gatsby filesystem
Feb 19, 05:12:35 PM: 34e3b13e Starting to prepare data directory
Feb 19, 05:12:35 PM: 34e3b13e Start copying data
Feb 19, 05:12:35 PM: 34e3b13e End copying data
Feb 19, 05:12:35 PM: 34e3b13e /var/lang/bin/node: symbol lookup error: /var/task/.cache/query-engine/assets/node.abi108.glibc.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeEPKNS_9CFunctionEttt
Feb 19, 05:12:35 PM: 34e3b13e RequestId: 34e3b13e-b6d2-49f8-9d71-7fe52f34e2aa Error: Runtime exited with error: exit status 127
Feb 19, 05:12:35 PM: 34e3b13e Runtime.ExitError
Feb 19, 05:12:36 PM: 34e3b13e Duration: 887.38 ms	Memory Usage: 213 MB	Init Duration: 822.79 ms

which was visible here: Netlify App