We've created a site using WAB and deployed it to our server. The background map and services require authentication, so usually an ArcGIS online popup appears asking for credentials. Sometimes though, the site hangs and the popup doesn't appear. If you reload the page it works, though sometimes you have to reload many times before the popup appears. I have seen this behaviour in Chrome, Firefox, and IE, and on multiple machines so it is not platform dependent.
Looking at the developer console, I get an error 'Cannot read property 'toString' of undefined(...)'
It seems postMixInProperties is calling k.getLocalization, which returns undefined. This undefined variable is passed on to h.substitute, which tries to turn it into a string and fails. This kills the loading process, which is why you have to refresh the page.
So, why does getLocalization return a value and sometimes return undefined?
Is there a setting that is causing this to fail, or it is a race condition? Is there anything I can do here, apart from a) keep hitting F5 or b) submit a support request?