Re: Connection API errors

Why am I getting connection API errors in my Gatsby project?

CristoferAE
Visitor
2 0 0

Hello, I am new here. Recently, I assumed a project.

When I try to reach API, I receive errors like the following:

getaddrinfo ENOTFOUND MY_STORE.myshopify.com

or

GraphQL request failed on attempt 1: FetchError: request to https://MY_STORE.myshopify.com//api/2022-10/graphql.json failed, reason: connect ENOMEM 23.227.38.74:443 - Local (0.0.0.0:0)
    at ClientRequest.<anonymous> (/Users/PROJECT_FOLDER/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:481:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ENOMEM',
  code: 'ENOMEM'
}


or

GraphQL request failed on attempt 1: FetchError: request to https://MY_STORE.myshopify.com//api/2022-10/graphql.json failed, reason: connect ENOMEM 23.227.38.74:443 - Local (0.0.0.0:0)
    at ClientRequest.<anonymous> (/Users/PROJECT_FOLDER/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:481:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND'
}

The project is built with Gatsby and deployed on Netlify. The errors show local but happen on the prod build.

Replies 5 (5)

simone_bogni
Shopify Partner
9 0 7

I'm having the same issue when starting an app in Digital Ocean, after the build phase finishes successfully.

What I see is (obviously with the tunnel domain obfuscated)

[2023-12-11 09:01:51] > remix-serve build/index.js
[2023-12-11 09:01:51] 
[2023-12-11 09:01:53] [shopify-api/INFO] version 8.0.2, environment Remix
[2023-12-11 09:01:56] Error: getaddrinfo ENOTFOUND https://**********.trycloudflare.com/
[2023-12-11 09:01:56]     at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)

 
We are using Shopify CLI and the latest remix template.
Yes, the tunnel was active when we tried to deploy.

An answer on this topic from the Shopify staff would be much appreciated, as it has been open since the end of September 🙂
I'd also appreciate if anyone else has other insights to this comment and the one from the original poster.

Thank you

felixmpaulus
Shopify Partner
55 0 19

same problem here...

Add bullet points to your productpage with Bloom: Product Feature Bullets
Increase branding and conversion. Set your store apart.
❤️ Free Plan available. Exclusively 5-star reviews.
Juan321654
Shopify Partner
4 0 0

same here, did you figure it out?

simone_bogni
Shopify Partner
9 0 7

Sadly, no. In the end we used Fly.io instead of Digital Ocean.

I have to say I really don't like the solution, as Fly doesn't offer the range of services DO offers.

I'd also like it if Shopify made available more deployment guides for other services, including ones like Azure or AWS, and more tutorials on how to interface remix apps with different database management systems.

I understand that Shopify wants to push Remix now that they have acquired it, but to be honest, it wasn't a nice experience in the end.

At the moment I don't think the development with Remix is nearly as pleasant or straightforward as it is with Laravel or Express, which are better documented and have a greater community.

I hope it will improve in the future, but for the moment I'm sticking to Express 🙂

devrex
Shopify Partner
12 1 1

Hi,

 

Try 

 

npm run shopify auth logout

 

and then npm run dev

 

It worked on my end.