Closed remy727 closed 10 months ago
Hi there 👋
Just a couple of things to double check here
OrdersFulfilledJob
extends ShopifyAPI::Webhooks::Handler
Docs hereThe webhooks you register with Shopify are saved in the Shopify platform, but the local ShopifyAPI::Webhooks::Registry needs to be reloaded whenever your server restarts. Docs
@lizkenyon, thank you for your reply.
OrdersFulfilledJob
extends ShopifyAPI::Webhooks::Handler
ShopifyAPI::Webhooks::Registry
? I just restarted dynos on Heroku before.How can I reload ShopifyAPI::Webhooks::Registry?
In your apps boot up code you will need to have code that adds your handlers to your registry.
You can see an example in the ruby template that uses a helper from shopify_app gem.
Aha got it. I am already using that ruby template.
👍 Hope that resolves that for you.
If you have any suggestions/a PR on how we could clarify this in the documentation I would love to hear it. Thanks! 😄
Hi @remy727, did you manage to figure it out? I am having the same issue:
config.webhooks
in the shopify_app initializer # Here the @registry is only the one I set in the `config.webhooks` not including the new registration
handler = @registry[request.topic]&.handler
# This error is then raised
unless handler
raise Errors::NoWebhookHandler, "No webhook handler found for topic: #{request.topic}."
end
Issue summary
I want to register orders/fulfilled webhook for one of my public app customers.
I was able to register the webhook and confirmed it was added. But I am getting ShopifyAPI::Errors::NoWebhookHandler (No webhook handler found for topic: orders/fulfilled error when running the below code.
shopify_api
version: 13.2.0Expected behavior
Handles
orders/fulfilled
webhookActual behavior
No webhook handler found for topic: orders/fulfilled
Steps to reproduce the problem