Shopify / shopify-app-js

MIT License
290 stars 116 forks source link

Http request error, no response available: GraphQL Client: request to https://<store-name>/admin/api/2024-07/graphql.json failed, reason: #1588

Closed zakariamofaddel closed 1 month ago

zakariamofaddel commented 1 month ago

Issue summary

Before opening this issue, I have:

Since a couple weeks, this error started appearing in my Sentry logs and I cannot figure out what is causing it and it's causing me a lot of issues.

It's not consistent, sometimes it does not error out and sometimes it does.

Does anyone know what could be causing it?

App loader error HttpRequestError: Http request error, no response available: GraphQL Client: request to https://e7819f-84.myshopify.com/admin/api/2024-07/graphql.json failed, reason: 
[2024-10-01 16:24:03]     at throwFailedRequest (file:///workspace/node_modules/lib/clients/common.ts:66:11)
[2024-10-01 16:24:03]     at NewGraphqlClient.request (file:///workspace/node_modules/lib/clients/admin/graphql/client.ts:133:7)
[2024-10-01 16:24:03]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-10-01 16:24:03]     at query (file:///workspace/node_modules/@shopify/src/server/clients/admin/graphql.ts:24:27)
[2024-10-01 16:24:03]     at Function.<redacted> (file:///workspace/build/server/assets/server-build-CERrdtF1.js:2385:17)
[2024-10-01 16:24:03]     at async Promise.all (index 1)
[2024-10-01 16:24:03]     at loader$9 (file:///workspace/build/server/assets/server-build-CERrdtF1.js:4100:68)
[2024-10-01 16:24:03]     at /workspace/node_modules/@sentry/src/utils/instrumentServer.ts:267:36
[2024-10-01 16:24:03]     at Object.callRouteLoader (/workspace/node_modules/@remix-run/server-runtime/dist/data.js:59:16)
[2024-10-01 16:24:03]     at /workspace/node_modules/@remix-run/router/router.ts:4902:19

it only happens on my production app on DigitalOcean, but if I run the same build locally, it works perfectly without crashing.

Expected behavior

What do you think should happen?

Actual behavior

What actually happens?

Steps to reproduce the problem

1. 1. 1.

Debug logs

// Paste any relevant logs here
zakariamofaddel commented 1 month ago

It seems like I managed to solve it by upgrading from a shared instance to a dedicated one on DigitalOcean.

I did not think the $12/mo app platform instance would start dropping HTTP requests like that, it was a nightmare with all the customer support requests. For anyone encountering the same issue, I feel you🫂

I will close this, as for now it does not seem like the issue was caused by the GQL client.