question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to sync Shopify products in Sanity, serverless functions error out.

See original GitHub issue

Hello!

This project is great, I appreciate your work and documentation! I’m having some issues getting the Sanity product sync working. I feel like I’ve been diligent about getting the correct API keys tokens and passwords, I’ve deployed to Vercel.

I’ve tried sending a test webhook to the product-update API route and get errors in the Vercel dashboard. I’m not sure if that would be related to the issue though.

Here’s a repo if that helps.

Any insight on how to get this working or if there’s something I’m missing in your documentation would be helpful!

Thank you!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ndimatteocommented, May 10, 2021

Hey @mariussunde glad you were able to figure out what the issue was!

As for the demo products and sync’ing existing products:

  1. The product sync happens when the shopify webhook is triggered. The webhook gets triggered when an individual product is created, updated, or deleted. That’s why the products you added after everything was set up correctly sync’d. For your existing products, all you need to do is make a small change to each of them in Shopify to trigger the webhook and re-sync them! I’d recommend using the bulk-edit tool in Shopify to make a small change, like adding an extra space to the end of the Description field.
  2. The demo products are not tied to any Shopify store or the sync’ing mechanism. Simply delete them from your Sanity Studio to remove them 😃

I hope that helps!

1reaction
ndimatteocommented, May 7, 2021

Hey there @mariussunde!

It sounds like the SHOPIFY_WEBHOOK_INTEGRITY is not getting passed into the /api/shopify/product-update route where it’s used here.

This tells me it may not be added to your Vercel project properly. Make sure you’ve not only added your .env variables locally, but also on your deployed vercel instance (where the webhook is actually going to be triggering our API endpoint).

Make sure you added them there and spelled everything correctly: image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sanity Connect for Shopify
Direct sync. This will synchronize all products, product variants and collections as documents to your content lake. You can check the reference below...
Read more >
Sanity Connect for Shopify & Hydrogen - YouTube
Your browser can't play this video. ... " Sanity Connect for Shopify & Hydrogen: Powering storefronts” (Kap & Knut, Sanity.io Virtual Meetup).
Read more >
Inventory syncing failed - Shopify Community
We have a private APP to let our vendor to do inventory syncing but never succeed. Here are some details: 1. The API...
Read more >
sane-shopify - Bountysource
Describe the bug. Hello, sometimes when syncing from "Shopify" tab panel, when I have products in the draft (so, it will exist both...
Read more >
ps1 cannot be loaded because running scripts is disabled on ...
Try this command in terminal(Visual Studio Code terminal or any IDE you are using) and problem will solve
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found