-
Notifications
You must be signed in to change notification settings - Fork 141
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
Comments
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 ----------------------------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. |
感谢您的帮忙。您太棒了!👍 Thank you for your help. You're amazing!👍 |
@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. |
@NickOpen 你的Shopify-cli可以正常工作了吗?是的话,可以跟我分享下你的 http_proxy or https_proxy 是怎么设置的吗?我不知道怎么通过设置这个解决问题。感谢🙏 |
遇到了同样的问题,有解决方案了吗 |
@MyBaymax , @Shenr1 do a temporarily resolve plan, make these change : in your global npm/yarn/pnpm package directory, find the package path: then: export async function fetch(url, init) { before add agent to node-fetch, please make sure install |
非常感谢 @forwells 提供的方案 🙏。我使用@forwells提供的方案后,已可以正常使用Shopify-cli。 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 carefully followed the instructions you provided and added the necessary code to the specified files. However, despite these modifications, the error continues to persist.
To provide you with more details, I have attached the modified versions of the following files:
***@***.******@***.***\cli-kit\dist\public\node\http.js
***@***.******@***.***\cli-kit\dist\public\node\http.js
Please review the changes I made and let me know if there is anything else I can try to resolve this issue. Your assistance is greatly appreciated.
李泽明
***@***.***
…------------------ 原始邮件 ------------------
发件人: "Shopify/cli" ***@***.***>;
发送时间: 2024年1月8日(星期一) 晚上9:45
***@***.***>;
***@***.******@***.***>;
主题: Re: [Shopify/cli] [Bug]: Execute Shopify theme dev with error message: request to xxx.theme.json?xxx processing failed, reason: read ETIMEDOUT (Issue #3225)
@MyBaymax , @Shenr1 do a temporarily resolve plan, make these change :
in your global npm/yarn/pnpm package directory, find the package path:
***@***.***/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!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@Shenr1 @wantgoworld 可以发下你们终端输出的信息,以便确认错误原因 |
╭─ error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
@wantgoworld 如果你的终端没有打印 |
找到问题了。谢谢 |
I've changed the code in the right place
PS G:\Ryen\Theme\Atomstack v2_0> shopify theme dev -e dev
>>
╭─ info ─────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Using applicable flags from dev environment: │
│ │
│ • store: tinysextoys.myshopify.com │
│ • theme: 137206006010 │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────╯
termial proxy1
╭─ error ────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Cannot read properties of undefined (reading 'href') │
│ │
│ To investigate the issue, examine this stack trace: │
│ at new HttpsProxyAgent │
│ (Users/Admin/AppData/Roaming/npm/node_modules/https-proxy-agent/dist/index.js:55) │
│ at fetch ***@***.***/theme/node_modules │
│ ***@***.***/cli-kit/dist/public/node/http.js:40) │
│ at restRequest ***@***.***/theme/node_m │
│ ***@***.***/cli-kit/dist/public/node/api/admin.js:113) │
│ at ***@***.******@***.*** │
│ ify/cli-kit/dist/public/node/themes/themes-api.js:38) │
│ at performRequest ***@***.***/theme/nod │
│ ***@***.***/cli-kit/dist/private/node/themes/themes-api/throttler.js:7) │
│ at throttleByCounter ***@***.***/theme/ │
│ ***@***.***/cli-kit/dist/private/node/themes/themes-api/throttler.js:33) │
│ at throttleByHeader ***@***.***/theme/n │
│ ***@***.***/cli-kit/dist/private/node/themes/themes-api/throttler.js:19) │
│ at throttleByCounter ***@***.***/theme/ │
│ ***@***.***/cli-kit/dist/private/node/themes/themes-api/throttler.js:33) │
│ at ***@***.******@***.*** │
│ ify/cli-kit/dist/private/node/themes/themes-api/throttler.js:41) │
│ at new Promise │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Cannot read properties of undefined (reading 'href')
李泽明
***@***.***
…------------------ 原始邮件 ------------------
发件人: "Shopify/cli" ***@***.***>;
发送时间: 2024年1月9日(星期二) 中午12:26
***@***.***>;
***@***.******@***.***>;
主题: Re: [Shopify/cli] [Bug]: Execute Shopify theme dev with error message: request to xxx.theme.json?xxx processing failed, reason: read ETIMEDOUT (Issue #3225)
@wantgoworld 如果你的终端没有打印 termail proxy, 则说明你的在vscode中执行的 shopify-cli 并非你修改的 fetch 位置
找到问题了。谢谢
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@Shenr1 你这代码看了太难受了,可以处理下格式吗😣 |
@MyBaymax 按照上面的方案 去修改http.js的代码,可以获取到json文件,但是ssl失败了 |
我没有遇到这个问题 |
@MyBaymax |
是的,还需要导入 |
给大家写下具体步骤完整Shopify-cli代理设置步骤Step1: 确认文件位置例如我是使用 brew 安装的,可以通过 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: 进入
|
非常感谢,按以上具体方法问题已解决!! |
|
@gua8a |
十分百分千分万分感谢您的耐心指导。 再次感谢大佬,可否再留个联系方式交流下问题,不胜感激。 |
微信 abc939039210 |
我通过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(具体目录依据安装路径和安装版本)。
|
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? |
其实就是设置个全局代理即可。无需改任何代码 |
我通过brew 安装的shopify-cli 3.63.2,已经没有httpjs文件了。 |
老哥指导下怎么操作? |
@Guo8a 哥我遇到的是和你一样的问题,哥你是怎么解决的呀,我也是能run dev,但是npx shopify hydrogen link报错了,我想咨询下怎么去解决 |
你这问题咋解决的哥 |
用VPN |
你好,我现在也遇到了这个问题,同样的install了https-proxy-agent,修改了 但是修改之前提示的是reason: Client network socket disconnected before secure TLS connection was established 我该如何解决? |
为何我没有 Why don't I have this package |
@panjiangyi 你解决了吗 |
@
解决了吗 |
We can try to use |
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 方法添加个代理,即可解决 |
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,
}),
}); |
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 I posted an issue here with Shopify - still no response - Shopify/shopify-app-js#1851 Any other ideas, please? Thank you |
代理地址有替换成自己von的代理吗
…---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 |
Shopify的请求不会走vpn代理,所以通过这段代码让它走vpn代理
…---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? |
Please confirm that you have:
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
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
The text was updated successfully, but these errors were encountered: