Problems fetching products

Hi all,

I am using Gatsby as a Static site generator with a plugin gatsby-plugin-snipcartv3(v3.0.22).
There’s two problems that I am facing
1/ (SOLVED-see comment below) The overlay does not always appear. If a refresh the page it always works the first time.
In the console I can see the following errors
The #snipcart div was removed from the document. This may happen when a frontend library is used to render the div. You should only render it once, or it might prevent the cart from working.
+
snipcart.js:46 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/cart".
2/ Fetch products does not seem to work in the Snipcart ‘Manage Store -Products > Fetch’. Using my local development + ngrok + ngrok url in Fetch Products, it works. But not with the original (live) url … I am using Cloudfront (all edges) as CDN.

Thanks !

Hi, I was able to solve the NavigationDuplicated issue. Root cause was that the gatsby plugin injected a <div id="snipcart"> and I also had one for the Order Custom fields. As a solutiuon, I disabled the plugin and now use gatsby-ssr to inject the snipcart code. The Fetch Products issue remains. It would be good to get some support … :thinking:

Okay, I found it. It was a DNS misconfiguration…

1 Like

Thanks for letting us know @Dauli!

I have the same issue. Ads to cart button does not work and console showing the same errors as yours. Could you please explain what was your dns issue?

DNS … :relaxed: I only had a Simple AAAA record. I also needed to create a Simple A-record…Problem solved.