cli: Cloudflare is down, and so I cannot run 'npm run dev'
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
It should have worked.
Actual behavior
Error: Could not start Cloudflare tunnel: max retries reached.
╭─ error ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Could not start Cloudflare tunnel: max retries reached. │
│ │
│ What to try: │
│ • Run the command again │
│ • Add the flag --tunnel-url {URL} to use a custom tunnel URL │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Verbose output
2023-11-02T21:30:33.829Z: Polling tunnel status for cloudflare (attempt 2): starting
2023-11-02T21:30:34.010Z:
Running system process:
· Command: C:/Dev/Shopify/premium-consumer-app/node_modules/@shopify/plugin-cloudflare/bin/cloudflared.exe tunnel --url http://localhost:60851 --no-autoupdate
· Working directory: C:/Dev/Shopify/premium-consumer-app
2023-11-02T21:30:34.029Z: 2023-11-02T21:30:34Z INF Thank you for trying Cloudflare Tunnel. Doing so, without a Cloudflare account, is a quick way to experiment and try it out. However, be aware that
these account-less Tunnels have no uptime guarantee. If you intend to use Tunnels in production you should use a pre-created named tunnel by following: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps
2023-11-02T21:30:34Z INF Requesting new quick Tunnel on trycloudflare.com...
2023-11-02T21:30:34.337Z: Polling tunnel status for cloudflare (attempt 3): starting
2023-11-02T21:30:34.852Z: Polling tunnel status for cloudflare (attempt 4): starting
2023-11-02T21:30:35.358Z: Polling tunnel status for cloudflare (attempt 5): starting
2023-11-02T21:30:35.868Z: Polling tunnel status for cloudflare (attempt 6): starting
2023-11-02T21:30:36.368Z: Polling tunnel status for cloudflare (attempt 7): starting
2023-11-02T21:30:36.869Z: Polling tunnel status for cloudflare (attempt 8): starting
2023-11-02T21:30:37.381Z: Polling tunnel status for cloudflare (attempt 9): starting
2023-11-02T21:30:37.885Z: Polling tunnel status for cloudflare (attempt 10): starting
Reproduction steps
- Create a brand-new app
- Run ‘npm run dev’
Operating System
Windows 10
Shopify CLI version (check your project’s package.json if you’re not sure)
3.50.1
Shell
No response
Node version (run node -v if you’re not sure)
No response
What language and version are you using in your application?
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 42 (7 by maintainers)
For those looking for a solution
Run this in one terminal window:
ngrok http 8081And then this in another:npx shopify app dev --tunnel-url=https://YOUR-TUNNEL-HERE.ngrok-free.app:8081/EDIT: Incorporated @isaacroldan’s shorter version instead of
ngrok http http://localhost:8081It would be nice to have some docs on how to swap out cloudflare for ngrok. Supplying ngrok
--tunnel-urlto theshopify app devcommand doesn’t work. Can anyone shed some light on this and share their setup if you have a working example using ngrok?Ah, that’s great 😃 Since cloudflare is back up and we already discussed workarounds, i’m going to close this issue. If there are new tunneling problems please open a new one.
I’m running into this issue as well, I’ve tried using
ngrokas suggested by some folks but it doesn’t work. I still get connection refused errorsOddly the requests do show up on the ngrok session in the terminal, but nothing happens in the admin side of shopify
Okay so this worked for me in the end, here are the steps I followed:
This is from @byrichardpowell, I followed this exactly and it worked like a charm. ✨
this worked, thank you!