Webhook URLs not automatically updated in dev mode

I thought I finally had a reasonable solution… I installed a library to read the toml file and grab the application_url in dev mode so I only had to run a setup CLI command to register the webhooks again.

Not anymore, the latest CLI update broke the automatically_update_urls_on_dev and this value is no longer updated. Now I don’t have a reasonable way of obtaining the URL anymore to update the webhooks.

Please either make the webhook host update automatically or fix this feature. I’m tired of breaking changes every few months that makes me waste a ton of time to fix while effectively nothing has changed for me.

Hey @Lynn-srs, in this post, another community member suggests using relative paths for the webhooks. Would this work in your scenario?

When I tried this last month it did not work

Thanks for sharing that. Ultimately, the most reliable solution would be to use a permanent url for your webhooks in development.

I’m happy to do some testing on my end though to see what’s working currently. Are you using the default cloudflare tunnels?

Hey @Lynn-srs Are you still experiencing this issue, or can I mark this as solved?

This issue is still present.

Thanks for letting me know. Can you share a few of those details on your current configuration so I can attempt to replicate?

What specific information are you looking for?

The current network configuration you’re using (ie cloudflare tunnels, local hosting, something else). An example of your app toml configuration file would help me replicate as well.

For my development environment I’m using whatever came with the default PHP template, which is cloudflare.

In this case I’ve started the local env by running yarn dev -c <shopify.app.my config.toml>. The URL I received is https://queensland-scotia-today-april.trycloudflare.com/

I then open my webhook subscriptions through the gql tool that I run locally (webhookSubscriptions query), and see the previous URI: https://indication-lawyer-packing-roberts.trycloudflare.com/api/webhooks

If I then call the mutation webhookSubscriptionUpdate with the uri /api/webhooks it will give me a user error: Address is invalid

Right now I made a script to read .shopify/dev-bundle/manifest.json and look for the app_home to grab the URL and put that in front of it, but this is something that has to be manually run in the dev env. It wastes a lot of our time when we forget to do this and have to figure out it was because we forgot to run this script.

Previously I would read it from the shopify.app.my config.toml, but these no longer update either. Neither application_urlnor redirect_urls are updated, but this shouldn’t be necessary either.

My dev toml:

client_id = "<...?"
name = "<....>"
handle = "<...>"
application_url = "https://his-precise-sharon-best.trycloudflare.com"
embedded = true

[build]
automatically_update_urls_on_dev = true
dev_store_url = "<my local store>.myshopify.com"

[access_scopes]
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes
scopes = "customer_read_orders,customer_write_customers,read_assigned_fulfillment_orders,read_inventory,write_locations,read_locations,read_merchant_managed_fulfillment_orders,read_returns,write_assigned_fulfillment_orders,write_customers,write_inventory,write_merchant_managed_fulfillment_orders,write_orders,write_products,write_returns,write_order_edits"

[auth]
redirect_urls = [
  "https://his-precise-sharon-best.trycloudflare.com/auth/callback",
  "https://his-precise-sharon-best.trycloudflare.com/auth/shopify/callback",
  "https://his-precise-sharon-best.trycloudflare.com/api/auth/callback"
]

[webhooks]
api_version = "2025-10"

[pos]
embedded = false

Hey @Lynn-srs, thanks for those details.

The “Address is invalid” error you’re seeing with webhookSubscriptionUpdate is likely because you are using a relative path in the mutation.

I was testing here, using relative urls directly in my shopify.app.toml file When I have app dev running, the webhooks are being returned in the terminal when fired.

[webhooks]
api_version = "2025-10"

[[webhooks.subscriptions]]
topics = ["orders/create"]  # or whatever topics you need
uri = "/api/webhooks"

Can you test if adding them to your toml works in your case? I was testing with the remix template, not the php template so there may be some nuances I’m missing.

Whether or not that works is irrelevant to me, because the PHP code manages the webhooks, it will automatically remove webhooks that are no longer configured in our code. We also dynamically add some filters to reduce incoming orders/updated calls.

I suspect through the toml it works, but that’s not something I can use right now.

I understand that. In this case, the workaround you’ve implemented may be best.

Something to consider for the future, I would recommend migrating to managing your webhooks using the app configuration file if you can. This makes deployment easier and you can still apply filters to reduce the noise from busy webhooks like orders.

unfortunately this workflow is far from ideal.

  • We’d have to manage the webhooks partly in PHP and partly in toml.
  • The routing is configured by PHP, the handling is done by PHP, the matching of topic is done in PHP (and gets converted to ORDERS_UPDATED for example), but then the webhooks+topics+filters are managed in a toml file.
  • Every dev has their own toml file, so any changes to the webhooks need to be manually synced to other dev’s toml files. This is because each dev has their own dev store with their own app version so we can develop independently from each other.
  • We’d lose the ability to have dynamic filters, like we don’t want orders/updated webhooks to be sent for orders older than 3 days, so we say deployment time - 3 days as minimum time to greatly reduce the amount of webhooks. We need orders/updated because orders/paid is not sent when the order is created and paid by external channels like channable.