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 8 months ago
- Comments: 38 (5 by maintainers)
It would be nice to have some docs on how to swap out cloudflare for ngrok. Supplying ngrok
--tunnel-url
to theshopify app dev
command doesn’t work. Can anyone shed some light on this and share their setup if you have a working example using ngrok?For those looking for a solution
Run this in one terminal window:
ngrok http 8081
And 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:8081
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.
this worked, thank you!