Hello,
Issue was caused by the Delay JavaScript execution option of the cache plugin. If the option is disabled gallery works fine and there are no errors. Once I enabled option I see JS error from the WooCommerce plugin and from our theme. SO, keep the option disabled.
Regards