App Proxy not working

AI-generated summary

A Shopify Remix custom app’s app proxy is returning a 404 when a theme extension fetches /apps/badge, even though the backend route /badge-data exists and the Partner Dashboard proxy is configured with prefix /apps, subpath /badge, and proxy URL <DOMAIN>/badge-data.

The main suggested cause is that Shopify allows only one app proxy per app per store, and duplicate proxy paths may be automatically renamed, for example from /apps/badge to /apps/badge-1. The recommended check is in Shopify Admin: Settings > Apps and sales channels > the app’s menu > View details, then confirm the actual proxy path.

One participant confirmed this fixed their issue, while another reported the same problem and said the suggestion did not work for them. The practical action item is to verify the live proxy path in the store admin and update the theme extension fetch URL if Shopify renamed it. The discussion is only partially resolved, with at least one unresolved case remaining.

I have created a Shopify custom app using remix so in theme extension I am fetching the data from my app routes that I have defined like this /badge-data .
I have setup the app proxy in partners page also like this:

Subpath prefix : /apps

Subpath : /badge

Proxy URL : /badge-data

In the theme extension I am fetching data like this

async function getBadgeData() {
  try {
    const response = await fetch("/apps/badge", {
      method: "get",
    });
    console.log(response);

    if (!response.ok) {
      throw new Error("Network response was not ok");
    }
    const data = await response.json();
    console.log("data=", data);
    return data;
  } catch (error) {
    console.log("error", error);
  }
}

getBadgeData();

getting 404 error even though the route is exists . I have created proxy for other apps and they are working fine don’t know why this is not working

There can be only one proxy per app in a store, so if you are using the same proxy that is “/apps/badge” for all the apps then it may unintentionally convert it to “/apps/badge-1”. Be careful of that, and to verify it go Settings > Apps and Sales channel > Your app three dots > View Details from your admin page and check the actual proxy. Hopefully this solves your problem

Any fixes? I’m having the same issue and the answer from @shaunak is not working for me

That worked for me. Thanks!

hey, doublechecking your proxy path in the shopify admin settings may work. if the path was renamed due to duplication, update your app code to match new proxy path