Re: APP_UNINSTALLED webhook is not being fired

APP_UNINSTALLED webhook is not being fired

Guts-
Shopify Partner
5 0 2

 

I am getting success message on webhook registration for `APP_UNINSTALLED`

 

 

await Shopify.Webhooks.Registry.register({
shop,
accessToken,
path: webhookPath,
topic: 'APP_UNINSTALLED',
});

 

 

 
However, when the app uninstalled from the shop I am not getting any request from shopify which indicates that app was uninstalled 

I am using `shopify-node-api` to register the webhook and it's handler
 

 

 

Shopify.Webhooks.Registry.addHandler('APP_UNINSTALLED', {
    path: `/${API_BASE}/${WEBHOOK_ROUTES.SHOPIFY}`,
    webhookHandler: async (_topic, shop) => {
    console.log({ shop });
    console.log('webhookHandler emitted');
    this.eventEmitter.emit('shop.removed');
  },
});

 

 

And I am processing it in my endpoint. However, no request to my endpoint

 

Replies 3 (3)

bishpls
Shopify Partner
26 6 21

Are you using body-parsing middleware anywhere in your app?

 

express.json / bodyParser / anything that consumes the req.on('end') event will completely brick the Node package's 'process' function for webhook parsing. 

Guts-
Shopify Partner
5 0 2

Thank you for your reply

I am using Nest JS for backend of my app. I am not doing any of body parsing there.
The problem is that I am not getting any request to my endpoint.
I am console logging before processing


OhmTG
Shopify Partner
6 0 0

Facing the same problem, did you solve it?