Kyon147 / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
331 stars 98 forks source link

Not able to create webhooks #297

Closed varun-etraffic closed 8 hours ago

varun-etraffic commented 2 months ago

Expected Behavior

I am trying to create webhook for my app and I am following the exact same steps to create a webhook given on this link: https://github.com/Kyon147/laravel-shopify/wiki/Creating-Webhooks#webhooksubscriptiontopic-exception

Current Behavior

The Webhooks is not being created while I am following the exact same steps as given in the package wiki, and not able to get to know the reason behind it please help me ASAP. Even though the entry is going inside the jobs table in the DB {"uuid":"3db5b94f-5bfb-401e-ab2e-5f7ac6b53ffa","displayName":"Osiset\\ShopifyApp\\Messaging\\Jobs\\WebhookInstaller","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"Osiset\\ShopifyApp\\Messaging\\Jobs\\WebhookInstaller","command":"O:49:\"Osiset\\ShopifyApp\\Messaging\\Jobs\\WebhookInstaller\":2:{s:9:\"\u0000*\u0000shopId\";O:39:\"Osiset\\ShopifyApp\\Objects\\Values\\ShopId\":1:{s:6:\"\u0000*\u0000int\";i:1;}s:17:\"\u0000*\u0000configWebhooks\";a:2:{i:0;a:2:{s:5:\"topic\";s:13:\"ORDERS_CREATE\";s:7:\"address\";s:59:\"https:\/\/codeyear2024.com\/ordertag-app\/webhook\/orders-create\";}i:1;a:2:{s:5:\"topic\";s:15:\"PRODUCTS_CREATE\";s:7:\"address\";s:61:\"https:\/\/codeyear2024.com\/ordertag-app\/webhook\/products-create\";}}}"}}

But is not being generated in the shopify and I am sure why this is happening.

Failure Information

Getting no errors in the logs or in the console that is why I am raising the issue here.

Steps to Reproduce

Followed the steps given in this page https://github.com/Kyon147/laravel-shopify/wiki/Creating-Webhook

Failure Logs

Getting no errors or logs

Screenshots

https://prnt.sc/plbW2agu8obN https://prnt.sc/Tm8jcofy4Ljj https://prnt.sc/xAlnp6Xpo6_N

Kyon147 commented 2 months ago

What is your laravel queue you are using? If it is in the jobs table I assume you are using the database queue, but are you running the queue worker so that these jobs are ran?

imranalii commented 2 months ago

@varun-etraffic any luck with this problem?

I am also not able to create webhook for order/create. Followed all the documentation but still no luck. Also, I m using public domain with SSL and hosting not using ngrok.

To verify all webhooks I get all the webhooks using Shopify API but list only shows App uninstall webhook not order create.

varun-etraffic commented 2 months ago

@varun-etraffic any luck with this problem?

I am also not able to create webhook for order/create. Followed all the documentation but still no luck. Also, I m using public domain with SSL and hosting not using ngrok.

To verify all webhooks I get all the webhooks using Shopify API but list only shows App uninstall webhook not order create.

Not Yet!

varun-etraffic commented 2 months ago

What is your laravel queue you are using? If it is in the jobs table I assume you are using the database queue, but are you running the queue worker so that these jobs are ran?

I followed the documentation, and upon app installation it is making an entry in the jobs table of app database. What is the difference between these two as this is not mentioned in the repo wiki please let me know what I need to do make things work. As far as I know I have to be on a public hosting to install webhook as per your documentation which I did but still it didn't work.

Kyon147 commented 2 months ago

@varun-etraffic if it is making an entry into the jobs table, and that entry is still in the jobs table then it has not been executed. You need to run your jobs queue in Laravel so that the job is processed and the webhook is created.

varun-etraffic commented 2 months ago

@varun-etraffic if it is making an entry into the jobs table, and that entry is still in the jobs table then it has not been executed. You need to run your jobs queue in Laravel so that the job is processed and the webhook is created.

Do I have to run some command for this if yes please let me know which one, I am sorry to bother you this much but I am not an expert in laravel either I am learning and developing at same time.

Thanks

chintankotadia commented 2 weeks ago

@varun-etraffic: For local development, you can run this command in the terminal php artisan queue:work --queue=high,default whereas for production, you can configure this command using supervisor.

Kyon147 commented 8 hours ago

Closing as solution provided by @chintankotadia and not a bug