Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Webhooks don't work #64

Closed
demoskp opened this issue Aug 8, 2018 · 9 comments
Closed

Webhooks don't work #64

demoskp opened this issue Aug 8, 2018 · 9 comments

Comments

@demoskp
Copy link

demoskp commented Aug 8, 2018

I have updated the package to 2.2.0 and my webhooks stopped working, my guess is that the domain token has changed.

Am I not able to call the shop domain from my webhook job using $shopDomain and the response from shopify with $data?

@gnikyt
Copy link
Owner

gnikyt commented Aug 9, 2018

I just tested a webhook and all went well on my end, do you have any error messages?

@demoskp
Copy link
Author

demoskp commented Aug 9, 2018

I am getting undefined variable shopDomain

@gnikyt
Copy link
Owner

gnikyt commented Aug 9, 2018

Shop domain comes from x-shopify-shop-domain header and body comes from the request. You're saying you're not getting either?

What type of webhook is this?
Can you share the constructor?
Is it going through the webhook controller or did you do something custom?

Odd because the auth.webhook middleware would fail if the shop was missing.

@demoskp
Copy link
Author

demoskp commented Aug 9, 2018

I tried it on another page and I get that error. Is that only valid for the webhook?

The webhook gets the request from shopify and gives it to the worker which is then processed, I do not get any errors in my worker database tables but when I try any webhook it doesn't actually do what it should. Would the errors appear in the laravel log or the php log?

@demoskp
Copy link
Author

demoskp commented Aug 9, 2018

public function __construct($shopDomain, $data)
{
$this->shopDomain = $shopDomain;
$this->data = $data;
}

@gnikyt
Copy link
Owner

gnikyt commented Aug 9, 2018

When you say you try the job, what do you mean by this?

If theres any errors it may be in the php/laravel log yes. If the job gets the queue, then it has passed the validation on the middleware, which means it should have all the data it needs to run.

@demoskp
Copy link
Author

demoskp commented Aug 9, 2018

I used different webhook actions such as delete a product from my shopify store, as well as delete the app but it doesn't process anything from the database.

@brianakidd
Copy link

@demoskp Can you share the route, the controller action that the route points to, your webhook job and your shopify-app config file showing the webhook?

This is going to be difficult to troubleshoot without having the entire flow. Thanks.

@demoskp
Copy link
Author

demoskp commented Aug 12, 2018

It was my fault, I had changed a domain for the app but forgot to update the webhook links in the app configuration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants