With the new Dev Dashboard update, can I use shopify.app.toml with webhook subscriptions like app/uninstalled when running shopify app dev --use-localhost?
Right now, I am getting the following error when running this command
When I needed to test a webhook, I was using shopify app dev command, and the rest of the time I used shopify app dev --use-localhost for faster development.
I was using the same shopify.app.toml config to run both these commands.
When running shopify app dev command, I just needed to deploy the updated shopify.app.toml config to test the webhook.
After the update,
I don’t have to deploy anymore when running shopify app dev command, which is awesome.
But it seems like I’m not able to run shopify app dev --use-localhost command when the shopify.app.toml config has the webhook subscription.
Question:
Is this expected behavior with the new update? If so:
How should one properly run shopify app dev --use-localhost when the shopify.app.toml has webhook subscriptions?
Is there a recommended workflow or configuration to support both local webhooks + localhost usage without switching config files?
Solution I’ve considered:
Creating a separate toml config just to run dev command with --use-localhost. But that doesn’t make much sense, as it overcomplicates things more with switching configs to run different dev command
Always run shopify app dev . But that means losing all the benefits of running dev command with --use-localhost.
I understand that shopify app dev --use-localhost is not supposed to work with the webhook.
However, as I’ve mentioned in the post, before the update, we were still able to run the dev command with the --use-localhost flag without any error, but now this command is throwing an error when we have a webhook subscription in the shopify.app.toml config.
I hit this as well. Where I can I’ll just use a full URI but it would be really helpful if it still allowed us to run the dev command with having web hook URI’s that start with a /
Hey y’all. This is a known limitation of the new app dev. Because dev now includes config (and is essentially a single-shop deploy), webhook declarative configuration will now cause a hard error when starting dev --use-localhost.
We have some ideas on how to make this better, but meanwhile the workaround is to make a copy of your app.toml and remove webhooks from it, then pass into dev, e.g.
shopify app dev --config shopify.app.no-webhooks.config