0
votes

I develop native Windows 10 client LOB apps for a customer.
The environment: Windows 10 Pro (on the mobile clients / tablets and on the developer box), Visual Studio 2015 Professional with Update 3, all updates and patches installed. The client app uses the most recent „IBM MobileFirst Platform SDK for Windows 8 Universal and Windows 10 Universal platforms“ version 8.0.2017012514. On a separate machine in my network I have the MobileFirst Platform Server with a Java Adapter.

The application works very well when the application is online and the MobileFirst Platform 8.0 server can be reached.

If the client looses its network connectivity (e.g. WLAN out of reach or MFP Server offline), then all Requests to the Server hang indefinitely. See the following sample C# code:

    public async Task CallMethodMfp8()
    {
        Value = "Start MobileFirst Method Call " + DateTime.Now + "\n" + Value;
        StringBuilder uriBuilder = new StringBuilder().Append("/adapters")
            .Append("/MaximoAdapter")
            .Append("/admin")
            .Append("/heartbeat");
        WorklightResourceRequest rr = _client.ResourceRequest(new 
                   Uri(uriBuilder.ToString(), UriKind.Relative), "GET", "");
        rr.Timeout = 500;

        WorklightResponse resp = await rr.Send();

        if (!resp.Success)
        {
            Value = "NOT SUCCESSFULL " + resp.Message + "\n" + Value;
        }
        else
        {
            Value = "Request OK" + resp.ResponseText + "\n" + Value;
        }
        Value = "Method Call Finished " + DateTime.Now + "\n" + Value;
    }

The call to rr.Send() does not return if the device is offline. Also the Timeout parameter seems to have no effect (according to the docs this should be the timeout in Milliseconds).

This behaviour has a negative impact on the usability of the client application.

From reading the docs I would expect that the call returns after the configured timeout and that the resp.Success field is false.

I assume that the call to WorklightResourceRequest.Send() is not supposed to hang when offline and that this is a bug in the MobileFirst Platform library.

Is there a workaround for this or am I using the library incorrectly?

1
Usually the default time out for Windows UWP application is 90 seconds. Is your app is not showing any response back within 90 seconds ?Vittal Pai
No, the app simply hangs forever (and I have waitet several hours). Even if the network returns the call does not continue.Wolfgang Fiedler
We are able to recreate this issue, This issue will be fixed in our next release. Thank you ..Vittal Pai
Do you have any guesstimate, when the next release will be ready? And I know I don't need to tell you this but there a a lot of different reasons why a client can be offline or why the MobileFirst Server cannot be connected. I am sure my customer will find them and test them all...Wolfgang Fiedler
Remember that you can always open a PMR to have a fix delivered to you until the iFix is ready for publicationIdan Adar

1 Answers

0
votes

The issue is fixed and the fix will be published in next IFix.