Good day,
We’ve been experiencing webhook failures in our Shopify app, where we see 500 errors in the Partner Dashboard but no additional logs or debugging information.
However, when testing our webhooks locally using:
npm run shopify webhook trigger
we receive a successful response, and our logs confirm that the method is invoked:
![]()
Issue in Production:
- In our deployed App Runner environment, we don’t see any logs, suggesting that the webhooks might not be reaching our app at all.
- As an interim solution, we track when a store uninstalls our app and remove their data from our database, but this isn’t ideal.
Implementation Details:
- Our webhooks are placed inside routes folder (within our remix app) in a file named webhooks.app.scopes_update.jsx.
- Below is a relevant excerpt of our webhook handling code, including an example function (handleCustomersDataRequest):
```
export const action = async ({ request }) => {
const clonedRequest = request.clone(); const payload = await request.json(); const { shop_id, shop_domain, customer, orders_to_redact, orders_requested, data_request, } = payload; const { topic, shop, session, admin } = await authenticate.webhook(clonedRequest); switch (topic) { case “APP_UNINSTALLED”: if (session) { await db.session.deleteMany({ where: { shop } }); } break; case “CUSTOMERS_DATA_REQUEST”: return await handleCustomersDataRequest( shop_id, shop_domain, customer, orders_requested, data_request ); case “CUSTOMERS_REDACT”: return await handleCustomersRedact( shop_id, shop_domain, customer, orders_to_redact ); case “SHOP_REDACT”: return await handleShopRedact(shop, shop_id); default: throw new Response(“Unhandled webhook topic”, { status: 404 }); } throw new Response(); }; async function handleCustomersDataRequest( shop_id, shop_domain, customer, orders_requested, data_request ) { // Our relevant logs and db queries }
### Questions:1. **File Structure & Naming:** Does our webhook file placement (webhooks.app.scopes_update.jsx) within the routes folder align with best practices?
1. **Silent Failures:** Has anyone experienced similar webhook failures where logs don’t appear in production?
1. **Debugging Approach:** Any suggestions on how we can further troubleshoot missing logs in a deployed environment?
Thanks in advance for any insights!