Lock widget cannot show up properly with poor network conditions

I throttled the network download speed to 150 kb/s and the lock widget cannot show up properly anymore. It gives an error message saying:

Something went wrong. Please contact technical support.

May I know how to deal with this issue? I also disabled browser caching.


I have several additional questions:

  1. What is the 20 seconds timeout? Is it the loading time (TTFB + download time) of https://{cdn_domain}/client/{client_id}.js?t15065... request?
  2. I don’t know how to specify latency (tried setting latency in chrome but didn’t work, will be great if you can tell me how you did it). But I can reproduce it when I disable browser cache or throttle the network speed to 10 kb/s and reload without cache (the 150kb/s in the original post might not be the real reason, the cache is), both of which requires a very long time to receive (TTFB) and download both lock.min.js and https://{cdn_domain}/client/{client_id}.js?t15065...

It’s very appreciated if you can help me understand how (or which) timeout limit cause this issue.

I could not reproduce the issue just by throttling the download speed, however, if I added sufficient latency to the request that Lock performs to obtain client settings dynamically I could indeed reproduce the error message in question.

In particular, for Lock 10 latest if I simulate a latency greater than 20 seconds for the https://{cdn_domain}/client/{client_id}.js?t15065... request then the issue can be reproduced. With the information provided I’m unsure if this is the request that leads to your observed issue, but I’m inclined to think it is.

If the above is correct then besides ensuring that you’re in the latest version of Lock 10 (so that the 20 seconds timeout is used; previous versions used only five seconds timeout) I’m unsure you can do anything about it while I still wanting to use Lock in such network conditions. The payload size of that request can be influenced by client configuration, for example, number of connections enabled so you may want to review the configuration for your client to see if could be related. In addition, according to this GH issue a future version may allow to obtain these settings in a way that would not be subject to timeout issues, but at this time this is not yet available.

Thanks for your answer @jmangelo . It gave me some clue to the reason. By the way I’m using Lock 10.18 and most of your assumptions are correct. I updated the question with some follow-up questions.

Thanks for your answer @jmangelo . It gave me some clue to the reason. By the way I’m using Lock 10.18 and most of your assumptions are correct. I updated the question with some follow-up questions.

The 20 second timeout is for what you indicated, the loading time of that request. I used the latency settings available in Fiddler auto-responder to introduce an artificial delay of 20+ seconds which then triggered the issue.