A bug story:
I faced an issue on a checkout that the JS error happen when selecting a shipping method.
When I check if it has an error in XHR ajax calls. Then I found https://x-x-x.com/rest/dk/V1/guest-carts/xxx–xxx/shipping-information
Problem is: total information is passed to js object quote_totals is null – cause by a problem of XHR calls.