cli: [Bug]: Static Ngrok URLs no longer work

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

Navigate to the static ngrok urls I’ve been using for dev in the past and everything tunnel correctly

Actual behavior

Overrides tunneling. Even though by default it uses ngrok, it suggests cloudflared as the approved method. Conflicting documentation and implementation.

Stack trace

No response

Reproduction steps

  1. ngrok start configname
  2. npm run dev
  3. or npm run dev – --tunnel-url ngrokURL
  4. overrides and fails

Operating System

MAC OS

Shopify CLI version (check your project’s package.json if you’re not sure)

3

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 2 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

Hi @cjohansson , the tunnel is needed if you have extensions (the CLI spins up an extension server). If you don’t have extensions you can avoid the tunnel using the flag --no-tunnel, this will make your frontend app available directly from localhost. Take into account that this flag is still experimental and can cause other issues, depending on the configuration of your project.

@rsdavis The proxy has two main routes: /extensions that redirects to the CLI extension server (if you have extensions) and / that catches everything else and redirects it to your app.

Hi @cjohansson ! Can I ask how did you start your tunnel? did you do ngrok http 49169? Seems like that address is in use… could there be any other process running in that port?

As for the issue with npm, it works a bit different so the correct command would be: npm run dev -- --tunnel-url ... (notice the extra --)

Discussed with @wisniewski94 in his PR: the issue is not in the runConcurrentHTTPProcessesAndPathForwardTraffic function 😃

Please when using a custom tunnel, make sure that:

  • The tunnel (ngrok, cloudflare or other) process is running
  • That you specify the port where the tunnel is redirecting the traffic, like this: yarn dev --tunnel-url https://{my-tunnel}.com:{tunnel-port}

real example:

> ngrok http 8123
> yarn dev --tunnel-url https://000-79-116-29-0.ngrok.io:8123