Webhook Deliveries Failing (503) Deployment URL and Active URL Mismatch

My webhook deliveries are failing for a specific hook that is using a relative path as its uri.

[[webhooks.subscriptions]]
topics = [ "orders/create" ]
uri = "/webhooks/app/orders-create"

When I look at the delivery logs, the endpoint matches the current version’s application_url.

But when I check the build configuration, the app url matches the url of my current dev server (shopify.app.toml).

I’ve gotten the two URLS to match up, by setting automatically_update_urls_on_dev = false but then my webhook deliveries return a 530 response code.

I have also tried resetting my application with npm run shopify app dev -- --reset thinking that would reinstall my webhooks, but it did not.

I’ll also note that when I trigger an event in the CLI with npm run shopify webhook trigger the webhook works as expected.

Any insights would be greatly appreciated!

Hello,

When run npm run shopify app dev, have you tried to also run npm run shopify app deploy in a separate terminal? It should make sure the app config (especially the webhook part) has been updated/synced with our backend!

OMG, yes that worked! Thank you so much!

So if I deploy my app after I have my dev server running, that syncs the app config with the backend, but that seems like a lot of unnecessary versions. I suppose I can set automatically_update_urls_on_dev=false but is that best practice for a dev environment?

Edit: I should note that setting automatically_update_urls_on_dev=false does not solve the issue of having to deploy the app every time I start a new dev server, since my new dev server returns:

530
The origin has been unregistered from Argo Tunnel