Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
436 stars 128 forks source link

[Bug]: shopify theme dev error: reason: connect ETIMEDOUT 185.146.173.20:443 #2234

Closed yeziyue closed 1 year ago

yeziyue commented 1 year ago

Please confirm that you have:

In which of these areas are you experiencing a problem?

Theme

Expected behavior

After logging in, i can develop on localhost

Actual behavior

request to https://accounts.shopify.com/oauth/token?grant_type=authorizati │ │ on_code&code=S3ZsTUZjVzhDSjNrV3JOMWRUbHNzUjEyNVF0V3hVUXVLNk1ua0VwOVFJTThvO │ │ CtOcUZOK3hoNktHQmFoTE9VNC9Nc29ocmladmVrWkJQUWhlZXpwZkIvclFzU3ErUTB5bWQ2N3o │ │ wem9GN2U0bkJxbkdFVW5wem10Z2FWK3YxRGFWRmJCS3N3MEZrZzYzYmY4YWM1WEl4K3lrL0FwS │ │ mQwMkREbzAyeUc4aU9KcHpjVG5mblF0NG10VzVIV2hESitlSjhrcCtITlZwL0w3aXFiOUFjN0N │ │ IVnJFRk5PQkhsa1dCcnpGL2VFUGhKdEg0aDh4eWFuTWlWeUcyejNjU1lRbTBhcGhFNjF1V1FGV │ │ jlaMXU0MnJwbC9nNmp1c3Fna1NaaUdScW1KMGtMZTdsaTYrbVlVZ05vcjBKU3BaN28vTHg3RWV │ │ QUHNyei0tZGk1U2szUXUwZEVWZ3BQcS0tWUdNVVpRbjBaRTl5cWlNdHJYOGRrUT09&redirect │ │ _uri=http%3A%2F%2F127.0.0.1%3A3456&client_id=fbdb2649-e327-4907-8f67-908d2 │ │ 4cfd7e3&code_verifier=8xGy6S_DTsetmuik8L6KBGBQEL_EMB55Ea5pT9vuKlk failed, │ │ reason: connect ETIMEDOUT 185.146.173.20:443

Verbose output

npm verb cli D:\Program Files\nodejs\node.exe d:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
npm info using npm@9.7.2
npm info using node@v16.20.1
npm verb title npm
npm verb argv "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:C:\Users\86187\AppData\Local\npm-cache\_logs\2023-06-26T01_59_06_167Z-
npm verb logfile C:\Users\86187\AppData\Local\npm-cache\_logs\2023-06-26T01_59_06_167Z-debug-0.log
npm <command>

Usage:

npm install        install all the dependencies in your project
npm install <foo>  add the <foo> dependency to your project
npm test           run this project's tests
npm run <foo>      run the script named <foo>
npm <command> -h   quick help on <command>
npm -l             display usage info for all commands
npm help <term>    search for help on <term> (in a browser)
npm help npm       more involved overview (in a browser)

All commands:

    access, adduser, audit, bugs, cache, ci, completion,
    config, dedupe, deprecate, diff, dist-tag, docs, doctor,
    edit, exec, explain, explore, find-dupes, fund, get, help,
    help-search, hook, init, install, install-ci-test,
    install-test, link, ll, login, logout, ls, org, outdated,
    owner, pack, ping, pkg, prefix, profile, prune, publish,
    query, rebuild, repo, restart, root, run-script, search,
    set, shrinkwrap, star, stars, start, stop, team, test,
    token, uninstall, unpublish, unstar, update, version, view,
    whoami

Specify configs in the ini-formatted file:
    C:\Users\86187\.npmrc
or on the command line via: npm <command> --key=value

More configuration info: npm help config
Configuration fields: npm help 7 config

npm@9.7.2 d:\nvm\v16.20.1\node_modules\npm
npm verb exit 1
npm verb code 1

Reproduction steps

1.shopify theme dev 2.Press any key to open the login page on your browser 3.request to https://accounts.shopify.com/oauth/token?grant_type=authorizati │ │ on_code&code=S3ZsTUZjVzhDSjNrV3JOMWRUbHNzUjEyNVF0V3hVUXVLNk1ua0VwOVFJTThvO │ │ CtOcUZOK3hoNktHQmFoTE9VNC9Nc29ocmladmVrWkJQUWhlZXpwZkIvclFzU3ErUTB5bWQ2N3o │ │ wem9GN2U0bkJxbkdFVW5wem10Z2FWK3YxRGFWRmJCS3N3MEZrZzYzYmY4YWM1WEl4K3lrL0FwS │ │ mQwMkREbzAyeUc4aU9KcHpjVG5mblF0NG10VzVIV2hESitlSjhrcCtITlZwL0w3aXFiOUFjN0N │ │ IVnJFRk5PQkhsa1dCcnpGL2VFUGhKdEg0aDh4eWFuTWlWeUcyejNjU1lRbTBhcGhFNjF1V1FGV │ │ jlaMXU0MnJwbC9nNmp1c3Fna1NaaUdScW1KMGtMZTdsaTYrbVlVZ05vcjBKU3BaN28vTHg3RWV │ │ QUHNyei0tZGk1U2szUXUwZEVWZ3BQcS0tWUdNVVpRbjBaRTl5cWlNdHJYOGRrUT09&redirect │ │ _uri=http%3A%2F%2F127.0.0.1%3A3456&client_id=fbdb2649-e327-4907-8f67-908d2 │ │ 4cfd7e3&code_verifier=8xGy6S_DTsetmuik8L6KBGBQEL_EMB55Ea5pT9vuKlk failed, │ │ reason: connect ETIMEDOUT 185.146.173.20:443

Operating System

windows 11

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

3.46.5

Shell

No response

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

v16.20.1

What language and version are you using in your application?

Ruby version 3.2.2

MyBaymax commented 1 year ago

我今天也遇到与你相同的问题,我尝试使用 Proxifer 解决(以前也遇到过网络问题,通过Proxifer可以解决),但是这一次失败了。我尝试使用不同网络(使用手机热点)发现问题就解决了。我不懂Shopify网络安全策略,真是诡异

hj-nicholas commented 1 year ago

是的,昨天遇到的这个问题,尝试切换其他代理,也没能解决

yeziyue commented 1 year ago

我已经两天了,都报这个错?现在还没解决,用vpn了是不是就不用Proxifer来解决了?

yeziyue commented 1 year ago

我今天也遇到与你相同的问题,我尝试使用 Proxifer 解决(以前也遇到过网络问题,通过Proxifer可以解决),但是这一次失败了。我尝试使用不同网络(使用手机热点)发现问题就解决了。我不懂Shopify网络安全策略,真是诡异

我已经两天了,都报这个错?现在还没解决,用vpn了还是有问题?

yeziyue commented 1 year ago

是的,昨天遇到的这个问题,尝试切换其他代理,也没能解决

你的现在好了吗?我的还没有好

yeziyue commented 1 year ago

络(使用手机热点)发现问题就解决了。我不懂Shopify网络安全策略,

我用手机热点试了,也不行,我已经遇到两次这种情况了,shopify也不给解决

MyBaymax commented 1 year ago

我今天用公司网络也没问题了。使用 Proxifer 是需要开VPN的,要将代理指向VPN。等Shopify解决是不知道要到什么时候的,要是实在没办法,可以用themekit的开发方式

yeziyue commented 1 year ago

Proxifer

我今天用公司网络也没问题了。使用 Proxifer 是需要开VPN的,要将代理指向VPN。等Shopify解决是不知道要到什么时候的,要是实在没办法,可以用themekit的开发方式

好的,那我研究一下,实在没办法了

MyBaymax commented 1 year ago

哈,你还是不行吗😂,Shopify Cli 确实要好用的多。加油吧

yeziyue commented 1 year ago

哈,你还是不行吗😂,Shopify Cli 确实要好用的多。加油吧

还不行,已经三天了,你node 和shopify cli分别用的哪个版本呢?

MyBaymax commented 1 year ago

baymax@chouyaofandedeMacBook-Pro ~ % node -v v18.14.1 baymax@chouyaofandedeMacBook-Pro ~ % shopify version Current Shopify CLI version: 3.46.5 这个跟版本没关系吧

yeziyue commented 1 year ago

baymax@chouyaofandedeMacBook-Pro ~ % node -v v18.14.1 baymax@chouyaofandedeMacBook-Pro ~ % shopify version Current Shopify CLI version: 3.46.5 这个跟版本没关系吧

我试一下,实在没办法了,都3天了

yeziyue commented 1 year ago

baymax@chouyaofandedeMacBook-Pro ~ % node -v v18.14.1 baymax@chouyaofandedeMacBook-Pro ~ % shopify version Current Shopify CLI version: 3.46.5 这个跟版本没关系吧

hello,还有其他解决办法吗?我的还没好,themekit 的这种方式也试了,也是连接不上,我都晕了,坏了整整一周

isaacroldan commented 1 year ago

Hi everyone! I think I know what the issue is here, but took me some google translate to understand all the messages 🙏

The default authentication process doesn't work if you are using a container or any other technology that prevents accessing localhost for a callback.

To fix this you need to use an alternative authentication method by setting this env variable: SHOPIFY_CLI_DEVICE_AUTH=1

Example for unix systems:

SHOPIFY_CLI_DEVICE_AUTH=1 shopify theme dev

For windows it depends on which shell you are using, but the solution is to set that environment variable.

Let me know if this helps

MyBaymax commented 1 year ago

@yeziyue themekit 应该是没问题的,可以加下微信,我帮你看看 abc939039210。或者你试下 @isaacroldan 的方法是否可以解决。目前我在任何网络下访问都是没有问题的

yeziyue commented 1 year ago

@yeziyue themekit 应该是没问题的,可以加下微信,我帮你看看 abc939039210。或者你试下 @isaacroldan 的方法是否可以解决。目前我在任何网络下访问都是没有问题的

谢谢了,换了vpn 好了,现在所有vpn都好了,我也搞不清楚,到底是啥影响的,

yeziyue commented 1 year ago

Hi everyone! I think I know what the issue is here, but took me some google translate to understand all the messages 🙏

The default authentication process doesn't work if you are using a container or any other technology that prevents accessing localhost for a callback.

To fix this you need to use an alternative authentication method by setting this env variable: SHOPIFY_CLI_DEVICE_AUTH=1

Example for unix systems:

SHOPIFY_CLI_DEVICE_AUTH=1 shopify theme dev

For windows it depends on which shell you are using, but the solution is to set that environment variable.

Let me know if this helps

thanks ,has worked by change vpn

jeffey3 commented 1 year ago

Hi everyone! I think I know what the issue is here, but took me some google translate to understand all the messages 🙏 The default authentication process doesn't work if you are using a container or any other technology that prevents accessing localhost for a callback. To fix this you need to use an alternative authentication method by setting this env variable: SHOPIFY_CLI_DEVICE_AUTH=1 Example for unix systems:

SHOPIFY_CLI_DEVICE_AUTH=1 shopify theme dev

For windows it depends on which shell you are using, but the solution is to set that environment variable. Let me know if this helps

thanks ,has worked by change vpn

你用的什么VPN呀?我用Clash,试了2个代理的订阅,都不行。

315346344 commented 1 year ago

大家好!我想我知道问题出在哪里,但我用谷歌翻译来理解所有消息🙏 如果您使用容器或任何其他阻止访问本地主机进行回调的技术,则默认身份验证过程将不起作用。 要解决此问题,您需要通过设置此环境变量来使用替代身份验证方法:SHOPIFY_CLI_DEVICE_AUTH=1 unix 系统示例:

SHOPIFY_CLI_DEVICE_AUTH=1 shopify theme dev

对于 Windows,这取决于您使用的 shell,但解决方案是设置该环境变量。 让我知道这是否有帮助

谢谢,已经通过更改VPN工作了

你用的什么VPN呀?我用Clash,试了2个代理的订阅,都不行。

同问,试了其他的也不行,可以推荐一下你目前在用的吗

yeziyue commented 1 year ago

Hi everyone! I think I know what the issue is here, but took me some google translate to understand all the messages 🙏 The default authentication process doesn't work if you are using a container or any other technology that prevents accessing localhost for a callback. To fix this you need to use an alternative authentication method by setting this env variable: SHOPIFY_CLI_DEVICE_AUTH=1 Example for unix systems:

SHOPIFY_CLI_DEVICE_AUTH=1 shopify theme dev

For windows it depends on which shell you are using, but the solution is to set that environment variable. Let me know if this helps

thanks ,has worked by change vpn

你用的什么VPN呀?我用Clash,试了2个代理的订阅,都不行。

找个有加拿大节点的vpn,我之前就是那样好的,

yeziyue commented 1 year ago

大家好!我想我知道问题出在哪里,但我用谷歌翻译来理解所有消息🙏 如果您使用容器或任何其他阻止访问本地主机进行回调的技术,则默认身份验证过程将不起作用。 要解决此问题,您需要通过设置此环境变量来使用替代身份验证方法:SHOPIFY_CLI_DEVICE_AUTH=1 unix 系统示例:

SHOPIFY_CLI_DEVICE_AUTH=1 shopify theme dev

对于 Windows,这取决于您使用的 shell,但解决方案是设置该环境变量。 让我知道这是否有帮助

谢谢,已经通过更改VPN工作了

你用的什么VPN呀?我用Clash,试了2个代理的订阅,都不行。

同问,试了其他的也不行,可以推荐一下你目前在用的吗

找个有加拿大节点的vpn,我之前就是那样好的,

crstudio commented 1 year ago

我昨天和今天一直也是这种情况,下午将clash的TUN模式打开,不过在打开这个模式之前,必须安装 service mode。然后切换到US结点,终于把这步过去了。

hj-nicholas commented 1 year ago

我昨天和今天一直也是这种情况,下午将clash的TUN模式打开,不过在打开这个模式之前,必须安装 service mode。然后切换到US结点,终于把这步过去了。

感谢大佬,这种方式确实可行,看来是与vpn工具设置有关

sunboy130 commented 1 year ago

也遇到这种情况了,就是过不去! 头大!!!, 我是用的MonoCloud链接的美国的节点, 用啥VPN可行啊,急!!!

hj-nicholas commented 1 year ago

也遇到这种情况了,就是过不去! 头大!!!, 我是用的MonoCloud链接的美国的节点, 用啥VPN可行啊,急!!!

我也是使用的clash工具,开启系统全局代理模式,可以正常进行开发,有些工具可能是无法代理系统的全部请求,导致shopify登录验证无法正常通过。

sunboy130 commented 1 year ago

也遇到这种情况了,就是过不去! 头大!!!, 我是用的MonoCloud链接的美国的节点, 用啥VPN可行啊,急!!!

我也是使用的clash工具,开启系统全局代理模式,可以正常进行开发,有些工具可能是无法代理系统的全部请求,导致shopify登录验证无法正常通过。

大佬是全职做Shopify开发么, 可以留个联系方式么, 微 sunboy130

sunboy130 commented 1 year ago

我昨天和今天一直也是这种情况,下午将clash的TUN模式打开,不过在打开这个模式之前,必须安装 service mode。然后切换到US结点,终于把这步过去了。

用这种方法过去了!!! 感谢!!!!!

LYM-x commented 6 months ago

大家好!我想我知道问题出在哪里,但我用谷歌翻译来理解所有消息🙏 如果您使用容器或任何其他阻止访问本地主机进行回调的技术,则默认身份验证过程将不起作用。 要解决此问题,您需要通过设置此环境变量来使用替代身份验证方法:SHOPIFY_CLI_DEVICE_AUTH=1 unix 系统示例:

SHOPIFY_CLI_DEVICE_AUTH=1 shopify theme dev

对于 Windows,这取决于您使用的 shell,但解决方案是设置该环境变量。 让我知道这是否有帮助

谢谢,已经通过更改VPN工作了

你用的什么VPN呀?我用Clash,试了2个代理的订阅,都不行。

同问,试了其他的也不行,可以推荐一下你目前在用的吗

找个有加拿大节点的vpn,我之前就是那样好的,

我用的99Cloud加速器,打开虚拟网卡设置就一切正常了,之前也一直timeout

hspjxm commented 6 months ago

Hi everyone! I think I know what the issue is here, but took me some google translate to understand all the messages 🙏

The default authentication process doesn't work if you are using a container or any other technology that prevents accessing localhost for a callback.

To fix this you need to use an alternative authentication method by setting this env variable: SHOPIFY_CLI_DEVICE_AUTH=1

Example for unix systems:

SHOPIFY_CLI_DEVICE_AUTH=1 shopify theme dev

For windows it depends on which shell you are using, but the solution is to set that environment variable.

Let me know if this helps

这个我也尝试了 但是 会报错error ──────────────────────────────────────────────────────────────────────╮ │ │ │ request to https://accounts.shopify.com/oauth/device_authorization failed, │ │ reason: connect ETIMEDOUT 185.146.173.20:443 │

sunboy130 commented 6 months ago

you should change the vpn,today one person has the same problem and he fixed by change the VPN

---- Replied Message ---- | From | @.> | | Date | 05/10/2024 22:11 | | To | Shopify/cli @.> | | Cc | sunboy130 @.>, Comment @.> | | Subject | Re: [Shopify/cli] [Bug]: shopify theme dev error: reason: connect ETIMEDOUT 185.146.173.20:443 (Issue #2234) |

Hi everyone! I think I know what the issue is here, but took me some google translate to understand all the messages 🙏

The default authentication process doesn't work if you are using a container or any other technology that prevents accessing localhost for a callback.

To fix this you need to use an alternative authentication method by setting this env variable: SHOPIFY_CLI_DEVICE_AUTH=1

Example for unix systems:

SHOPIFY_CLI_DEVICE_AUTH=1 shopify theme dev

For windows it depends on which shell you are using, but the solution is to set that environment variable.

Let me know if this helps

这个我也尝试了 但是 会报错error ──────────────────────────────────────────────────────────────────────╮ │ │ │ request to https://accounts.shopify.com/oauth/device_authorization failed, │ │ reason: connect ETIMEDOUT 185.146.173.20:443 │

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

MyBaymax commented 6 months ago

解决方案就是设置好代理,具体怎么设置可以看 #3225

Kaniwong commented 5 months ago

我昨天和今天一直也是这种情况,下午将clash的TUN模式打开,不过在打开这个模式之前,必须安装 service mode。然后切换到US结点,终于把这步过去了。

感谢分享,我打开 TUN 模式和切换到 US 节点就好了🙏