Layer 7 API Management

MAS Cordova on IOS compiled for Android

  • 1.  MAS Cordova on IOS compiled for Android

     
    Posted 05-09-2019 05:53 PM

    Trying to use the MAS foundations, 

     

    The Cordova Code is being written on an mac osx 

    But being compiled for Android (possibly IOS as well but the focus has been Android).

    Failure occurring.
    https://github.com/CAAPIM/Sample-App-MAS-Cordova-Android-Foundation


    Getting following error,
    { "errorCode":-1, "errorMessage":"java.lang.reflect.InvocationTargetException","errorInfo":"com.ca.mas.core.datasource.DataSourceException: java.lang.reflect.InvocationTargetException\n\tat com.ca.mas.core.datasource.DataSourceFactory.getStorage(DataSourceFactory.java:25)\n\tat com.ca.mas.core.store.StorageProvider.createTokenManager(StorageProvider.java:87)\n\tat com.ca.mas.core.store.StorageProvider.<init>(StorageProvider.java:41)\n\tat 
    com.ca.mas.core.store.StorageProvider.getInstance(StorageProvider.java:51)\n\tat com.ca.mas.foundation.MASUser.login(MASUser.java:109)\n\tat 
    com.ca.mas.cordova.core.MASPluginUser.loginWithAuthCredentialsUsernamePassword(MASPluginUser.java:494)\n\tat com.ca.mas.cordova.core.
    MASPluginUser.execute(MASPluginUser.java:79)\n\tat org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)\n\tat org.apache.cordova.
    PluginManager.exec(PluginManager.java:132)\n\tat org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)\n\tat org.apache.cordova.engine.
    newInstance(Constructor.java:343)\n\tat com.ca.mas.core.datasource.DataSourceFactory.getStorage(DataSourceFactory.java:23)\n\t... 14 more\nCaused 
    by: java.lang.IllegalArgumentException: Account type cannot be null.\n\tat com.ca.mas.core.storage.sharedstorage.AccountManagerUtil.<init>
    (AccountManagerUtil.java:44)\n\tat com.ca.mas.core.storage.sharedstorage.MASSharedStorage.getStorageProvider(MASSharedStorage.java:167)\n\tat 
    com.ca.mas.core.storage.sharedstorage.MASSharedStorage.<init>(MASSharedStorage.java:69)\n\tat com.ca.mas.core.storage.MASSecureSharedStorage.<init>
    (MASSecureSharedStorage.java:28)\n\tat com.ca.mas.core.datasource.MASSecureStorageDataSource.<init>(MASSecureStorageDataSource.java:53)\n\t... 
    17 more\n"}

     

    The above Account type cannot be null seems to indicate to me that the steps below Need to be followed.

    http://mas.ca.com/docs/android/1.9.00/guides/#step-6-configure-secure-account-manager-storage 

     

    Problem is that the steps referenced are for Android (like android studio) being written on Windows. 
    And they require steps through Cordova tool either specific steps within Cordova on Mac or from the Cordova command line post compile. 
    Since it stated any of the changes like updating the android manifest referenced seem to be written by the compile option for Android within Cordova. When it builds out the android app.

     

    Thanks...