I am trying to create a Shopify app and I am encountering an error when entering npm run dev command. The error message states that the Cloudflare Tunnel failed to request a quick tunnel due to an existing connection forcibly closed by the remote host. Iโm relatively new to this, so this might be an easy setup issue, however I was not able to figure it out.
Thank you in advance for your help.
LOG:
npm run dev
> test-app@1.0.0 dev
> shopify app dev
To run this command, log in to Shopify Partners.
:point_right: Press any key to open the login page on your browser
โ Logged in.
Looks like this is the first time you're running dev for this project.
Configure your preferences by answering a few questions.
? App name:
โ TestApp
โ Using your default dev store (TestAppdevstore) to preview your project.
:white_check_mark: Success! Converted TestAppdevstore.myshopify.com to a Test store.
Error: Command failed with exit code 1: C:/Users/username/Documents/Programmering/Shopify/test-app/node_modules/@shopify/plugin-cloudflare/bin/cloudflared.exe tunnel --url http://localhost:55864 --no-autoupdate
2023-04-10T11:49:58Z 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-04-10T11:49:58Z INF Requesting new quick Tunnel on trycloudflare.com...
failed to request quick Tunnel: Post "https://api.trycloudflare.com/tunnel": read tcp 192.168.0.91:55871->172.16.16.16:443: wsarecv: An existing connection was forcibly closed by the remote host.
at makeError (file:///C:/Users/username/Documents/Programmering/Shopify/test-app/node_modules/execa/lib/error.js:59:11)
at handlePromise (file:///C:/Users/username/Documents/Programmering/Shopify/test-app/node_modules/execa/index.js:119:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async exec (file:///C:/Users/username/Documents/Programmering/Shopify/test-app/node_modules/@shopify/cli-kit/dist/public/node/system.js:54:9)
PS C:\Users\username\Documents\Programmering\Shopify\test-app>
Iโm having the same problem, and my default cloudfare tunnelling is not resetting.
I tried the same โnpm run dev โ --reset ngrokโ , tried with ngrok url as well
Iโm having the same problem, and my default cloudfare tunnelling is not resetting.
I tried the same โnpm run dev โ --reset ngrokโ , tried with ngrok url as well
Hey @Samruddhi1 - this does seem odd, thanks for getting in touch. My team doesnโt directly support the CLI, but I would recommend reaching out in the CLIโs Github repo and opening an issue. I canโt guarantee anything specifically, but opening up an issue and reporting the error there will get you in direct touch with the CLI developers and they may be able to help you out further.
This is usually the best place to get help for any of our development tools or specific API libraries for the programming languages we directly support (Ruby, Node.js, PHP).
I have also faced the same kind of issue and resolved after clearing the DNS Cache using this command ipconfig /flushdns
โญโ error โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Could not start Cloudflare tunnel: failed to unmarshal quick Tunnel: โ
โ invalid character '<' looking for beginning of value โ
โ โ
โ โ
โ What to try: โ
โ โข Run the command again โ
โ โข Add the flag `--tunnel-url {URL}` to use a custom tunnel URL
Or cough up $20/mo for ngrok and say goodbye and good riddance to the flaky cloudflare. Thatโs what I did months ago and never looked back. Cheers jb