Webhooks being sent multiple time and no error email

Solved

Webhooks being sent multiple time and no error email

viico
Shopify Partner
5 0 0

Hello everyone,

 

We are implementing shopify webhook on our application. For the last couple of weeks everything worked fine, but this week we are prone to weird issues : 

  • Webhooks keep being sent over and over again, sometimes every 2 minutes even if they get a 2XX HTTP response. I get that a webhook could be triggers multiple times, but here we get some 20x or 30 times ! (with the same ID)
  • We do not receive failed webhook email anymore ! Usually we receive an important number of warning emails from shopify when our test servers are down, which is perfectly normal. Now we dont get any ! Shopify is totally silent even tho we know for sure a lot of webhooks has not been handled on our side.

Those two points make me think there might be a problem with shopify webhooks. Do anyone of you encountered this issue ? Any Shopify Staff member can help me on this issue ?

 

Thanks

Accepted Solution (1)

armurray
Shopify Staff
15 4 3

This is an accepted solution.

Hi Viico,

I'm a developer on the webhooks team.

Webhook duplicates are possible, but should be rare. Duplicates are usually a result of failures in the receiving app causing retries, but there are occasional infrastructural causes of duplicates on our end. It's unusual to receive 30 duplicates for a single webhook id, so I'm happy to investigate further.

Can you confirm that the endpoint is returning 200s using the webhooks dashboard? I'm curious if the endpoint is sending a 200, but the webhooks delivery system doesn't receive it in time and counts it as a failure due to timeout. If everything seems normal in the dashboard, feel free to DM me more details and I can open a ticket to investigate. Useful information would be the approximate time in UTC, affected shops, API clients, and/or endpoints, and individual webhook ids.

armurray | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 3 (3)

armurray
Shopify Staff
15 4 3

This is an accepted solution.

Hi Viico,

I'm a developer on the webhooks team.

Webhook duplicates are possible, but should be rare. Duplicates are usually a result of failures in the receiving app causing retries, but there are occasional infrastructural causes of duplicates on our end. It's unusual to receive 30 duplicates for a single webhook id, so I'm happy to investigate further.

Can you confirm that the endpoint is returning 200s using the webhooks dashboard? I'm curious if the endpoint is sending a 200, but the webhooks delivery system doesn't receive it in time and counts it as a failure due to timeout. If everything seems normal in the dashboard, feel free to DM me more details and I can open a ticket to investigate. Useful information would be the approximate time in UTC, affected shops, API clients, and/or endpoints, and individual webhook ids.

armurray | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

viico
Shopify Partner
5 0 0

Hello Armurray and thank you for your answer ! 
Unfortunately I'm not able to access the webhook dashboard. I've created the app directly in the store admin and I don't see it in the partner dashboard... Is there any way to maker it available ? 

armurray
Shopify Staff
15 4 3

No problem! The webhook delivery metrics are currently only available through the partners dashboard. I'll put in a feature request for your use case, but I can't guarantee a timeline for that. For now, we can troubleshoot without it.

Does the receiving app process the webhook data before sending a 200? In my experience, this is the most frequent cause of "My app responds with 200 but the webhook still retries." The webhooks best practices cover one solution, which is to enqueue an asynchronous job to process the webhook outside of the request.

If you're sure that your app responds with a 200 quickly, then feel free to DM me the troubleshooting information and I can take a look.

armurray | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog