Worklight Server/DB down, Hybrid app shows a dialog with "Server is temporarily unavailable". No error callback?

68 views Asked by At

we have a case where the Worklight Server's (v6.1.0.02-20150509) database was down, and so the server could not connect and so the hybrid app then presented the below dialog.

We did not provide this dialog and its content in the app, so this must come from the Worklight Client framework.

Since the phone is set to French, you see that there is some English/French mix in the text.

What we are wondering is whether there is a way to catch this?
There seems to be no callback and it seems the adapter call did not properly timeout and thus did not properly return an error to our code.

Hybrid Client App shows this native Dialog error


Also, why is the Worklight framework showing a visual error dialog? A framework should provide callbacks and hooks, and not visual UI that the app developers did not create.

1

There are 1 answers

0
Idan Adar On

Christian,
Using IBM Worklight Studio 6.1.0.02-20150608-1406 I followed these two scenarios:

  1. Use WL.Client.connect from wlCommonInit() while the server is running but the MySQL database of the server (WRKLGHT) is shut down

    In this scenario the connect failed and I reached its onFailure callback.

  2. Use WL.Client.invokeProcedure from wlCommonInit() (instead of the connect) while the server is running but the MySQL database server of the server (WRKLGHT) is shut down. The procedure calls a SQL adapter attempting to retrieve data from the same database server.

    In this scenario the adapter invocation failed and I reached its onFailure callback.

So clearly what you are experiencing is not happening here using the latest build version I mentioned at the beginning.

  1. Try with the same build (see my email to you)
  2. Provide clearer reproduction steps