Hi,
I noticed that my app will return http 400 errors for the webhook shop/redact
. It’s using the shopify’s provided remix app, where webhooks are provided by default. I haven’t done any changes to it, so it uses the regular authentication:
export const action = async ({ request }) => {
const { shop, session, admin } = await authenticate.webhook(request);
So there are no obvious reasons that it fails, also the webhook app/uninstall
works perfectly well, and the implementation is the same.
As the shop/redact webhook takes 2 days to trigger, it’s very hard to debug.
With that said, when I visit the webhook logs in the partner dashboard, I can see the headers sent with the webhook and the header X-Shopify-API-Version
is empty:
All other webhooks have a valid value for it.
Does anyone have an idea of what could be wrong?
Thanks
Hi Soufiane,
I can’t see any similar reports of this behaviour internally - so it’s strange you’re seeing this error considering the configuration is the exact same as the app/uninstall
webhook.
Are you using the app webhook trigger
CLI command to test the webhooks? Or are these “true” events that are producing 400 errors? As a temporary workaround you could rely on the app/uninstall
webhook to inform you on when data should be erased.
@Liam-Shopify thanks for your answer…this is from real webhooks from a demo/development store. I will try the cli shortly and see what happens, I didn’t know about this tool until you mentioned it.
Unfortunately I’d like to avoid deleting shop’s data on app/uninstall
as it’s a good safeguard against apps uninstalled by mistake.
Ultimately I’m also worried that this will lead my app to not pass the app submission review.
I’ll keep you informed after I have tried with the cli tool.
@Liam-Shopify thanks, the cli tool is helpful. Using the cli the webhook works. I’ll see if it works in one or two days, the next time it is triggered in real conditions.
Let us know if you’re still seeing 400s