Remix dev server cannot reach cloudflare

Topic summary

Main issue: Starting the Remix dev server fails because it cannot reach a Cloudflare tunnel URL (https://…trycloudflare.com/ping), returning a FetchError with getaddrinfo ENOTFOUND. This blocks local development.

Context: Basic Remix app setup from the App tutorial, launched with npm run dev. Logs show build success, then failure to contact the dev server endpoint on trycloudflare.com.

What the error means: ENOTFOUND indicates a DNS resolution failure for the Cloudflare hostname.

Workarounds tried:

  • Running npm run dev – --reset and creating a new app toml configuration temporarily fixes the issue; root cause remains unclear.
  • Logging out and in via Shopify CLI (npm run shopify auth logout; then npm run dev) improves the situation but does not persist across restarts.

Status: No definitive fix or cause identified. The problem recurs after restarts; discussion remains open.

Summarized with AI on December 30. AI used: gpt-5.

I am running more or less the basic setup from the App tutorial using Remix. Today, I started getting an error when I start the dev server using npm run dev. This prevents me from doing any development.

Here is the log

21:55:48 │ graphiql   │ GraphiQL server started on port 3457
21:55:49 │ remix      │
21:55:49 │ remix      │  ?  remix dev
21:55:49 │ remix      │
21:55:49 │ remix      │  info  building...
21:55:50 │ remix      │  info  built (755ms)
21:55:50 │ remix      │ [shopify-api/INFO] version 9.3.0, environment Remix
21:55:50 │ remix      │ [remix-serve] http://localhost:35611 (http://192.168.0.11:35611)
21:55:50 │ remix      │ Could not reach Remix dev server at https://generating-trend-beginning-singing.trycloudflare.com/ping
21:55:50 │ remix      │
21:55:50 │ remix      │ /home/yan/code/discounter/node_modules/@remix-run/web-fetch/src/fetch.js:112
21:55:50 │ remix      │                         reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
21:55:50 │ remix      │           ^
21:55:50 │ remix      │ FetchError: request to https://generating-trend-beginning-singing.trycloudflare.com/ping failed, reason: getaddrinfo ENOTFOUND
generating-trend-beginning-singing.trycloudflare.com
21:55:50 │ remix      │     at ClientRequest.<anonymous> (/home/yan/code/discounter/node_modules/@remix-run/web-fetch/src/fetch.js:112:11)
21:55:50 │ remix      │     at ClientRequest.emit (node:events:530:35)
21:55:50 │ remix      │     at TLSSocket.socketErrorListener (node:_http_client:495:9)
21:55:50 │ remix      │     at TLSSocket.emit (node:events:518:28)
21:55:50 │ remix      │     at emitErrorNT (node:internal/streams/destroy:169:8)
21:55:50 │ remix      │     at emitErrorCloseNT (node:internal/streams/destroy:128:3)
21:55:50 │ remix      │     at processTicksAndRejections (node:internal/process/task_queues:82:21)

Any ideas how to debug this?

Running

npm run dev -- --reset

and creating a new app toml config fixed this. Unclear why.

Hi,

Try logout and login again

npm run shopify auth logout
npm run dev
2 Likes

Hello, this is better than my solution but it doesn’t seem to persist through restarts. Thank you, however.