[BUG] `yarn dev` don't update urls in app.toml config file

Hi,
The last version 3.84.1 of shopify-cli seems to not update configured file with shopify app config use.
For example i have a local dev file shopify.app.dev.toml.
I’m starting my app with yarn dev then I wait the tunnel to be created and get the cloudflare url.
If i want to test the webhook i have to create a new version of my app with yarn deploy.
But as the config file has not been update, the urls are invalid.

Thanks

Hi @BowShopDev

Have you migrated to the new Dev Platform? If so, this is expected behavior. 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:

-Nick

Yes sorry didn’t says that i have migrated.So relative urls are the solution ?Because even with just shopify app dev, the webhook didn’t came to my localhost.

EDIT: just test my config and webhooks url are already relative:
[[webhooks.subscriptions]]topics = [ “app/uninstalled” ]uri = “/webhooks/app/uninstalled”

[[webhooks.subscriptions]]topics = [ “app_subscriptions/update” ]uri = “/webhook/app_subscriptions_update”

[[webhooks.subscriptions]]topics = [ “app/scopes_update” ]uri = “/webhooks/app/scopes_update”

[[webhooks.subscriptions]]topics = [“themes/create”, “themes/delete”, “themes/publish”, “themes/update”]uri = “/webhooks/app/themes”

Yes a relative URL in your webhook definition, with shopify app dev, should work for declarative webhooks.

app dev will update your dynamic app URL when it previews the app on your store, and it will be used as the base URL for your webhooks.

e.g.

  [[webhooks.subscriptions]]
  topics = ["products/update"]
  uri = "/webhooks/products/update"

Ok my bad it is working :slight_smile:. Thanks !

1 Like

Hi @NickWesselman ,

Has this behavior changed? I no longer see the URL in the terminal or on the dev preview in the Shopify Admin. Could you please confirm?

Hi @ahmedrizwan239 – It’s not in the latest design of the Dev Console, but it should be visible both in the log output and App info tab of the terminal. Do you still have automatically_update_urls_on_dev enabled in your app.toml?

For everyone on this thread – We are considering reverting back to updating the app.toml with the dynamic tunnel URL in the app.toml, both for visibility and in case you do want to app deploy your development app. Is this a better tradeoff for you vs the git noise of that file change?