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.
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:
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.
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.
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.
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.
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.
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.
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
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…