Shopify CLI - Ngrok failed to start the tunnel

Hi folks,

When I ran the command “shopify app dev” today, I encountered the error:

Ngrok failed to start the tunnel
Stack trace:
at generateURL @shopify/app/src/cli/services/dev/urls.ts:87 if (result.error === 'no-urls' || !result.url) throw new error.Bug('Ngrok faile…
at processTicksAndRejection… node:internal/process/task_queues:96
at async generateFrontendUR… @shopify/app/src/cli/services/dev/urls.ts:71 frontendUrl = await generateURL(options.commandConfig, frontendPort)
at async dev @shopify/app/src/cli/services/dev.ts:64 const {frontendUrl, frontendPort, usingLocalhost} = await generateFrontendURL({
at run @shopify/app/src/cli/commands/app/dev.ts:100 await dev({

I tried to reinstall dependencies, Shopify CLI, etc but the error still persists.

Like 1-2 months ago, everything worked fine.

Anyone knows what the error is about and how to fix it?

Thanks.

I found the solution today. I used cloudfare. Follow below steps:

Step 1: Run “cloudflared tunnel --url http://localhost:3000”.

Step 2: One URL will be generated in the CMD for example “https://example.trycloudflare.com”. Copy that and use it in Step 3.

Step 3: sudo npm run dev – --tunnel-url https://example.trycloudflare.com:3000.

Hope it helps. Cheers :slightly_smiling_face: