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]: Could not start Cloudflare tunnel: unknown error #5117

Closed
2 tasks done
nboliver-ventureweb opened this issue Dec 16, 2024 · 4 comments
Closed
2 tasks done

[Bug]: Could not start Cloudflare tunnel: unknown error #5117

nboliver-ventureweb opened this issue Dec 16, 2024 · 4 comments
Labels
Area: @shopify/app @shopify/app package issues Type: Bug Something isn't working

Comments

@nboliver-ventureweb
Copy link

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

shopify app dev should start a Cloudflare tunnel and provide the user with preview URL and GraphiQL URL. This was working fine last week with no code changes since then.

Actual behavior

'shopify app devfails with the following error:Could not start Cloudflare tunnel: unknown error.`
Image

I have tried using ngrok but have already exceeded the free allowance.

Verbose output

Verbose output
2024-12-16T18:42:53.826Z: Port 3457 is free
2024-12-16T18:42:53.827Z: Polling tunnel status for cloudflare (attempt 0): starting
2024-12-16T18:42:53.827Z: Getting a random port...
2024-12-16T18:42:53.828Z: Random port obtained: 50170
2024-12-16T18:42:54.327Z: Polling tunnel status for cloudflare (attempt 1): starting
2024-12-16T18:42:54.827Z: Polling tunnel status for cloudflare (attempt 2): starting
2024-12-16T18:42:55.327Z: Polling tunnel status for cloudflare (attempt 3): starting
2024-12-16T18:42:55.829Z: Polling tunnel status for cloudflare (attempt 4): starting
2024-12-16T18:42:56.331Z: Polling tunnel status for cloudflare (attempt 5): starting
2024-12-16T18:42:56.521Z: 2024-12-16T18:42:56Z INF +--------------------------------------------------------------------------------------------+
2024-12-16T18:42:56Z INF |  Your quick Tunnel has been created! Visit it at (it may take some time to be reachable):  |
2024-12-16T18:42:56Z INF |  https://lost-carroll-burns-ali.trycloudflare.com                                          |

2024-12-16T18:42:56.522Z: 2024-12-16T18:42:56Z INF +--------------------------------------------------------------------------------------------+

2024-12-16T18:42:56.522Z: 2024-12-16T18:42:56Z INF Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared]

2024-12-16T18:42:56.523Z: 2024-12-16T18:42:56Z INF Version 2024.8.2

2024-12-16T18:42:56.523Z: 2024-12-16T18:42:56Z INF GOOS: darwin, GOVersion: go1.22.2-devel-cf, GoArch: arm64
2024-12-16T18:42:56Z INF Settings: map[ha-connections:1 no-autoupdate:true protocol:quic url:http://localhost:50167]

2024-12-16T18:42:56.526Z: 2024-12-16T18:42:56Z INF Generated Connector ID: 7f7d2c40-e123-425c-b889-9852f0bfff9b

2024-12-16T18:42:56.660Z: 2024-12-16T18:42:56Z ERR update check failed error="no release found"

2024-12-16T18:42:56.833Z: Polling tunnel status for cloudflare (attempt 6): starting
2024-12-16T18:42:57.335Z: Polling tunnel status for cloudflare (attempt 7): starting
2024-12-16T18:42:57.837Z: Polling tunnel status for cloudflare (attempt 8): starting
2024-12-16T18:42:58.339Z: Polling tunnel status for cloudflare (attempt 9): starting
2024-12-16T18:42:58.840Z: Polling tunnel status for cloudflare (attempt 10): starting
2024-12-16T18:42:59.342Z: Polling tunnel status for cloudflare (attempt 11): starting
2024-12-16T18:42:59.843Z: Polling tunnel status for cloudflare (attempt 12): starting
2024-12-16T18:43:00.344Z: Polling tunnel status for cloudflare (attempt 13): starting
2024-12-16T18:43:00.844Z: Polling tunnel status for cloudflare (attempt 14): starting
2024-12-16T18:43:01.345Z: Polling tunnel status for cloudflare (attempt 15): starting
2024-12-16T18:43:01.847Z: Polling tunnel status for cloudflare (attempt 16): starting
2024-12-16T18:43:02.348Z: Polling tunnel status for cloudflare (attempt 17): starting
2024-12-16T18:43:02.853Z: Polling tunnel status for cloudflare (attempt 18): starting
2024-12-16T18:43:03.358Z: Polling tunnel status for cloudflare (attempt 19): starting
2024-12-16T18:43:03.860Z: Polling tunnel status for cloudflare (attempt 20): starting
2024-12-16T18:43:04.361Z: Polling tunnel status for cloudflare (attempt 21): starting
2024-12-16T18:43:04.862Z: Polling tunnel status for cloudflare (attempt 22): starting
2024-12-16T18:43:05.363Z: Polling tunnel status for cloudflare (attempt 23): starting
2024-12-16T18:43:05.865Z: Polling tunnel status for cloudflare (attempt 24): starting
2024-12-16T18:43:06.367Z: Polling tunnel status for cloudflare (attempt 25): starting
2024-12-16T18:43:06.529Z: 2024-12-16T18:43:06Z ERR Failed to fetch features, default to disable error="lookup cfd-features.argotunnel.com on 64.59.144.91:53: dial udp 64.59.144.91:53: i/o timeout"

2024-12-16T18:43:06.869Z: Polling tunnel status for cloudflare (attempt 26): starting
2024-12-16T18:43:07.371Z: Polling tunnel status for cloudflare (attempt 27): starting
2024-12-16T18:43:07.873Z: Polling tunnel status for cloudflare (attempt 28): starting
2024-12-16T18:43:08.375Z: Polling tunnel status for cloudflare (attempt 29): starting
2024-12-16T18:43:08.876Z: Polling tunnel status for cloudflare (attempt 30): starting
2024-12-16T18:43:09.377Z: Polling tunnel status for cloudflare (attempt 31): starting
2024-12-16T18:43:09.879Z: Polling tunnel status for cloudflare (attempt 32): starting
2024-12-16T18:43:10.380Z: Polling tunnel status for cloudflare (attempt 33): starting
2024-12-16T18:43:10.882Z: Polling tunnel status for cloudflare (attempt 34): starting
2024-12-16T18:43:11.382Z: Polling tunnel status for cloudflare (attempt 35): starting
2024-12-16T18:43:11.883Z: Polling tunnel status for cloudflare (attempt 36): starting
2024-12-16T18:43:12.385Z: Polling tunnel status for cloudflare (attempt 37): starting
2024-12-16T18:43:12.887Z: Polling tunnel status for cloudflare (attempt 38): starting
2024-12-16T18:43:13.388Z: Polling tunnel status for cloudflare (attempt 39): starting
2024-12-16T18:43:13.889Z: Polling tunnel status for cloudflare (attempt 40): starting
2024-12-16T18:43:14.391Z: Polling tunnel status for cloudflare (attempt 41): starting
2024-12-16T18:43:14.893Z: Polling tunnel status for cloudflare (attempt 42): starting
2024-12-16T18:43:15.394Z: Polling tunnel status for cloudflare (attempt 43): starting
2024-12-16T18:43:15.896Z: Polling tunnel status for cloudflare (attempt 44): starting
2024-12-16T18:43:16.398Z: Polling tunnel status for cloudflare (attempt 45): starting
2024-12-16T18:43:16.552Z: 2024-12-16T18:43:16Z INF Initial protocol quic

2024-12-16T18:43:16.554Z: 2024-12-16T18:43:16Z INF ICMP proxy will use 192.168.5.147 as source for IPv4

2024-12-16T18:43:16.555Z: 2024-12-16T18:43:16Z INF ICMP proxy will use fe80::8d1:4cd7:902c:9fd2 in zone en0 as source for IPv6

2024-12-16T18:43:16.556Z: 2024-12-16T18:43:16Z INF Created ICMP proxy listening on 192.168.5.147:0

2024-12-16T18:43:16.556Z: 2024-12-16T18:43:16Z INF Created ICMP proxy listening on [fe80::8d1:4cd7:902c:9fd2%en0]:0

2024-12-16T18:43:16.899Z: Polling tunnel status for cloudflare (attempt 46): starting
2024-12-16T18:43:17.401Z: Polling tunnel status for cloudflare (attempt 47): starting
2024-12-16T18:43:17.903Z: Polling tunnel status for cloudflare (attempt 48): starting
2024-12-16T18:43:18.404Z: Polling tunnel status for cloudflare (attempt 49): starting
2024-12-16T18:43:18.906Z: Polling tunnel status for cloudflare (attempt 50): starting
2024-12-16T18:43:19.407Z: Polling tunnel status for cloudflare (attempt 51): starting
2024-12-16T18:43:19.908Z: Polling tunnel status for cloudflare (attempt 52): starting
2024-12-16T18:43:20.409Z: Polling tunnel status for cloudflare (attempt 53): starting
2024-12-16T18:43:20.911Z: Polling tunnel status for cloudflare (attempt 54): starting
2024-12-16T18:43:21.413Z: Polling tunnel status for cloudflare (attempt 55): starting
2024-12-16T18:43:21.915Z: Polling tunnel status for cloudflare (attempt 56): starting
2024-12-16T18:43:22.417Z: Polling tunnel status for cloudflare (attempt 57): starting
2024-12-16T18:43:22.918Z: Polling tunnel status for cloudflare (attempt 58): starting
2024-12-16T18:43:23.420Z: Polling tunnel status for cloudflare (attempt 59): starting
2024-12-16T18:43:23.922Z: Polling tunnel status for cloudflare (attempt 60): starting
2024-12-16T18:43:24.423Z: Polling tunnel status for cloudflare (attempt 61): starting
2024-12-16T18:43:24.925Z: Polling tunnel status for cloudflare (attempt 62): starting
2024-12-16T18:43:25.426Z: Polling tunnel status for cloudflare (attempt 63): starting
2024-12-16T18:43:25.928Z: Polling tunnel status for cloudflare (attempt 64): starting
2024-12-16T18:43:26.430Z: Polling tunnel status for cloudflare (attempt 65): starting
2024-12-16T18:43:26.593Z: 2024-12-16T18:43:26Z INF Starting metrics server on 127.0.0.1:50182/metrics

2024-12-16T18:43:26.930Z: Polling tunnel status for cloudflare (attempt 66): starting
2024-12-16T18:43:27.431Z: Polling tunnel status for cloudflare (attempt 67): starting
2024-12-16T18:43:27.933Z: Polling tunnel status for cloudflare (attempt 68): starting
2024-12-16T18:43:28.435Z: Polling tunnel status for cloudflare (attempt 69): starting
2024-12-16T18:43:28.937Z: Polling tunnel status for cloudflare (attempt 70): starting
2024-12-16T18:43:29.438Z: Polling tunnel status for cloudflare (attempt 71): starting
2024-12-16T18:43:29.939Z: Polling tunnel status for cloudflare (attempt 72): starting
2024-12-16T18:43:30.440Z: Polling tunnel status for cloudflare (attempt 73): starting
2024-12-16T18:43:30.942Z: Polling tunnel status for cloudflare (attempt 74): starting
2024-12-16T18:43:31.442Z: Polling tunnel status for cloudflare (attempt 75): starting
2024-12-16T18:43:31.943Z: Polling tunnel status for cloudflare (attempt 76): starting
2024-12-16T18:43:32.445Z: Polling tunnel status for cloudflare (attempt 77): starting
2024-12-16T18:43:32.946Z: Polling tunnel status for cloudflare (attempt 78): starting
2024-12-16T18:43:33.145Z: Killing process 3079: /opt/homebrew/Cellar/shopify-cli/3.72.1/libexec/lib/node_modules/@shopify/cli/bin/cloudflared tunnel --url http://localhost:50167 --no-autoupdate
2024-12-16T18:43:33.176Z: 2024-12-16T18:43:33Z INF Initiating graceful shutdown due to signal terminated ...

2024-12-16T18:43:33.448Z: Polling tunnel status for cloudflare (attempt 79): error

Reproduction steps

  1. run shopify app dev
  2. see Cloudflare error

Operating System

Mac OS Ventura 13.3.1

Shopify CLI version (shopify --version)

@shopify/cli/3.72.1

Shell

zsh

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

node-v23.4.0

What language and version are you using in your application?

Remix template

@nboliver-ventureweb nboliver-ventureweb added the Type: Bug Something isn't working label Dec 16, 2024
@frandiox frandiox added the Area: @shopify/app @shopify/app package issues label Dec 17, 2024
@gonzaloriestra
Copy link
Contributor

Hi!

The Cloudflare tunnel works for me and I see no related incidents in https://www.cloudflarestatus.com.

Looking at your logs, I see the tunnel URL is generated, but the "Registered tunnel connection" message is missing for some reason. Some ideas:

  • Remove your cloudlfared binary, so that it's reinstalled: rm /opt/homebrew/Cellar/shopify-cli/3.72.1/libexec/lib/node_modules/@shopify/cli/bin/cloudflared
  • Try from a different network/device
  • Try to manually create a tunnel:
    • brew install cloudflared
    • cloudflared tunnel --url localhost:3000

Which limit have you reached with Ngrok? Because it may be the cause why Cloudflare doesn't work for you either. This kind of services usually ban IPs with suspicious or high traffic.

If you can't make Cloudflare work, you can use any other tunnel provider. You can find instructions for Ngrok here, but it would be similar for all.

@nboliver-ventureweb
Copy link
Author

@gonzaloriestra Thanks for the reply. It seems to be network related since it started working as soon as I changed to a different network - do you have any ideas about why that might be the case, or how to resolve it?

@sshaw
Copy link

sshaw commented Dec 25, 2024

I never had this issue in the US. When I try connecting from Brazil, it happens 95% of the time. When I connect to a US network via a VPN, works, always.

@gonzaloriestra
Copy link
Contributor

I don't know, sorry. Maybe you can contact Cloudflare.

I'm closing here since it's not a CLI issue.

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

No branches or pull requests

4 participants