Open
Description
Issue summary
Before opening this issue, I have:
- Upgraded to the latest version of the relevant packages
@shopify/admin-api-client
package and version: 1.0.4 + node-fetch 2.7.0 (as a fetch agent)- Node version: 18.20.4
- Operating system: Deployed on AWS ECS/ECR
- Found a reliable way to reproduce the problem that indicates it's a problem with the package
- Looked for similar issues in this repository
- Checked that this isn't an issue with a Shopify API
This happens even on the deployed app that never had issues. We have the app deployed on AWS ECR/ECS.
Below you can find errors happening continuously:
- Admin API Client: request to https://xx-xx-xx.myshopify.com/admin/api/2024-10/customers/7572172243096.json failed, reason: Client network socket disconnected before secure TLS connection was established
- Admin API Client: request to https://xx-x-xx.myshopify.com/admin/api/2024-10/orders/5116455780504.json failed, reason: socket hang up
I was reading around
- [Feature]: how to use a proxy to view the url "https://xx.myshopify.com/admin/api/unstable/themes.json" cli#4399
- https://community.shopify.com/c/shopify-cli-and-tools/error-client-network-socket-disconnected-before-secure-tls/m-p/2425739
- [Bug]: Execute Shopify theme dev with error message: request to xxx.theme.json?xxx processing failed, reason: read ETIMEDOUT cli#3225
And it seems now we have to do some kind of a proxy. This has not happened since last week. We changed nothing in our system, and it has started spitting this error out. So, I am not sure what I should try now and how I should change the code so it works:
const fetch = require('node-fetch');
this.shopify = createAdminRestApiClient({
storeDomain: process.env.SHOPIFY_URL,
apiVersion: '2024-10',
accessToken: process.env.SHOPIFY_ADMIN_API_TOKEN,
customFetchApi: fetch
});
Metadata
Assignees
Labels
No labels