"Unexpected end of JSON input" error when using Sitecore Forms in SXA Storefront solution


Description

When using the Storefront Branded default theme, some Sitecore Forms functionality, like validation, and so on, might work incorrectly, and therefore prevent forms from submission. The following error might be displayed on the page:

SyntaxError: Unexpected end of JSON input

This happens due to the fact that Sitecore Forms and Sitecore Experience Commerce JavaScript files conflict.

 

Solution

To resolve the issue, download and install the hotfix compatible with the affected product version: