Search code examples
ibm-mobilefirstmobilefirst-server

Preview not working properly in MFP8.0


I'm developing an application that just connects to MFP 8.0 server but when I run the app using the MFP web simulator the log says "getCachedAccessToken for scope failed: undefined" . But when I run the same application using the emulator/device it works fine.

function wlCommonInit() {
    WLAuthorizationManager.obtainAccessToken().then(
        function () {       
            alert ("You are now connected to the server");
        },
        function(result) {
                    alert("Not able to connect: "+ JSON.stringify(result));
        }
    );
}

Is there any way to test the MFP server connection in the MFP web simulator?


Solution

  • This is a known limitation of the 8.0 release.
    You can read more about it, here: http://engtest01w.francelab.fr.ibm.com:9090/support/knowledgecenter/SSHS8R_8.0.0/com.ibm.worklight.dev.doc/wl_studio_tools/topics/cmbswl.html

    Tokens are part of the OAuth flow.

    As a workaround, you can use a simulator.