Why is my Remix app's data fetch request getting cancelled?

Topic summary

Remix loader (server-side data fetch) to a second local server appeared to be “cancelling” requests and blocking navigation in an embedded Shopify app. Server logs showed the upstream call succeeded, and OAuth/auth were working. CORS was configured; both services ran via ngrok.

Suggestion offered: restart and verify auth; reference example loader code. The app behaved correctly in a non-Shopify Remix reproduction using the same backend and auth, suggesting something specific to the embedded context.

Root cause: a client-side runtime error masked by noisy console output (Brave browser) was aborting navigation. A config.ts reading process.env (server-only env vars) was inadvertently bundled to the client, causing the error.

Fix: rename the file to config.server.ts so Remix treats it as server-only and excludes it from the client bundle. After this change, navigation and data fetching worked as expected.

Outcome: resolved. Not a CORS/Remix/Shopify issue, but a client bundle leak of server-only code due to file naming, plus console noise obscuring the true error.

Summarized with AI on January 14. AI used: gpt-5.

Hi @johnmcguin88 ,

Have you try to re-start your app? Your auth might be off. You can check the example code for loader use here.