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]: Get ETIMEDOUT when running npm run dev #2447

Closed
2 tasks done
jeffey3 opened this issue Jul 14, 2023 · 6 comments
Closed
2 tasks done

[Bug]: Get ETIMEDOUT when running npm run dev #2447

jeffey3 opened this issue Jul 14, 2023 · 6 comments
Labels
Type: Bug Something isn't working

Comments

@jeffey3
Copy link

jeffey3 commented Jul 14, 2023

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?

App

Expected behavior

Run 'npm run dev ' in Shopify App folder, CLI will redirect to Shopify Partner Login Page, then CLI will login successfully and let you review the local app.

Actual behavior

request to https://accounts.shopify.com/oauth/token?grant_type=authorization_code&code=MUt2a1JndzNUTDFVVFNOWDFpMkU4eGtpbFhxZFRsT25kM0pNelE
│ HR0Q255WDF5RmpFY05uYStqME1NTnNraEVzL1YvYXMrenIyUHVNSkJnNDdKQXJtc2hrOTZnRytrNGFTNWRvNmVTelNmN0hyWjFEWGxwOTBQdzdhL3l2MzRqOWk1TmlBYXhDUkhQL0N │
│ 6WUxYbk1talExbk9NWXZVdlZ0NmxRZ0pIZ0h3dHQrRGxOeStqOGdlMmRGdlhkTDJaWmlBUElBQmtZVmQ2MXdsZlNSNmx5cVN5NEI5T0FDS2twdkZ3PT0tLXBUS2F5RXZDcDVsalMwQ │
│ UYtLTZXU2dFczFZRmQwSkYrSWNWRTFPVWc9PQ&redirect_uri=http%3A%2F%2F127.0.0.1%3A3456&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&code_verif │
│ ier=sgykylHL6oyz38qB8mfwm683b2SfAju7PvobNTN-w4g failed, reason: connect ETIMEDOUT 185.146.173.20:443

Verbose output

npm run dev --loglevel verbose
npm verb cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
npm info using [email protected]
npm info using [email protected]
npm verb title npm run dev
npm verb argv "run" "dev" "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:C:\Users\Administrator\AppData\Local\npm-cache\_logs\2023-07-14T22_33_20_341Z-
npm verb logfile C:\Users\Administrator\AppData\Local\npm-cache\_logs\2023-07-14T22_33_20_341Z-debug-0.log

> [email protected] dev
> shopify app dev


To run this command, log in to Shopify Partners.
👉 Press any key to open the login page on your browser

Auto-open timed out. Open the login page: Log in to Shopify Partners ( http://accounts.shopify.com/oauth/authorize?client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&scope=openid+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+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&redirect_uri=http%3A%2F%2F127.0.0.1%3A3456&state=b551f8175d1afa96d9c78d8cfadad0ddc7ce8ee67c591383785d69045c14&response_type=code&code_challenge_method=S256&code_challenge=QjxInw2eoQy90ajrPesOwue8GIi6GdJj0b2rO8mfHxo )

╭─ error ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                              │
│  request to https://accounts.shopify.com/oauth/token?grant_type=authorization_code&code=MUt2a1JndzNUTDFVVFNOWDFpMkU4eGtpbFhxZFRsT25kM0pNelE  │
│  3V29PR1BFTG9ST3pxYW1nZEMxZCs0RWJveDJuTDJaUlcybGtqOXYwUmVHWEt0c0VNbEsyNEVid0tUQVlrQnBtRXVISkhEQ0pVZ2hjY2ZOK1BXTExiaGdxR1BsNWdRWG4ycHZMWGd0Z  │
│  HR0Q255WDF5RmpFY05uYStqME1NTnNraEVzL1YvYXMrenIyUHVNSkJnNDdKQXJtc2hrOTZnRytrNGFTNWRvNmVTelNmN0hyWjFEWGxwOTBQdzdhL3l2MzRqOWk1TmlBYXhDUkhQL0N  │
│  6WUxYbk1talExbk9NWXZVdlZ0NmxRZ0pIZ0h3dHQrRGxOeStqOGdlMmRGdlhkTDJaWmlBUElBQmtZVmQ2MXdsZlNSNmx5cVN5NEI5T0FDS2twdkZ3PT0tLXBUS2F5RXZDcDVsalMwQ  │
│  UYtLTZXU2dFczFZRmQwSkYrSWNWRTFPVWc9PQ&redirect_uri=http%3A%2F%2F127.0.0.1%3A3456&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&code_verif  │
│  ier=sgykylHL6oyz38qB8mfwm683b2SfAju7PvobNTN-w4g failed, reason: connect ETIMEDOUT 185.146.173.20:443                                        │
│                                                                                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

npm verb exit 1
npm verb code 1

Reproduction steps

  1. Jump into Shopify APP folder
  2. Run 'npm run dev'
  3. Input Shopify Partner account info
  4. Got the error message in CLI command

Tried below solution mentioned in #703 #2234 #1658 #1666 but not works

  1. Using Clash as VPN and set as global mode
  2. Change different VPN nodes in Clash
  3. Using Proxifier and redirect all local app traffic to Clash
  4. Using 'setx https_proxy' and 'setx http_proxy' to set system proxy
  5. Using 'npm config set https-proxy' and 'npm config set http-proxy' to set npm proxy
  6. Using command 'npm cache clear --force' to refresh npm cache
  7. Using command ' npm run shopify auth logout' to logout

Operating System

Windows 10

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

3.47.5

Shell

Powershell

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

18.16.1

What language and version are you using in your application?

N/A

@jeffey3 jeffey3 added the Type: Bug Something isn't working label Jul 14, 2023
@amcaplan
Copy link
Contributor

@jeffey3 have you tried setting the env variable SHOPIFY_CLI_DEVICE_AUTH=1 as mentioned here?

@rainbowvs
Copy link

I have the same problem.
I have tried setting SHOPIFY_CLI_DEVICE_AUTH=1, but still have this problem

@Katherinaxxx
Copy link

Me too, can not fix this.

I have the same problem. I have tried setting SHOPIFY_CLI_DEVICE_AUTH=1, but still have this problem

@Arkham
Copy link
Contributor

Arkham commented Aug 1, 2023

Note that if you are using Windows and Powershell you can set env vars in this way:

$env:SHOPIFY_CLI_DEVICE_AUTH = 1

If instead you are using cmd.exe you can set them this way:

set SHOPIFY_CLI_DEVICE_AUTH=1

@Arkham
Copy link
Contributor

Arkham commented Aug 2, 2023

I'll close this, as it seems more related to user configuration of a proxy, rather than CLI misbehaving.

@Arkham Arkham closed this as completed Aug 2, 2023
@hspjxm
Copy link

hspjxm commented May 10, 2024

请注意,如果您使用的是 Windows 和 Powershell,您可以通过以下方式设置环境变量:

$env:SHOPIFY_CLI_DEVICE_AUTH = 1

如果您使用的是 cmd.exe,您可以这样设置它们:

set SHOPIFY_CLI_DEVICE_AUTH=1

I have tried these, but I can still open Google browser and log in successfully, but the console still displays failed, reason: connect ETIMEDOUT 185.146.173.20:443
ps: I have allowed success before, but after downloading the theme after the theme has an exception can not be
At present, I mainly Google can open and log in, but the returned content is still failed, reason: connect ETIMEDOUT 185.146.173.20:443 ;I'm a Mac

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

No branches or pull requests

6 participants