I was using the Shopify Node template, and when I ran shopify app deploy it correctly updated my app URL in the shopify.app.toml file.
However, today when I started my app with shopify app dev, it asked me to install the latest version of the CLI. I upgraded from 3.83 to 3.84. After that, when I run the same shopify app dev command, the app URL in the shopify.app.toml file does not update automatically anymore.
I’m not sure why this behavior has changed. Previously, it worked as expected. My question: How can I revert back to the previous configuration/behavior, where running shopify app dev automatically updated the app URL in shopify.app.toml?
if dont have any solitution then how i will work with the current version.
I have the same issue! I am unable to test and preview anything in the new version. App url with tunnel does not get updated in preview at all. Downgrade not possible. Please help
Using 3.84
Using**shopify.app.toml** in react app. Testing not possible. Cloudflare or ngrok seem to be not supported even though the docs state otherwise .
Even local hosting with self signed certificate does not update the app url in the preview. Only changing the toml app url directly updates the preview.
This is expected behavior on the Dev Platform. dev doesn’t need to update your TOML any more, and you also don’t need to deploy to test declarative webhooks anymore. Just use relative URLs!
More info here:
And here:
tldr – Your app is using the dynamic URL, even though you don’t see it in the app toml. Is there something specific that’s not working when you open your app?
hmm there should be a URL in that App info tab as well, your app is acting like automatically_update_urls_on_dev = false even though you appear to have it cofigured.
Yes, I noticed that as well. I already deployed that change and tried to run with —reset , however that didn’t change anything unfortunately.
Thank you for investigating. I’ll wait for your response.
For context:
I am using macOS Sequoia version 15.5
Shopify-cli version 3.84.1
Feel free to contact me directly for colaborative investigation .
Can you confirm whether this worked for you previously? Was your org always on Dev Platform or did you migrate from Partners? What CLI version were you using before?
A colleague pointed out to me that you appear to not have a shopify.web.toml, which means that Shopify CLI would treat your app as extension-only, and not update your URLs. This is not new behavior though.
What app template did you use? How are you running your app locally?
Here are the docs on the web.toml:
(To emphasize for others reading this, even with the shopify.web.toml set up correctly, on the Dev Platform the app URLs will update on the dev store, but we no longer update the shopify.app.toml.)
Hi @user198 – Can you describe more about the issue you are having? Did you read the doc links on the expected behavior of app dev on the Dev Platform?
Thank you for sharing this @NickWesselman and getting back at this. This was fixing it for me.
This behavior was non obvious to me, especially since the shopify-cli doesn’t mention this at all. I took some code from a template earlier and from my point of perspective this design choice is counter intuitive and not prominently enough described in the docs either.
Note, that I had to remove my earlier comments, since I noticed some non public data got leaked.
Similarly, short review from my side, as a short thank you for fast investigation from your side: some( from what I read) known challenges, where I think there is room for improvement:
I don’t understand why the shopify-cli does not allow to tunnel to an application locally run by myself and the [command] in the shopify.web.toml is not optional.
Also it does not use the same port for the tunnel, if I host it myself and just use “sleep 10000” for the [command.dev].
It also does not take the same path I use in production when tunneling locally for mounting the app to serve from my backend.
This forces me to change my dev setup and make it distinct from my production setup.
Hi @Lennard , glad that this is working for you know.
Appreciate the feedback, we are always looking on ways to improve and make things clearer, so this helps.
I don’t understand why the shopify-cli does not allow to tunnel to an application locally run by myself and the [command] in the shopify.web.toml is not optional.
Also it does not use the same port for the tunnel, if I host it myself and just use “sleep 10000” for the [command.dev]
The [command] is not optional, but it can be a no-op, something like this will work to expose your app running in port 3000 (or change to whatever port you’re using):
[commands]
dev = "echo 1"
port = 3000
It also does not take the same path I use in production when tunneling locally for mounting the app to serve from my backend. This forces me to change my dev setup and make it distinct from my production setup.
Not sure I understand this part, could you add more details about this issue?
I have the same issue with my app running on https://admin.shopify.com/store/dev-store-name/apps/app-name not using the cloudflare url that was generated from running shopify app dev. The app running in the admin is using the App URL that is in the latest app version and showing this error with a broken page icon: randomly-generated-name.trycloudflare.com``’s server IP address could not be found.
Is there a step I’m missing? If I can’t run my app in my dev store, how am I supposed to develop it locally? Am I supposed to create a new dev store since this is a new system?
This happened after I upgraded to Shopify CLI 3.84.2.
@Beverly_Tang Are you opening the app on the same store that you selected when running shopify app dev? See details here on the new behaviors of app dev:
Yes, I first uninstalled the app from the dev store. When I run shopify app dev , I saw that it installed the app on the dev store (as indicated on the Test apps locally page). When I go to the app on that dev store, it is loading the cloudflare url that is in the latest version that was deployed but not the url that was generated from running shopify app dev.
Yes, I did have that setting. I tried to spin it up again today and noticed there was a tip in the terminal:
Run shopify app dev clean to restore the latest released version of your app.
After running that, the app is loading again. Perhaps it got out of sync somehow after the upgrade.
TLDR: In development you cannot run your app under a different path than the origin root path (always need to use same domain and same port).
More detailed steps:
When I host my app under https://example.com/shopify/app, There is no way for me to test it, since hosting it outside my setup under https://example.com/ would require me to use a different origin (CSP connect-src origin issues when connecting from my shopify app to my origin) or would clash with what I actually want to run under https://example.com/. All attempts to tunnel remove the path /shopify/app .
I tried the following just now, revealing a few weird observations (bugs from my point of view).
First attempt: having an application running when starting the tunnel fails with the message “Hard-coded port 30002 is not available, please choose a different one.”
Second attempt: stopping my local application running on port 30002, then starting the tunnel again with “shopify app dev”, then running my application, works (this seems unreasonable). However, Shopify CLI, again, ignores the path (so I cannot work with this setup)
Third attempt: “shopify app dev --tunnel-url=https://example.com”, does not allow to set a path nor takes the path as specified in the shopify.app.toml
I am forced to run a completely different setup just to host this mini frontend for shopify, please help
Edit 1: I found a setup full of workarounds should work but doesn’t because the redirects are always set to http by the tunnel and then the iframe errors out due to an unsecured endpoint. I put a redirect under the “/” path for only the shopify admin referer (even modifying x-forwarded-host as well), then Start CLI, then start application locally (if started after, the cli fails for some reason). iframe doesnt allow redirects when running through CLI tunnel.
Edit 2: After some hours I decided as a workaround to just serve the react app index directly through the “/” root path only for when the shopify admin referer uses the website. This is very bad practice afaik.
@NickWesselman I’d appreciate any help or if you could point me to the correct resources to ressolve these challenges, thanks in advance!