1

In visual studio 2015 When I try to run the sample sales-force contactexplorer application , I got the following error:

Here is my method:

function onDeviceReady() {
cordova.require("com.salesforce.util.logger").logToConsole("onDeviceReady:Cordova ready");
//Call getAuthCredentials to get the initial session credentials
cordova.require("com.salesforce.plugin.oauth").getAuthCredentials(salesforceSessionRefreshed, getAuthCredentialsError);
//register to receive notifications when autoRefreshOnForeground refreshes the sfdc session
document.addEventListener("salesforceSessionRefresh",salesforceSessionRefreshed,false);
//enable buttons
regLinkClickHandlers();
}

Here is my output:

jslog: onDeviceReady: Cordova ready

missing exec:com.salesforce.oauth.getAuthCredentials

TypeError: Cannot read property 'getAuthCredentials' of undefined(…) TypeError: Cannot read property 'getAuthCredentials' of undefined at module.exports.exec at exec (com.salesforce.util.exec.js:34) at Object.getAuthCredentials (com.salesforce.plugin.oauth.js:56) at onDeviceReady (index.html:64) at Channel.fire (cordova.js:820) at cordova.js:229 com.salesforce.oauth getAuthCredentials

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.