It's always great to "rubber duck" the flow.
Yes, so I create an app in shopify - fill in the necessary fields.
1. Click the app
2, Select a store
3, Click and Install
At this point it goes through all typical OAuth process, On the call back using the redirect uri I begin to create the app/uninstalled webhook.
I also log the resp
And I can also see the resp when getting all webhooks for that account
The app is most certainly "installed"
Looking at the same screenshot, I click the Delete button being the uninstalled process, even tried when clicking into the app.
I've tested my own endpoint to simulate what shopify is attempting to do and it works:
End result my local server is still running and not being hit:
I've used the same hook endpoint stored in hook resp, my config tbl, postman etc... The url works.
Other process, ngrok running locally with a developers account - nothing out of the ordinary.
If you provide the id for your app I'll check our logs to confirm the webhook is being sent, and confirm the response we're seeing from your endpoint. Bill's advice is great and there's isn't anything else I'd add, but I can at least confirm the behaviour in our logs to give a bit more confidence while you troubleshoot. The app id is the last set of digits in the URL when you're viewing the app in the partner dashboard.
This is an accepted solution.
The logs confirm a webhook is indeed firing, but your endpoint is responding with a 503 error. They're being sent to https://[removed].ngrok.io/Shopify/Uninstall . Hopefully that helps with troubleshooting.
Hi JB, Bill.
Awesome that's something to go on.
503 Service unavailable implies, I guess more of a network issue. I'm able to hit that endpoint locally using ngrok with no issues.
To confirm a network related issue, I'll aim to deploy a serverless http func to see if that resolves it - just makes it impossible to debug locally.
Thank you for your time all.
I'll report back later.
Thank you again, I know it's been a challenge. I'm pleased it's not a developer mistake, I.E bug / config.
JB, would it be possible just to confirm whether you're now receiving a 200. I've quickly deployed a serverless func, and can see an execution on my tracer but don't have any logs yet due to a quick temp release to test the theory.
Having said that, I'm still not quite sure why shopify cannot reach my ngrok instance. baffling.
I would still bundle any issues you have with your service as a config problem. Whether it be with ngrok, or other aspects, those all get lumped in... Shopify is sending the webhook. That action generates a non-200 OK response... therefore that is a config issue. But yes, it is also that you have not made a typo of otherwise introduced some kind of bug yourself. Good luck, and hopefully your can sort out your ngrok issues soon!
Confirmed, I'm seeing 4
200 - OK responses in the past hour. Note that Shopify automatically retries failed webhook deliveries, so some of those may be from previous failed delivery attempts.
Thanks for the info, does come off a little iffy/sarcastic haha but appreciate the honesty.
I use the same configuration through various WMS systems, I'm confident in the approach but non the less shall investigate the configuration.
Again, thank you for the time taken.