Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Execute Shopify theme dev with error message: request to xxx.theme.json?xxx processing failed, reason: read ETIMEDOUT #3225

Closed
2 tasks done
MyBaymax opened this issue Jan 5, 2024 · 96 comments
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working

Comments

@MyBaymax
Copy link

MyBaymax commented Jan 5, 2024

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

Start development services

Actual behavior

request to https://amirobeauty-com.myshopify.com/admin/api/unstable/themes
│ .json?fields=id%2Cname%2Crole%2Cprocessing failed, reason: read ETIMEDOUT

Verbose output

2024-01-05T05:38:22.631Z: Running command theme dev
  shopify:theme:dev init version: @oclif/[email protected] argv: [ '-t=162423603516', '-s=amirobeauty-com', '--verbose' ] +0ms
2024-01-05T05:38:22.653Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]

2024-01-05T05:38:22.654Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store amirobeauty-com.myshopify.com:
[]

2024-01-05T05:38:22.654Z: Getting session store...
2024-01-05T05:38:22.658Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
  "adminApi": {
    "scopes": [],
    "storeFqdn": "amirobeauty-com.myshopify.com"
  }
}

2024-01-05T05:38:22.659Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-01-05T05:38:22.659Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.51.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-01-05T05:38:23.347Z: Request to https://accounts.shopify.com/oauth/introspection completed in 674 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"1858cd7de013df56d8f94ed0f5bfefcc"
 - x-request-id: b87ed319-ea71-4e0c-92cc-0014e2c92be1
    
2024-01-05T05:38:23.359Z: The identity token is valid: true
2024-01-05T05:38:23.359Z: 
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false
  
2024-01-05T05:38:23.360Z: The current session is valid but needs refresh. Refreshing...
2024-01-05T05:38:23.364Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_CjQIoqverAYQwuPerAZSJggBEhCYyQfZG_FItoPH5HuDCJ8uGhDiMj-HiV1EsqpxTEMrCa8QEkDhw3xvxAMSewT92n5Cs1tTJfeGSkbr7EKZWb9_rk_Dbm25Afg5T8Sn3Cyhq8mPHq4XlH4AELwGJiX_LJ-FybwB&refresh_token=atkn_CiEIoqverAYQosX8rQaiARIKEOIyP4eJXUSyqnFMQysJrxASQGpA8QjIt_Eb1oH-IrlAeS_2dK7_oHw56fEQwjdaiZT-XH2dY53UukzAQTaAmdVcH7sqpAwu0DFmkswjENVEAgI&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3
With request headers:
 - User-Agent: Shopify CLI; v=3.51.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-01-05T05:38:24.051Z: Request to https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_CjQIoqverAYQwuPerAZSJggBEhCYyQfZG_FItoPH5HuDCJ8uGhDiMj-HiV1EsqpxTEMrCa8QEkDhw3xvxAMSewT92n5Cs1tTJfeGSkbr7EKZWb9_rk_Dbm25Afg5T8Sn3Cyhq8mPHq4XlH4AELwGJiX_LJ-FybwB&refresh_token=atkn_CiEIoqverAYQosX8rQaiARIKEOIyP4eJXUSyqnFMQysJrxASQGpA8QjIt_Eb1oH-IrlAeS_2dK7_oHw56fEQwjdaiZT-XH2dY53UukzAQTaAmdVcH7sqpAwu0DFmkswjENVEAgI&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3 completed in 682 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"7aea3781ee472647f2dd168c9546b2d5"
 - x-request-id: ff1e2970-b8df-4b8f-8f6b-e1fcb5c361c4
    
2024-01-05T05:38:24.059Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.51.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-01-05T05:38:24.059Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.51.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-01-05T05:38:24.059Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.51.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-01-05T05:38:24.059Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly&subject_token=****&destination=https%3A%2F%2Famirobeauty-com.myshopify.com%2Fadmin
With request headers:
 - User-Agent: Shopify CLI; v=3.51.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-01-05T05:38:24.715Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=**** completed in 646 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"0aafaab49c7da130c0eb9b2c2b4531bb"
 - x-request-id: 0c4d9712-b5cc-48b1-a756-4cdfb2ec977a
    
2024-01-05T05:38:24.727Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=**** completed in 661 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"ef12c0211829f8adabc1f8140f9696f6"
 - x-request-id: f0ef61a5-c596-460b-9fef-4e0487168404
    
2024-01-05T05:38:24.733Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly&subject_token=****&destination=https%3A%2F%2Famirobeauty-com.myshopify.com%2Fadmin completed in 657 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"43ebc473530be7e146a89f7ed544ec75"
 - x-request-id: d9e5070d-9c69-428f-bfd6-5cb3631afff7
    
2024-01-05T05:38:24.743Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=**** completed in 672 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"ad972dff4f4847856b336befe6d77749"
 - x-request-id: 78d4eea6-e423-4f26-87fa-3b3a77dfcbd4
    
2024-01-05T05:38:24.746Z: Setting session store...
2024-01-05T05:38:24.754Z: Ensuring that the user is authenticated with the Storefront API with the following scopes:
[]

2024-01-05T05:38:24.755Z: Getting session store...
2024-01-05T05:38:24.758Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
  "storefrontRendererApi": {
    "scopes": []
  }
}

2024-01-05T05:38:24.758Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-01-05T05:38:24.758Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.51.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-01-05T05:38:25.385Z: Request to https://accounts.shopify.com/oauth/introspection completed in 624 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"4c322ab9b3ca704742af61217c25bba1"
 - x-request-id: 5e2fe173-6ac8-46f9-9f02-1fdf0df387c4
    
2024-01-05T05:38:25.389Z: The identity token is valid: true
2024-01-05T05:38:25.389Z: 
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false
  
2024-01-05T05:38:25.406Z: 
Running system process:
  · Command: /usr/local/opt/ruby/bin/ruby -v
  · Working directory: /Users/baymax/Desktop/vscode/amiro

2024-01-05T05:38:25.457Z: 
Running system process:
  · Command: /usr/local/opt/ruby/bin/bundle -v
  · Working directory: /Users/baymax/Desktop/vscode/amiro

2024-01-05T05:38:25.601Z: Reading the content of file at /usr/local/Cellar/shopify-cli/3.51.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/Gemfile...
2024-01-05T05:38:25.603Z: 
Running system process:
  · Command: /usr/local/opt/ruby/bin/bundle install
  · Working directory: /usr/local/Cellar/shopify-cli/3.51.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby

2024-01-05T05:38:25.871Z: 
Running system process:
  · Command: /usr/local/opt/ruby/bin/bundle exec /usr/local/opt/ruby/bin/ruby /usr/local/Cellar/shopify-cli/3.51.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/bin/shopify theme token --admin atkn_Cp8DCNCr3qwGEPDj3qwGYpADCAESEDKFuqv6eUvGgCTwcNV671oaqAFodHRwczovL2FwaS5zaG9waWZ5LmNvbS9hdXRoL3BhcnRuZXJzLmNvbGxhYm9yYXRvci1yZWxhdGlvbnNoaXBzLnJlYWRvbmx5IGh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5hZG1pbi5ncmFwaHFsIGh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5hZG1pbi50aGVtZXMgDSinUzIQkRrMQBltTVu_byZGZKBDTTokNDA3ZWJkZGEtYzMwYS00NzJmLWFiY2ItZTUxNjYzOGI0ODkwQgdBY2NvdW50ShD_L62KA95L8bcf54Lwf0LXUlN7InN1YiI6ImZiZGIyNjQ5LWUzMjctNDkwNy04ZjY3LTkwOGQyNGNmZDdlMyIsImlzcyI6Imh0dHBzOi8vYWNjb3VudHMuc2hvcGlmeS5jb20ifWIQ9JXN4zO-R9GN8r5UoxH4y2oQxuZkRHl4TiGQyRrakuDGnRJA7BSSeOZBgt3pX2uRbSlMZWRhPDXNtew5xr-GHR947i6XacxmhCd29bvZvjCCMUK5ITO4sZd5Nmd7T7-jHyITCw --sfr atkn_CqMCCNCr3qwGEPDj3qwGYpQCCAESEJHDg4xstkAyqcNyOeN39kwaPmh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5zdG9yZWZyb250LXJlbmRlcmVyLmRldnRvb2xzINhSKKdTOiQ0MDdlYmRkYS1jMzBhLTQ3MmYtYWJjYi1lNTE2NjM4YjQ4OTBCB0FjY291bnRKEP8vrYoD3kvxtx_ngvB_QtdSU3sic3ViIjoiZmJkYjI2NDktZTMyNy00OTA3LThmNjctOTA4ZDI0Y2ZkN2UzIiwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5zaG9waWZ5LmNvbSJ9YhD0lc3jM75H0Y3yvlSjEfjLahDG5mREeXhOIZDJGtqS4MadEkB7cD3vJ8X7oTOigcu1q4FOKSxt_rj2N-gcY26uMNYeRzgbELqsfnl5MeiWLRAXZRwVyrZRt63WnwQtzNoq-mwA
  · Working directory: /Users/baymax/Desktop/vscode/amiro

2024-01-05T05:41:30.960Z: Request to https://amirobeauty-com.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing completed in 184652 ms
With response headers:

    
╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  request to https://amirobeauty-com.myshopify.com/admin/api/unstable/themes  │
│  .json?fields=id%2Cname%2Crole%2Cprocessing failed, reason: read ETIMEDOUT   │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

2024-01-05T05:41:31.056Z: Unable to log analytics event - no information on executed command
2024-01-05T05:41:31.063Z: Reporting handled error to Bugsnag: request to https://amirobeauty-com.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing failed, reason: read ETIMEDOUT
2024-01-05T05:41:31.088Z: Obtaining the dependency manager in directory /Users/baymax/Desktop/vscode/amiro...
    FetchError: request to 
    https://amirobeauty-com.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing failed, 
    reason: read ETIMEDOUT
    Code: ETIMEDOUT

Reproduction steps

shopify theme dev -t=162423603516 -s=amirobeauty-com --verbose

Operating System

macOS Sonoma 14.1.2

Shopify CLI version (check your project's package.json if you're not sure)

3.51.2

Shell

zsh

Node version (run node -v if you're not sure)

v21.4.0

What language and version are you using in your application?

No response

@forwells
Copy link

forwells commented Jan 6, 2024

Find some wrong things, This problem caused by country firewall , in some country (cn), you can't visit shopify resource now, after 1.4 or 1.5 of 2024
.
by view shopify cli core code , it's use oclif/core package of npm to run cli command , and send some api requests by node-fetch lib, but node-fetch cannot proxy terminal requests auto, even you has open some proxy node to view shopify, so just wait shopify cli update , or change the cli core code to proxy request!
for every one , the issue has bothered me all day....

----------------------------240106 update

Yes, I'm sure the answer is right above, after test ,

Suggest Shopify CLI add --proxy and alias -p option for command option, or use terminal http_proxy or https_proxy directly, we will use proxy self!

This problem has been temporarily solved, and I feel a little more relaxed now. I can't imagine how painful it will be if you can't use shopify for local development.

@MyBaymax
Copy link
Author

MyBaymax commented Jan 7, 2024

感谢您的帮忙。您太棒了!👍
的确,无法使用shopify-cli开发非常痛苦,目前我使用theme-kit代替工作。
现在只能等待Shopify-cli添加proxy选项吗?是否有别的方法可以让我现在就可以使用shopify-cli?

Thank you for your help. You're amazing!👍
Indeed, the inability to develop using Shopify cli is very painful, and currently I am using theme kit instead of work.
Can we only wait for Shopify cli to add the proxy option now? Is there any other way for me to use Shopify cli now?

@NickOpen
Copy link

NickOpen commented Jan 7, 2024

@forwells I think you are right, this issue drive me ( and my partner ) nuts. now it's fixed by terminal http_proxy or https_proxy.

And also, under CMCC network (in China) also have some api request hang issues, we change from CMCC to Telecom before, hope this info can help other domestic bro.

@MyBaymax
Copy link
Author

MyBaymax commented Jan 8, 2024

@NickOpen 你的Shopify-cli可以正常工作了吗?是的话,可以跟我分享下你的 http_proxy or https_proxy 是怎么设置的吗?我不知道怎么通过设置这个解决问题。感谢🙏

@Shenr1
Copy link

Shenr1 commented Jan 8, 2024

@NickOpen 你的Shopify-cli可以正常工作了吗?是的话,可以跟我分享下你的 http_proxy or https_proxy 是怎么设置的吗?我不知道怎么通过设置这个解决问题。感谢🙏

遇到了同样的问题,有解决方案了吗

@forwells
Copy link

forwells commented Jan 8, 2024

@MyBaymax , @Shenr1 do a temporarily resolve plan, make these change :

in your global npm/yarn/pnpm package directory, find the package path:
node_modules/@shopify/cli-kit/dist/public/node/http.js

then:

export async function fetch(url, init) {
console.log('termial proxy')
const proxy_url = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
const agent = new HttpsProxyAgent(proxy_url)
return runWithTimer('cmd_all_timing_network_ms')(() => debugLogResponseInfo({ url: url.toString(), request: nodeFetch(url, { ...init, agent }) }));
}

before add agent to node-fetch, please make sure install https-proxy-agent package global installed, have fun day!

@NickOpen
Copy link

NickOpen commented Jan 8, 2024

@MyBaymax @Shenr1 we fixed it by C-l-a-s-hX (advanced mode) and run the terminal command to set https_proxy and http_proxy, but now it seems the repository has gone. So I just suggest you can try the @forwells supplied solution, if still have some issue, please give me private message.

@MyBaymax
Copy link
Author

MyBaymax commented Jan 8, 2024

@MyBaymax , @Shenr1 do a temporarily resolve plan, make these change :

in your global npm/yarn/pnpm package directory, find the package path: node_modules/@shopify/cli-kit/dist/public/node/http.js

then:

export async function fetch(url, init) { console.log('termial proxy') const proxy_url = process.env.HTTP_PROXY || process.env.HTTPS_PROXY; const agent = new HttpsProxyAgent(proxy_url) return runWithTimer('cmd_all_timing_network_ms')(() => debugLogResponseInfo({ url: url.toString(), request: nodeFetch(url, { ...init, agent }) })); }

before add agent to node-fetch, please make sure install https-proxy-agent package global installed, have fun day!

非常感谢 @forwells 提供的方案 🙏。我使用@forwells提供的方案后,已可以正常使用Shopify-cli。
我将关闭该问题。期待 Shopify 团队提供 proxy 配置选项。

Thank you very much for the solution provided by @forwells 🙏. After using the solution provided by @forwells, I can now use Shopify cli normally.
I will close this issue. Looking forward to the Shopify team providing proxy configuration options. 🎉

@MyBaymax MyBaymax closed this as completed Jan 8, 2024
@Shenr1
Copy link

Shenr1 commented Jan 9, 2024 via email

@wantgoworld
Copy link

I am using vpn proxy, http proxy local port is 10808 LAN port is 10810, no environment variables are set, here is the code I changed:
屏幕截图 2024-01-09 110349
Is something misconfigured?

@MyBaymax
Copy link
Author

MyBaymax commented Jan 9, 2024

@Shenr1 @wantgoworld 可以发下你们终端输出的信息,以便确认错误原因

@wantgoworld
Copy link

╭─ error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ request to https://admin.myshopify.com/admin/api/unstable/themes/xxxx.json?fields=id%2Cprocessing failed, reason: Client network │
│ socket disconnected before secure TLS connection was established │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

FetchError: request to https://admin.myshopify.com/admin/api/unstable/themes/xxxxx.json?fields=id%2Cprocessing failed, reason: Client network socket disconnected before secure TLS connection was established
Code: ECONNRESET

@MyBaymax
Copy link
Author

MyBaymax commented Jan 9, 2024

@wantgoworld 如果你的终端没有打印 termail proxy, 则说明你的在vscode中执行的 shopify-cli 并非你修改的 fetch 位置

@wantgoworld
Copy link

@wantgoworld 如果你的终端没有打印 termail proxy, 则说明你的在vscode中执行的 shopify-cli 并非你修改的 fetch 位置

找到问题了。谢谢

@Shenr1
Copy link

Shenr1 commented Jan 9, 2024 via email

@MyBaymax
Copy link
Author

MyBaymax commented Jan 9, 2024

@Shenr1 你这代码看了太难受了,可以处理下格式吗😣

@kuww
Copy link

kuww commented Jan 9, 2024

@MyBaymax 按照上面的方案 去修改http.js的代码,可以获取到json文件,但是ssl失败了
image
你遇到了没

@MyBaymax
Copy link
Author

MyBaymax commented Jan 9, 2024

@MyBaymax 按照上面的方案 去修改http.js的代码,可以获取到json文件,但是ssl失败了 image 你遇到了没

我没有遇到这个问题

@kuww
Copy link

kuww commented Jan 9, 2024

@MyBaymax image
请问是这样修改的吗

@MyBaymax
Copy link
Author

MyBaymax commented Jan 9, 2024

@MyBaymax image 请问是这样修改的吗

是的,还需要导入 HttpsProxyAgent

@halweg
Copy link

halweg commented Jan 9, 2024

my node.js version is v20.9.0,
and i changed the gobal node_modules code like this:
企业微信截图_20240109185857
and then, report this:
企业微信截图_20240109190003

@MyBaymax
Copy link
Author

MyBaymax commented Jan 9, 2024

my node.js version is v20.9.0, and i changed the gobal node_modules code like this: 企业微信截图_20240109185857 and then, report this: 企业微信截图_20240109190003

HttpsProxyAgent 导入错了

import { HttpsProxyAgent } from "https-proxy-agent";

@MyBaymax
Copy link
Author

MyBaymax commented Jan 9, 2024

给大家写下具体步骤

完整Shopify-cli代理设置步骤

Step1: 确认文件位置

例如我是使用 brew 安装的,可以通过 brew list shopify-cli 确认Shopify-cli 文件位置

baymax@chouyaofandedeMacBook-Pro remix-shopify % brew list shopify-cli
/usr/local/Cellar/shopify-cli/3.53.0/bin/shopify
/usr/local/Cellar/shopify-cli/3.53.0/libexec/bin/ (2 files)
/usr/local/Cellar/shopify-cli/3.53.0/libexec/lib/ (57641 files)

Step2: 进入theme@shopify/cli-kit 中安装 https-proxy-agent

例如我的完整路径 node_modules/@shopify/theme/node_modules/@shopify/cli-kit, 如果你要用theme 外其他命令,还需要修改 cli 中的@shopify/cli-kit

安装 https-proxy-agent

npm install https-proxy-agent

Step3: 修改 dist/public/node/http.js 文件中的fetch 函数

import { HttpsProxyAgent } from "https-proxy-agent";

export async function fetch(url, init) {
  // 可以保留 console.log("fetching: Proxy"); 以确认你修改的路径是否正确
  console.log("fetching: Proxy");
  // 可以用变量,也可以直接写代理地址
  // const proxy_url = process.env.HTTP_PROXY || process.env.HTTPS_PROXY; 
  const proxy_url = "http://127.0.0.1:10010";
  const agent = new HttpsProxyAgent(proxy_url);
  return runWithTimer("cmd_all_timing_network_ms")(() =>
    debugLogResponseInfo({
      url: url.toString(),
      request: nodeFetch(url, { ...init, agent }),
    })
  );
}

÷

@CharlieLu2022
Copy link

非常感谢,按以上具体方法问题已解决!!

@Guo8a
Copy link

Guo8a commented May 22, 2024

@Guo8a “其中 http://127.0.0.1:7898 是我在设置命令行代理的中会设置的端口号:export https_proxy=http://127.0.0.1:7898 http_proxy=http://127.0.0.1:7898 all_proxy=socks5://127.0.0.1:7898”

感觉你对代理地址好像存在误解。代理地址并不是指你手动设置的环境变量http_proxy。正确的代理地址是只你VPN启用的代理地址。你应该通过你使用的代理软件查看代理,或者查看网络适配器中的代理地址

image
image
目前是这样的。

@MyBaymax
Copy link
Author

@gua8a
哦,你npm run dev已经可以正常使用了。那么也就是说明你的修改是正确的,npx shopify hydrogen link 请求失败,那就说明其没有走代理,其运行的请求方法并非上述位置。我没去研究过这个,需要你自己研究下它的请求方法是哪个,然后给他配置代理。

@Guo8a
Copy link

Guo8a commented May 22, 2024

@gua8a 哦,你npm run dev已经可以正常使用了。那么也就是说明你的修改是正确的,npx shopify hydrogen link 请求失败,那就说明其没有走代理,其运行的请求方法并非上述位置。我没去研究过这个,需要你自己研究下它的请求方法是哪个,然后给他配置代理。

十分百分千分万分感谢您的耐心指导。
示例项目( hydrogen-quickstart )在我npm run dev的时候全部配置应该都是默认的,没有进行网络请求,所以运行才不会报错。
我猜测,然后到 npx shopify hydrogen link的时候,同样会进入 cli 的 fetch 方法,所以才会有 TLS 的报错。

再次感谢大佬,可否再留个联系方式交流下问题,不胜感激。

@MyBaymax
Copy link
Author

@gua8a 哦,你npm run dev已经可以正常使用了。那么也就是说明你的修改是正确的,npx shopify hydrogen link 请求失败,那就说明其没有走代理,其运行的请求方法并非上述位置。我没去研究过这个,需要你自己研究下它的请求方法是哪个,然后给他配置代理。

十分百分千分万分感谢您的耐心指导。 示例项目( hydrogen-quickstart )在我npm run dev的时候全部配置应该都是默认的,没有进行网络请求,所以运行才不会报错。 我猜测,然后到 npx shopify hydrogen link的时候,同样会进入 cli 的 fetch 方法,所以才会有 TLS 的报错。

再次感谢大佬,可否再留个联系方式交流下问题,不胜感激。

微信 abc939039210

@senher
Copy link

senher commented Jun 1, 2024

我这出现奇怪的问题
在 node_modules@shopify\cli 下,npm i https-proxy-agent安装的时候报错了
image

@zqian7531
Copy link

我通过brew 安装的shopify-cli 3.60.1,它的目录结构似乎发生了变化,不再有http.ts文件,而是需要修改/usr/local/Cellar/shopify-cli/3.60.1/libexec/lib/node_modules/@shopify/cli/dist/chunk-BKLNHG3A.js(具体目录依据安装路径和安装版本)。

  1. 在/usr/local/Cellar/shopify-cli/3.60.1/libexec/lib/node_modules/@shopify/cli下 执行 npm install https-proxy-agent
  2. 在chunk-BKLNHG3A.js中,
  • 引入 import { HttpsProxyAgent } from "https-proxy-agent";
  • 修改fetch2 和 shopifyFetch

@narutopden
Copy link

Hi, I am also a Shopify-cli user based in china I haven't set up any proxy and am facing this problem. can any one tell me how to set up the proxy?

@yeonlala
Copy link

Hi, I am also a Shopify-cli user based in china I haven't set up any proxy and am facing this problem. can any one tell me how to set up the proxy?你好,我也是一名位于中国的 Shopify-cli 用户,我没有设置任何代理,但遇到了这个问题。谁能告诉我如何设置代理?

其实就是设置个全局代理即可。无需改任何代码

@feifeirun97
Copy link

我通过brew 安装的shopify-cli 3.63.2,已经没有httpjs文件了。

@feifeirun97
Copy link

Hi, I am also a Shopify-cli user based in china I haven't set up any proxy and am facing this problem. can any one tell me how to set up the proxy?你好,我也是一名位于中国的 Shopify-cli 用户,我没有设置任何代理,但遇到了这个问题。谁能告诉我如何设置代理?

其实就是设置个全局代理即可。无需改任何代码

老哥指导下怎么操作?

@ListKerHe
Copy link

@gua8a 哦,你npm run dev已经可以正常使用了。那么也就是说明你的修改是正确的,npx shopify hydrogen link 请求失败,那就说明其没有走代理,其运行的请求方法并非上述位置。我没去研究过这个,需要你自己研究下它的请求方法是哪个,然后给他配置代理。

十分百分千分万分感谢您的耐心指导。 示例项目( hydrogen-quickstart )在我npm run dev的时候全部配置应该都是默认的,没有进行网络请求,所以运行才不会报错。 我猜测,然后到 npx shopify hydrogen link的时候,同样会进入 cli 的 fetch 方法,所以才会有 TLS 的报错。

再次感谢大佬,可否再留个联系方式交流下问题,不胜感激。

@Guo8a 哥我遇到的是和你一样的问题,哥你是怎么解决的呀,我也是能run dev,但是npx shopify hydrogen link报错了,我想咨询下怎么去解决

@ListKerHe
Copy link

奇怪

你这问题咋解决的哥

@Zardw
Copy link

Zardw commented Sep 26, 2024

用VPN

@omgcx1222
Copy link

@MyBaymax , @Shenr1 do a temporarily resolve plan, make these change :
in your global npm/yarn/pnpm package directory, find the package path: node_modules/@shopify/cli-kit/dist/public/node/http.js
then:
export async function fetch(url, init) { console.log('termial proxy') const proxy_url = process.env.HTTP_PROXY || process.env.HTTPS_PROXY; const agent = new HttpsProxyAgent(proxy_url) return runWithTimer('cmd_all_timing_network_ms')(() => debugLogResponseInfo({ url: url.toString(), request: nodeFetch(url, { ...init, agent }) })); }
before add agent to node-fetch, please make sure install https-proxy-agent package global installed, have fun day!

非常感谢 @forwells 提供的方案 🙏。我使用@forwells提供的方案后,已可以正常使用Shopify-cli。 我将关闭该问题。期待 Shopify 团队提供 proxy 配置选项。

Thank you very much for the solution provided by @forwells 🙏. After using the solution provided by @forwells, I can now use Shopify cli normally. I will close this issue. Looking forward to the Shopify team providing proxy configuration options. 🎉

你好,我现在也遇到了这个问题,同样的install了https-proxy-agent,修改了
export async function fetch(url, init) {
console.log(111);
const proxy_url = "http://127.0.0.1:7890"
const agent = new HttpsProxyAgent(proxy_url)
return runWithTimer('cmd_all_timing_network_ms')(() => debugLogResponseInfo({ url: url.toString(), request: nodeFetch(url, {...init, agent}) }));
}
执行shopify theme dev --store hqy-infant,提示:
request to https://hqy-infant.myshopify.com/admin/api/unstable/themes.json failed, reason: read ECONNRESET
并没有 console.log 输出 111

但是修改之前提示的是reason: Client network socket disconnected before secure TLS connection was established

我该如何解决?

@panjiangyi
Copy link

为何我没有@shopify/cli-kit/这个包?

Why don't I have this package @shopify/cli-kit/?

@lykuan
Copy link

lykuan commented Nov 15, 2024

@panjiangyi 你解决了吗

@lykuan
Copy link

lykuan commented Nov 15, 2024

@

@MyBaymax , @Shenr1 do a temporarily resolve plan, make these change :
in your global npm/yarn/pnpm package directory, find the package path: node_modules/@shopify/cli-kit/dist/public/node/http.js
then:
export async function fetch(url, init) { console.log('termial proxy') const proxy_url = process.env.HTTP_PROXY || process.env.HTTPS_PROXY; const agent = new HttpsProxyAgent(proxy_url) return runWithTimer('cmd_all_timing_network_ms')(() => debugLogResponseInfo({ url: url.toString(), request: nodeFetch(url, { ...init, agent }) })); }
before add agent to node-fetch, please make sure install https-proxy-agent package global installed, have fun day!

非常感谢 @forwells 提供的方案 🙏。我使用@forwells提供的方案后,已可以正常使用Shopify-cli。 我将关闭该问题。期待 Shopify 团队提供 proxy 配置选项。
Thank you very much for the solution provided by @forwells 🙏. After using the solution provided by @forwells, I can now use Shopify cli normally. I will close this issue. Looking forward to the Shopify team providing proxy configuration options. 🎉

你好,我现在也遇到了这个问题,同样的install了https-proxy-agent,修改了 export async function fetch(url, init) { console.log(111); const proxy_url = "http://127.0.0.1:7890" const agent = new HttpsProxyAgent(proxy_url) return runWithTimer('cmd_all_timing_network_ms')(() => debugLogResponseInfo({ url: url.toString(), request: nodeFetch(url, {...init, agent}) })); } 执行shopify theme dev --store hqy-infant,提示: request to https://hqy-infant.myshopify.com/admin/api/unstable/themes.json failed, reason: read ECONNRESET 并没有 console.log 输出 111

但是修改之前提示的是reason: Client network socket disconnected before secure TLS connection was established

我该如何解决?

解决了吗

@JohnNiang
Copy link

We can try to use proxychains-ng to make Shopify CLI proxiable in Linux development environment. After configuring proxychains, just execute command proxychains -q shopify ....

https://github.com/rofl0r/proxychains-ng

@b0dea
Copy link

b0dea commented Dec 10, 2024

Hello,

I am starting to face the same issues—this time related to almost an admin rest API call we are doing.

I use the Shopify admin API plugin with node-fetch as the fetch source - on my node server.

Could you please tell me how to fix it? Should I use a proxy with node-fetch? This is happening while the app is deployed, and strangely, it never happened until the end of last week.

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 // we get an error from the library here so we have to pass the fetch module
        });

Errors example:

cc @JohnNiang @zqian7531 etc

@MyBaymax
Copy link
Author

Hello,

I am starting to face the same issues—this time related to almost an admin rest API call we are doing.

I use the Shopify admin API plugin with node-fetch as the fetch source - on my node server.

Could you please tell me how to fix it? Should I use a proxy with node-fetch? This is happening while the app is deployed, and strangely, it never happened until the end of last week.

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 // we get an error from the library here so we have to pass the fetch module
});
Errors example:

cc @JohnNiang @zqian7531 etc

可以给 fetch 方法添加个代理,即可解决

@b0dea
Copy link

b0dea commented Dec 10, 2024

Hello,
I am starting to face the same issues—this time related to almost an admin rest API call we are doing.
I use the Shopify admin API plugin with node-fetch as the fetch source - on my node server.
Could you please tell me how to fix it? Should I use a proxy with node-fetch? This is happening while the app is deployed, and strangely, it never happened until the end of last week.
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 // we get an error from the library here so we have to pass the fetch module
});
Errors example:

cc @JohnNiang @zqian7531 etc

You can add a proxy to the fetch method to solve this problem.

Hello, thank you for this. Can you please guide me with an example? Where is the best place to get a proxy URL/IP that can be deployed, since we are using AWS? Thank you

@MyBaymax
Copy link
Author

Hello,
I am starting to face the same issues—this time related to almost an admin rest API call we are doing.
I use the Shopify admin API plugin with node-fetch as the fetch source - on my node server.
Could you please tell me how to fix it? Should I use a proxy with node-fetch? This is happening while the app is deployed, and strangely, it never happened until the end of last week.
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 // we get an error from the library here so we have to pass the fetch module
});
Errors example:

cc @JohnNiang @zqian7531 etc

You can add a proxy to the fetch method to solve this problem.

Hello, thank you for this. Can you please guide me with an example? Where is the best place to get a proxy URL/IP that can be deployed, since we are using AWS? Thank you

const { HttpsProxyAgent } = require("https-proxy-agent");
const fetch = require("node-fetch");

const agent = new HttpsProxyAgent("http://127.0.0.1:10010");
this.shopify = createAdminRestApiClient({
  storeDomain: process.env.SHOPIFY_URL,
  apiVersion: "2024-10",
  accessToken: process.env.SHOPIFY_ADMIN_API_TOKEN,
  customFetchApi: (url, options) =>
    fetch(url, {
      ...options,
      agent,
    }),
});

@b0dea
Copy link

b0dea commented Dec 12, 2024

Hello,
I am starting to face the same issues—this time related to almost an admin rest API call we are doing.
I use the Shopify admin API plugin with node-fetch as the fetch source - on my node server.
Could you please tell me how to fix it? Should I use a proxy with node-fetch? This is happening while the app is deployed, and strangely, it never happened until the end of last week.
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 // we get an error from the library here so we have to pass the fetch module
});
Errors example:

cc @JohnNiang @zqian7531 etc

You can add a proxy to the fetch method to solve this problem.

Hello, thank you for this. Can you please guide me with an example? Where is the best place to get a proxy URL/IP that can be deployed, since we are using AWS? Thank you

Hi.

Tried this and TLS issue still happening. Might it be something on Shopify's side as an issue?

The only way I've get down those issues (but socket hang up ones still happen) is by using rejectUnauthorized param.

I posted an issue here with Shopify - still no response - Shopify/shopify-app-js#1851

Any other ideas, please? Thank you

@MyBaymax
Copy link
Author

MyBaymax commented Dec 12, 2024 via email

@b0dea
Copy link

b0dea commented Dec 12, 2024

Have you replaced the proxy address with your own von proxy?

---Original--- From: @.> Date: Thu, Dec 12, 2024 14:41 PM To: @.>; Cc: @.@.>; Subject: Re: [Shopify/cli] [Bug]: Execute Shopify theme dev with errormessage: request to xxx.theme.json?xxx processing failed, reason: readETIMEDOUT (Issue #3225) Hello, I am starting to face the same issues—this time related to almost an admin rest API call we are doing. I use the Shopify admin API plugin with node-fetch as the fetch source - on my node server. Could you please tell me how to fix it? Should I use a proxy with node-fetch? This is happening while the app is deployed, and strangely, it never happened until the end of last week. 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 // we get an error from the library here so we have to pass the fetch module }); Errors example: 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 cc @JohnNiang @zqian7531 etc You can add a proxy to the fetch method to solve this problem. Hello, thank you for this. Can you please guide me with an example? Where is the best place to get a proxy URL/IP that can be deployed, since we are using AWS? Thank you Hi. Tried this and TLS issue still happening. Might it be something on Shopify's side as an issue? The only way I've get down those issues (but socket hang up ones still happen) is by using rejectUnauthorized param. I posted an issue here with Shopify - still no response - Shopify/shopify-app-js#1851 Any other ideas, please? Thank you — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Yes, created one via aws

@MyBaymax
Copy link
Author

MyBaymax commented Dec 12, 2024 via email

@b0dea
Copy link

b0dea commented Dec 12, 2024

Shopify's request will not go through the VPN proxy, so this code allows it to go through the VPN proxy

---Original--- From: @.> Date: Thu, Dec 12, 2024 16:01 PM To: @.>; Cc: @.@.>; Subject: Re: [Shopify/cli] [Bug]: Execute Shopify theme dev with errormessage: request to xxx.theme.json?xxx processing failed, reason: readETIMEDOUT (Issue #3225) Have you replaced the proxy address with your own von proxy? … ---Original--- From: @.> Date: Thu, Dec 12, 2024 14:41 PM To: @.>; Cc: @.@.>; Subject: Re: [Shopify/cli] [Bug]: Execute Shopify theme dev with errormessage: request to xxx.theme.json?xxx processing failed, reason: readETIMEDOUT (Issue #3225) Hello, I am starting to face the same issues—this time related to almost an admin rest API call we are doing. I use the Shopify admin API plugin with node-fetch as the fetch source - on my node server. Could you please tell me how to fix it? Should I use a proxy with node-fetch? This is happening while the app is deployed, and strangely, it never happened until the end of last week. 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 // we get an error from the library here so we have to pass the fetch module }); Errors example: 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 cc @JohnNiang @zqian7531 etc You can add a proxy to the fetch method to solve this problem. Hello, thank you for this. Can you please guide me with an example? Where is the best place to get a proxy URL/IP that can be deployed, since we are using AWS? Thank you Hi. Tried this and TLS issue still happening. Might it be something on Shopify's side as an issue? The only way I've get down those issues (but socket hang up ones still happen) is by using rejectUnauthorized param. I posted an issue here with Shopify - still no response - Shopify/shopify-app-js#1851 Any other ideas, please? Thank you — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> Yes, created one via aws — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.>

Sorry, what do you mean?
I have created my own proxy address, used it as per your code shared and it didn't work - as in the request went through but still TLS issues.
Currently only using rejectUnauthorized: false solves the TLS issue (in an unsecured way), but does not solve the socket hang up issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests