Shopify app proxy not working after migrating to dev dashboard and deploying extension

We moved to the new dev dashboard today for one of our apps.

The app has extensions which use the app proxy. The TOML proxy configuration is correct and so is the configuration on the dev dashboard deployed extension version (This proxy configuration has been working for us for over two years)

Yet, for all extension versions deployed using the latest CLI version (3.84.1), our app proxy based route is giving 404. If I revert the extension back to a version deployed yesterday before the migration,
the same app proxy configuration works and we no longer see 404s.

Please help with this.

:waving_hand: I’m an engineer on the Shopify extensions team and I’d be happy to help troubleshoot this.

When you got the 404, were you using shopify app dev to test changes or shopify app deploy to deploy to live merchant shops?

If you were using shopify app dev :

We made some changes to how the tunnel URL substitution works as part of the latest CLI release:

  1. When we substitute URLs to use the Cloudflare tunnel to your local machine, we no longer change the TOML itself. The change is made later during the app dev call.
  2. If the start of a proxy_url matches the application_url, the proxy URL will also use the substituted URL.

This means that you might get a 404 if your local server isn’t set up to accept the app_proxy. You also wouldn’t see the change in TOML or in the Developer Dashboard, and it would still appear to be pointing to your production URL.

If you were using shopify app deploy:

This would be the first I’d heard of this problem. Please DM me your organization ID and app ID, which you can find in the Developer Dashboard URL. It would also be useful to have the shop id or URL.

1 Like

Hi @Andrew_Murray thank you so much for taking this up.

I am in fact using shopify app deploy. I would love to DM over the details but I am unable to find the option to do so anywhere I am afraid. Would it be possible for you to initiate a DM to me? Terribly sorry if I am missing something really obvious.

No problem at all– I can’t find one either. :melting_face:

Go ahead and email it to (EDIT: We have figured out the problem thanks to the information already provided. Thanks!) . I’ll continue to followup here with any results. Please see the pinned post for updates.

Sending an email with all details right away, thank you!

I have sent over all the details in an email, about 20 minutes ago. Thanks again for looking into this.

I’m facing the same issue. The app proxy configuration is correct in both the TOML and the dashboard, but after deploying with CLI 3.84.1 the proxy route returns 404.

Can you also send me the app id, organization id, and shop id, and app TOML file? I’d like to take a look at an app for which I can still reproduce the problem.

I’ve just sent the details to the provided email address. Please check and let me know if you need any additional information from my side.

Thank you for sending in the data for troubleshooting– it was essential to figure out the root problem. This thread is the best place to look for updates from here on out.

1 Like

Same issue here, sending email too and thanks for your help

Hi Andrew, can you elaborate further on the URL substitution flow for the application itself versus app proxies? Particularly the URL matching?

We are trying to continue developing our Remix app via the shopify app dev command and the traditional cloudflare tunnel method, but our app proxy endpoint lives on a different URL (which needs to remain separate to the main application’s development tunnel URL).

Originally, we simply left the app_proxy config out of our TOML file and defined the URL in the dashboard. We’ve now re-implemented the app_proxy configuration as per the requirements of the Next Gen platform, but we are noticing that requests made to our store’s app proxy path are still being resolved back to the cloudflare dev tunnel while running shopify app dev

Looping back here to share some discoveries since my earlier attempts.

I am editing the app_proxy URL directive inside a shopify.app.development.toml file.
I can fire up a dev server with shopify app dev, and right away I can see the following in the command info:

“Using shopify.app.development.toml for default values:”

Frustratingly, when it gets to setting up the app proxy, I can see it ignoring my TOML directive, and instead using the cloudflare URL:

app_proxy | Using URL: ``https://mating-function-uploaded-kids.trycloudflare.com/portal

If I update my URL in the app_proxy directive while the dev server is running, it even detects the change and proudly declares: Updated app preview on my-store-handle.myshopify.com but then immediately below that line, it mentions that it’s using the cloudflare URL, as above… no good!

.. However..
If I first delete the shopify.web.toml file in my project root, I can then restart the dev server and all of a sudden, the URL detection / auto-switching and the app proxy URL works as expected

I believe my shopify.web.toml is literally just the standard file present in the Remix app template from Shopify:

name = "remix"
roles = ["frontend", "backend"]
webhooks_path = "/webhooks/app/uninstalled"

[commands]
predev = "npx prisma generate"
dev = "npx prisma migrate deploy && npm exec remix vite:dev"

Once the dev server is listening, I am fairly sure I can then restore the web.toml file and things don’t get funky until I have to stop/start the dev server next time…

Hi folks,

This issue should have been resolved from updates described here:

If you’re still having issues with your app proxy please open a new topic.