Unistall app webhook get called multiple times (with no end)

hobbydevs
Shopify Partner
4 0 1

Hi,

 

I have created an app for the shopify app store. Now when I am testing the application (installing, clicking around, uninstalling, ...) I noticed that the uninstall webhook get's called multiple times.

In the screenshot you can see when the request came in from shopify (via webhook) and how long it took and the response status code.

Bildschirmfoto 2020-06-16 um 09.09.53.png 

 

This happens to me all the time and I am not able to test my application efficiently because I am always receiving uninstall webhooks from shopify and my application thinks then that the shop uninstalled the app and acts that way.

 

Am I missing something so obvious here? Can somebody help me out here?

 

What I did

  1. Register webhook(s) on installation of the app via
    gql`
        mutation webhookSubscriptionCreate {
          webhookSubscriptionCreate(
          topic: APP_UNINSTALLED,
          webhookSubscription: {callbackUrl: "/webhooks/app/uninstall", format: JSON}
          ) {
            userErrors {
              field
              message
            }
            webhookSubscription {
              id
            }
          }
        }
      `
  2. Create a route to respond to it (with koa-router)
  3. Do business logic and respond pretty quick with a 200 status code

 

Would be great if somebody could help me out here.

 

 

Replies 2 (2)

hobbydevs
Shopify Partner
4 0 1

EDIT:

To visualize it a bit better. Below is a image of the logs of the last 24 hours. 

In the last 24 hours 24 webhook requests entered for my test store named app-test-dev-store.myshopify.com 

Bildschirmfoto 2020-06-16 um 21.07.22.png

 

I am not sure but I think this is not the desired behavior. 

How did y'all solved this ? Am I registering the hooks wrong ?

Would appreciate every help.

Q_2
Shopify Partner
32 0 7

Have you found any solution? I am having the same issue.