Why does kmw-wait-box window pop up?

Hi all;

I am using KeyManWeb (11.0.222) and loading some keyboards manually, and attaching them to controls manually:

(function(kmw) {
        kmw.init({attachType:'manual'}); //Don't link into any detected input elements automatically
        kmw.addKeyboards('@en'); 
        kmw.addKeyboards('canadian_ms'); 
        kmw.addKeyboards('@gwi');
        kmw.addKeyboards('@scs'); 
        kmw.addKeyboards('@xsl');
        kmw.addKeyboards('@ike');
        kmw.addKeyboards('@ikt'); 
        kmw.addKeyboards('@dgr'); 

        kmw_attachToControl( kmw, "package[name]" );

I’m uncertain why, on occasion, the kmw-wait-box is suddenly appearing with the kmw-wait-background blocking UI access. In the kmw-wait-box is the text:

&keyboardid=en,canadian_ms,gwi,scs,xsl,ike,ikt,dgr (@ symbols removed)

kmw-alert-box

…obviously referencing my keyboards. Nothing can be done on the page until the kmw-wait-box is clicked at which point it disappears.

The box will appear after a few seconds when the master page of my Rails application is loaded.

Any ideas why?

Thanks,
Tim

The wait box is one of those things I want to get rid of! Errors and slow loads should be the responsibility of the site author to deal with and provide UI for, and appropriate events should be made available from KeymanWeb.

@joshua_horton will be able to speak to the specific issue you are experiencing.

Ah, thanks, Marc. So it is simply a wait box that appears when there is a delay in loading from the sources I specify?

In this case:

Tim

Yes, it normally is a wait box related to a delay in loading the keyboard. There are some circumstances in which it can reflect an error. But the message you are seeing is unexpected and it seems to me to be an error. Hoping Joshua can dig deeper.

Ok. Many thanks for the quick clarification, Marc. At a pinch, I will make the source files local to my own server. I’ll be interested in comments from Joshua, though.
Tim

Well, trying to make a local installation of KeyManWeb operated under Ruby on Rails 4.2 with its asset pipeline has proven awkward and I’ve had to abandon this approach for now pending further research. So, I’m still hoping for a way to suppress the wait box (without have to hack the KMW source).

Tim

I’ve documented the issue but I won’t have the time to dig deeper for a while as I will be travelling for the next month; we do welcome pull requests!

Hosting them locally is likely the best solution unless you anticipate frequent updates to the keyboards you want. The kmw-wait-box appears when you’re retrieving keyboards from the cloud services API and the connection’s running slow - generally after a 10 second delay. Unfortunately, the error reported when keyboards aren’t returning quickly isn’t exactly the most user-friendly one - you’ll more often get one about the “Keyman Cloud services,” which tends to occur when requesting basic data for the full keyboard catalog.

When this does occur, if you try to use any of the requested keyboards during that time, you’ll probably find them to be missing. The 10 seconds wait is intended to represent a ‘reasonable’ wait time, after which there’s a good shot that something’s broken with the connection to the cloud API… but sometimes it does end up completing afterward anyway. You may find that the keyboards are suddenly available after dismissing that alert box… since the data only came in after 12 seconds, not 10. It’s hard to determine when the best time to report “timeout” errors is, which is something that will plague any attempt at error reporting.

Hi Joshua;

Thanks very much for your explanation. Yes, I can understand the difficulty with error reporting, and at least I know why the alert box is appearing.

I had a quick attempt at installing the JS source files/CSS etc. into a Rails 4.2 application, but quickly ran into troubles with files not in the right place for asset pipeline. It was frustrating enough to know it wasn’t a clean solution, and I had to abandon it.

Do you, by any chance, have any reference on how to properly host KMW locally that I might be able to pick through/adapt towards Rails? Ultimately, a Rails GEM for KMW would be great, but that’s beyond my Rails experience at this time.

Thanks again,
Tim

https://help.keyman.com/developer/engine/web/11.0/guide/get-started takes you through the basics of how to use KeymanWeb in plain web. It can be a little more complicated with an asset pipeline… I don’t have the time at present to write a Rails GEM (or an NPM package or any other style) for KeymanWeb but it’s something I’d love to do.

https://help.keyman.com/developer/engine/web/11.0/guide/adding-keyboards talks about how to install keyboards locally. The basic difference is that when sourcing from the cloud, metadata is added automatically which you need to supply when installing locally.

You can just reference a keyboard .js file via a script tag as well.

I’ve just run some tests on the KeymanWeb cloud backend and something is running very slowly. That’s triggering the popup of this dialog. If you reference local keyboards only, then KeymanWeb should never touch the cloud api (is that correct, @joshua_horton?).

Will be investigating this further to find out what is slowing down the API so much. Shame I’m getting on a plane shortly…

Hi again, Marc;

Thanks for the links you provided, and your note about the delay on the KMW cloud backend. I’ll be interested in Joshua’s response to the local keyboard question, as that might save me mucking about with a full local installation.

Tim

He’s travelling over the next two weeks, so don’t wait on his reply – it might be delayed!

Roger. Thanks, Mark.

T

That is correct - using only local keyboards should prevent the wait-box from appearing.

This topic was automatically closed after 13 days. New replies are no longer allowed.