App reviews, troubleshooting, and recommendations
I've created an app and try to register for webhooks, and then fetch the list of all webhooks. I use this code for this (/server/middleware/auth.js😞
const webhook = new Webhook({ session: session }); webhook.topic = "products/update"; webhook.address = "https://api.service.co/items/update"; webhook.format = "json"; console.log("registering products/update"); try { await webhook.save({ update: true, }); } catch (error) { console.log(error); } const webhookSecond = new Webhook({ session: session }); webhookSecond.topic = "products/create"; webhookSecond.address = "https://api.service.co/items/webhooks"; webhookSecond.format = "json"; console.log("registering products/create"); try { await webhookSecond.save({ update: true, }); } catch (error) { console.log(error); } console.log("getting all webhooks"); try { let webhooks = await Webhook.all({ session: session, }); console.log(webhooks); } catch (error) { console.log(error); }
Everyghing works fine on a development store. However, when I try to laucnh this script on a third-party customer store, then I get this error:
HttpRequestError: Failed to make Shopify HTTP request: FetchError: invalid json response body at https://shopname.myshopify.com/admin/api/2022-04/webhooks.json reason: Unexpected end of JSON input
The app permissions/scopes are: read_checkouts, read_orders, read_inventory, read_products, read_customers
Could you please tell me what can cause this error, and how could it be fixed? Any help is appreciated 🙂
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025