Fetch to proxy fail app dev mode

I was developing a customer ui page extension.

Yesterday it was working. fetch calls pass as expected via ngrok and hit the server.

Today only OPTIONS hitting ngrok; the fetch get does not show in ngrok and I get Failed to fetch to fetch error.

spent 2h with AI but no improvement… it seems that extensions in the fly.io are normal

Hey,

thanks for reaching out!

Can you provide some more information please?

What CLI version are you using?
What command are you running?
How are you setting up the tunnel?
Where are you sending the request to and how are you sending it?

Thank you!

What CLI version are you using?
latest
What command are you running?

;
const buildUrl = (path) => {
  try {
    return new URL(path, 'https://staging-xxxxxxxxxxxx.fly.dev').toString()
  } catch {
    console.warn("buildUrl error:", path);
    return path;
  }
}    
let accountUrl = '';
    try {      
      const accountPath = `/apps/analyzer/customer-account/get?customerId=${encodeURIComponent(shopifyCustomerGID)}`;
      
      accountUrl = buildUrl(accountPath);
      const token = await getSessionToken();
      console.debug('[debug] accountUrl:', accountUrl);
      console.debug('[debug] token:', token?.substring(0, 20)); // don't log full token
      const res = await fetch(accountUrl, {
        method: 'GET',
        mode: 'cors', // recommended by AI, did not work
        credentials: 'include', // try 'omit' first, then 'include'
        headers: { Authorization: `Bearer ${token}` },
        cache: 'no-store',
      }).catch((networkErr) => {
        let msg = networkErr?.message || 'Network error';
        if (msg == "Failed to fetch") {
          msg += " - target: " + accountUrl;
        }
        return throwWithToast(`Network failure while loading account: ${msg}`);
      });

How are you setting up the tunnel?

tunnel is created using ngrok http 3000
Where are you sending the request to and how are you sending it?

this request is sent from a customer account page extension;

later on I noticed that GET from proxy also was not working. It run options in the proxy, but the following request is responded with 200 without touching the proxy;

Funny enough, POST is working fine. For one endpoint I just recreate the route as POST and it worked fine. Now the twist, it was all working in the day before, in the morning just run the proxy and shopify app dev, and get stopped working

UPDATE: even if the get is to an external (and working endpoint), it is not connecting
but after deploying to fly.io everything works

Error: Network failure while loading account: Failed to fetch - target: https://staging-xxxx.fly.dev/apps/analyzer/customer-account/get?customerId=gid%3A%2F%2Fshopify%2FCustomer%2F9407000609005