Skip to content

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

Closed

Description

@MyBaymax

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

Activity

  1. added
    Type: Bug
    on Jan 5, 2024
  2. added
    Area: @shopify/theme
    on Jan 5, 2024
  3. forwells commented on Jan 6, 2024

    @forwells

    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.

  4. MyBaymax commented on Jan 7, 2024

    @MyBaymax
    Author

    感谢您的帮忙。您太棒了!👍
    的确,无法使用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?

  5. NickOpen commented on Jan 7, 2024

    @NickOpen

    @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.

  6. MyBaymax commented on Jan 8, 2024

    @MyBaymax
    Author

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

  7. Shenr1 commented on Jan 8, 2024

    @Shenr1

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

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

  8. forwells commented on Jan 8, 2024

    @forwells

    @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!

  9. NickOpen commented on Jan 8, 2024

    @NickOpen

    @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.

  10. MyBaymax commented on Jan 8, 2024

    @MyBaymax
    Author

    @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. 🎉

  11. Shenr1 commented on Jan 9, 2024

    @Shenr1
  12. cczdnb commented on Jan 9, 2024

    @cczdnb

    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?

  13. MyBaymax commented on Jan 9, 2024

    @MyBaymax
    Author

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

  14. cczdnb commented on Jan 9, 2024

    @cczdnb

    ╭─ 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
    
  15. 63 remaining items

  16. Zardw commented on Sep 26, 2024

    @Zardw

    用VPN

  17. omgcx1222 commented on Oct 15, 2024

    @omgcx1222

    @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

    我该如何解决?

  18. panjiangyi commented on Nov 4, 2024

    @panjiangyi

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

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

  19. Kklyee commented on Nov 15, 2024

    @Kklyee

    @panjiangyi 你解决了吗

  20. Kklyee commented on Nov 15, 2024

    @Kklyee

    @

    @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

    我该如何解决?

    解决了吗

  21. JohnNiang commented on Nov 22, 2024

    @JohnNiang

    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

  22. b0dea commented on Dec 10, 2024

    @b0dea

    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

  23. MyBaymax commented on Dec 10, 2024

    @MyBaymax
    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 方法添加个代理,即可解决

  24. b0dea commented on Dec 10, 2024

    @b0dea

    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

  25. MyBaymax commented on Dec 10, 2024

    @MyBaymax
    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,
        }),
    });
  26. b0dea commented on Dec 12, 2024

    @b0dea

    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

  27. MyBaymax commented on Dec 12, 2024

    @MyBaymax
    Author
  28. b0dea commented on Dec 12, 2024

    @b0dea

    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

  29. MyBaymax commented on Dec 12, 2024

    @MyBaymax
    Author
  30. b0dea commented on Dec 12, 2024

    @b0dea

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: @shopify/themeType: Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions