Seeing 'Can't find variable: getProductDefaults' error thrown after a call to the Storefront API

New Member
3 0 0



So we've seeing seeing this `Can't find variable: getProductDefaults` error popping up in our error logs and they all seem to happen after a call to the Storefront API.

We are using the JS Buy SDK along with making graph QL calls using the unoptimized bundle. Seems to only happen on mobile (mostly Mobile Safari but some on Android Chrome) but it's been hard to reproduce this issue locally. Since these errors pop up after a Storefront API call and given the name of the missing variable, we're guessing it's something with the Storefront API.

Can anyone verify that this `getProductDefaults` is in fact present in the Storefront API code or JS Buy SDK?



Shopify Staff
Shopify Staff
535 105 105

Hey Ted, 


It sounds plausible although I don't immediately recognize getProductDefaults as being part of the SDK / Storefront API. Do you have a request ID from a response header where I can look into the logs closer to see what could be happening? 

Vix | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit or the Shopify Web Design and Development Blog