Skip to Content
0
Jan 28, 2020 at 01:11 PM

Error whilst running Kapsel for Android

69 Views

Hello Guys,

I have built a small application in cordova to fetch and display information from SAP using SMP Kapsel SDK 3.1. My application configurations are as follows

SDK version : 3.1

Cordova version : 8.1.2

Android version : 7.0.0

iOS version : 5.1.1

We are connecting to SAP Mobile Services using Kapsel and we are facing an issue while registration in Android.

We are getting the following error

{"errorDomain":"MAFLogonCoreErrorDomain","errorMessage":"com.sap.smp.client.httpc.HttpConversationManager$ConversationFlow$ReceiveEvent@75d627c","errorCode":"-1"}",

My code is as follows

var appId = "com.app.name";
var serverContext = {
"serverHost": "mobile-XXXXXXXXX.ap1.hana.ondemand.com",     
"https": "true",     
"serverPort": "443",     
"custom": {
        "hiddenFields": ["farmId", "resourcePath", "securityConfig", "serverPort", "https"],
        // "disablePasscode": true
},
    "auth": [{ 
        "type": "saml2.web.post"
    }]
}; 

var applicationContext = null; 

function showApp() {
    $(location).attr('href', './dashboard.html');
}

function logonSuccessCallback(result) {
   applicationContext = result; 
   showApp(); 
}

function logonErrorCallback(error) { 
      alert("An error occurred:  " + JSON.stringify(error,null,4)); 
}

function register() { 
    sap.Logon.init(logonSuccessCallback, logonErrorCallback, appId, serverContext);  
}

document.addEventListener("deviceready", init, false); 



Could you please let me know what the cause for the error message is. The app works beautifully on iOS. I am testing on an Android emulator with Android Q and a physical device with Android Marshmellow.