Shopify / slate

Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
https://shopify.github.io/slate
MIT License
1.28k stars 364 forks source link

Product Detail Page on Safari - JS issue #1003

Open fhorstmann opened 5 years ago

fhorstmann commented 5 years ago

getting two js errors on the product detail page: 1). the product js script fails to load and shows a 401 (Unauthorized) error and 2). An Unhandled promise rejection SyntaxError (DOM Exception 12). I haven't touched the core theme files so I'm not sure why these errors would show up only in Safari unless the theme has a bug? Chrome and Firefox don't show any errors in the console. The error prevents me from being able to add anything in the cart and when doing so sends me to a new page /cart/add that says, "Parameter Missing or Invalid: Required parameter missing or invalid: id".

screenshot 2019-03-05 21 32 46

dan-gamble commented 5 years ago

This will be an issue for https://github.com/Shopify/starter-theme

garrettboatman commented 5 years ago

This is happening for me too, on a fresh build. Any ideas?

dan-gamble commented 5 years ago

Do you have a better stack trace to say which local file the error is coming from?

garrettboatman commented 5 years ago

@dan-gamble Fresh starter kit project. No errors until Add to Cart button is clicked.

theme-product.js?c125:105 Uncaught Error: is empty.
    at _validateSerializedArray (theme-product.js?c125:105)
    at _createOptionArrayFromOptionCollection (theme-product.js?c125:63)
    at getVariantFromSerializedArray (theme-product.js?c125:31)
    at ProductForm.variant (theme-product-form.js?94a9:100)
    at ProductForm._getProductFormEventData (theme-product-form.js?94a9:181)
    at ProductForm._onSubmit (theme-product-form.js?94a9:145)

Then, POST https://localhost:3001/cart/add 400:bad request

And then it kicks me to /cart/add: Screenshot 2019-03-27 17 00 31