Search code examples
androidibm-mobilefirst

MobileFirst 6.3 Network Debug Issue


I am using MobileFirst 6.3 for an application, when building an Android version and trying to monitor XHR Query on Chrome Dev Tool network, queries are not showing,

I used to see them with previous worklight versions.

I saw that there is a new plugin WLNativeXHRPlugin in 6.3 + versions, is it related to my issue?

Any Help ?


Solution

  • The XHR requests have been moved from the JavaScript layer to the native layer, and this is why you do not see them in the Network tab in the Chrome dev tools.

    You can bring them back, but you must then not forget to remove this code from the app when you go to production. It is also not supported and can break/stop working at any moment, any effect that may happen to your app will not be supported.

    Add the following to the bottom in common\js\initOptions.js:

    WL.androidProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;
    WL.iphoneProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;
    WL.ipadProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;
    WL.windowsphone8ProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;
    

    Should then work.