function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
karkar 

Encountering issues when I run Salesforce Hybrid sample app "Account Editor "

Installed Salesforce Mobile SDK for android and when I try to run the account editor sample app thru an emulator in eclipse there were few errors thrown. Below is the error log

 

08-16 03:35:48.848: I/SalesforceOAuthPlugin.getAuthCredentials(1484): getAuthCredentials called
08-16 03:35:48.858: I/SalesforceOAuthPlugin.getAuthCredentials(1484): getAuthCredentials successful
08-16 03:35:50.078: I/SmartStorePlugin.execute(1484): action: pgRegisterSoup, jsVersion: 2.0.0
08-16 03:35:50.468: D/CordovaLog(1484): onDeviceReady: cordova ready
08-16 03:35:50.468: I/Web Console(1484): onDeviceReady: cordova ready at file:///android_asset/www/auth.js:18
08-16 03:35:50.468: D/CordovaLog(1484): -----> Calling smartstoreClient:registerSoup
08-16 03:35:50.468: I/Web Console(1484): -----> Calling smartstoreClient:registerSoup at file:///android_asset/www/smartsync.js:46
08-16 03:35:50.468: D/CordovaLog(1484): SmartStore.registerSoup: 'accounts' indexSpecs: [{"path":"Id","type":"string"},{"path":"__local__","type":"string"},{"path":"Name","type":"string"}]
08-16 03:35:50.468: I/Web Console(1484): SmartStore.registerSoup: 'accounts' indexSpecs: [{"path":"Id","type":"string"},{"path":"__local__","type":"string"},{"path":"Name","type":"string"}] at file:///android_asset/www/cordova.force.js:479
08-16 03:35:50.468: D/CordovaLog(1484): processMessage failed: Message: S01 com.salesforce.oauth1505526920 {"orgId":"00D90000000gciSEAQ","accessToken":"00D90000000gciS!ARAAQALB2O_OolMtXAYLetZgOgkU0eU54wL2hzdPUqGhiI7kAdNmSGk36qxxURPjjUVD7xA_4PNJo1YmpAAW1Fu_F5U4sCjh","userAgent":"SalesforceMobileSDK\/2.0.0 android mobile\/4.3 (sdk) AccountEditor\/1.0 Hybrid","userId":"00590000001AQp8AAG","loginUrl":"https:\/\/login.salesforce.com","identityUrl":"https:\/\/login.salesforce.com\/id\/00D90000000gciSEAQ\/00590000001AQp8AAG","refreshToken":"5Aep8617VFpoP.M.4usUqiimqAaqA6tJ._o3CqEtwMML3RbiIIihvpLnpg_MEpcdTDLJaMoBh_SIntAlHL.lqto","clientId":"3MVG9Y6d_Btp4xp7noHGI_t9cb_HuWT0TgWFj_qWK8KIoQDGwKtDZbat7OHXvlnYnNJqpnbGf72.j2Fbd.hf4","instanceUrl":"https:\/\/ap1.salesforce.com"}
08-16 03:35:50.468: I/Web Console(1484): processMessage failed: Message: S01 com.salesforce.oauth1505526920 {"orgId":"00D90000000gciSEAQ","accessToken":"00D90000000gciS!ARAAQALB2O_OolMtXAYLetZgOgkU0eU54wL2hzdPUqGhiI7kAdNmSGk36qxxURPjjUVD7xA_4PNJo1YmpAAW1Fu_F5U4sCjh","userAgent":"SalesforceMobileSDK\/2.0.0 android mobile\/4.3 (sdk) AccountEditor\/1.0 Hybrid","userId":"00590000001AQp8AAG","loginUrl":"https:\/\/login.salesforce.com","identityUrl":"https:\/\/login.salesforce.com\/id\/00D90000000gciSEAQ\/00590000001AQp8AAG","refreshToken":"5Aep8617VFpoP.M.4usUqiimqAaqA6tJ._o3CqEtwMML3RbiIIihvpLnpg_MEpcdTDLJaMoBh_SIntAlHL.lqto","clientId":"3MVG9Y6d_Btp4xp7noHGI_t9cb_HuWT0TgWFj_qWK8KIoQDGwKtDZbat7OHXvlnYnNJqpnbGf72.j2Fbd.hf4","instanceUrl":"https:\/\/ap1.salesforce.com"} at file:///android_asset/www/cordova-2.3.0.js:1166
08-16 03:35:50.468: D/DroidGap(1484): onMessage(spinner,stop)
08-16 03:35:50.478: D/CordovaLog(1484): processMessage failed: Error: Error: Error calling method on NPObject.
08-16 03:35:50.478: I/Web Console(1484): processMessage failed: Error: Error: Error calling method on NPObject. at file:///android_asset/www/cordova-2.3.0.js:1167

There is a blank white screen once logged in, and nothing else is displayed...

 

Kevin HawkinsKevin Hawkins

This issue has been posted on the Issues site for the Mobile SDK.

akhilesh_sfdcakhilesh_sfdc
Which OS and version are you using? There's a known issue with Android 4.3 (API 18) which we will be fixing in the upcoming release.
karkar

Tried with android 4.2.2 first and then now changed to android 2.3.3 API 10 , even then I'm facing error.

Error Log :

 

08-19 13:38:11.436: I/SalesforceOAuthPlugin.execute(1684): action: getAuthCredentials, jsVersion: 2.0.0
08-19 13:38:11.436: I/SalesforceOAuthPlugin.getAuthCredentials(1684): getAuthCredentials called
08-19 13:38:11.456: I/SalesforceOAuthPlugin.getAuthCredentials(1684): getAuthCredentials successful
08-19 13:38:11.706: D/CordovaLog(1684): -----> Calling smartstoreClient:registerSoup
08-19 13:38:11.706: I/Web Console(1684): -----> Calling smartstoreClient:registerSoup at file:///android_asset/www/smartsync.js:46
08-19 13:38:11.706: D/CordovaLog(1684): SmartStore.registerSoup: 'accounts' indexSpecs: [{"path":"Id","type":"string"},{"path":"__local__","type":"string"},{"path":"Name","type":"string"}]
08-19 13:38:11.706: I/Web Console(1684): SmartStore.registerSoup: 'accounts' indexSpecs: [{"path":"Id","type":"string"},{"path":"__local__","type":"string"},{"path":"Name","type":"string"}] at file:///android_asset/www/cordova.force.js:479
08-19 13:38:11.726: D/CordovaLog(1684): ------> Calling errorCB for smartstoreClient:registerSoup
08-19 13:38:11.726: I/Web Console(1684): ------> Calling errorCB for smartstoreClient:registerSoup at file:///android_asset/www/smartsync.js:37
08-19 13:38:11.738: D/CordovaLog(1684): -----> Calling smartstoreClient:registerSoup
08-19 13:38:11.738: I/Web Console(1684): -----> Calling smartstoreClient:registerSoup at file:///android_asset/www/smartsync.js:46
08-19 13:38:11.746: D/CordovaLog(1684): SmartStore.registerSoup: 'original-accounts' indexSpecs: [{"path":"Id","type":"string"},{"path":"__local__","type":"string"}]
08-19 13:38:11.746: I/Web Console(1684): SmartStore.registerSoup: 'original-accounts' indexSpecs: [{"path":"Id","type":"string"},{"path":"__local__","type":"string"}] at file:///android_asset/www/cordova.force.js:479
08-19 13:38:11.758: D/CordovaLog(1684): ------> Calling errorCB for smartstoreClient:registerSoup
08-19 13:38:11.758: I/Web Console(1684): ------> Calling errorCB for smartstoreClient:registerSoup at file:///android_asset/www/smartsync.js:37
08-19 13:38:11.996: D/CordovaLog(1684): -> In Force.SObjectCollection:sync method=read
08-19 13:38:11.996: I/Web Console(1684): -> In Force.SObjectCollection:sync method=read at file:///android_asset/www/smartsync.js:1203
08-19 13:38:12.050: D/CordovaLog(1684): --> In Force.fetchSObjects:config.type=mru
08-19 13:38:12.050: I/Web Console(1684): --> In Force.fetchSObjects:config.type=mru at file:///android_asset/www/smartsync.js:1047
08-19 13:38:12.068: D/CordovaLog(1684): ---> In Force.fetchSObjectsFromServer:config={"type":"mru","sobjectType":"Account","fieldlist":["Id","Name","Industry","Phone","Owner.Name","LastModifiedBy.Name","LastModifiedDate"],"orderBy":"LastModifiedDate","orderDirection":"DESC"}
08-19 13:38:12.068: I/Web Console(1684): ---> In Force.fetchSObjectsFromServer:config={"type":"mru","sobjectType":"Account","fieldlist":["Id","Name","Industry","Phone","Owner.Name","LastModifiedBy.Name","LastModifiedDate"],"orderBy":"LastModifiedDate","orderDirection":"DESC"} at file:///android_asset/www/smartsync.js:968
08-19 13:38:12.087: D/CordovaLog(1684): -----> Calling forcetkClient:metadata
08-19 13:38:12.087: I/Web Console(1684): -----> Calling forcetkClient:metadata at file:///android_asset/www/smartsync.js:46
08-19 13:38:12.526: D/DroidGap(1684): onMessage(spinner,stop)
08-19 13:38:12.756: D/CordovaLog(1684): + Navigating to []
08-19 13:38:12.756: I/Web Console(1684): + Navigating to [] at file:///android_asset/www/stackrouter.js:18
08-19 13:38:13.986: D/CordovaLog(1684): ------> Calling successCB for forcetkClient:metadata
08-19 13:38:13.986: I/Web Console(1684): ------> Calling successCB for forcetkClient:metadata at file:///android_asset/www/smartsync.js:27
08-19 13:38:14.006: D/CordovaLog(1684): -----> Calling forcetkClient:query
08-19 13:38:14.006: I/Web Console(1684): -----> Calling forcetkClient:query at file:///android_asset/www/smartsync.js:46
08-19 13:38:14.536: D/CordovaLog(1684): ------> Calling successCB for forcetkClient:query
08-19 13:38:14.536: I/Web Console(1684): ------> Calling successCB for forcetkClient:query at file:///android_asset/www/smartsync.js:27
08-19 13:38:14.556: D/CordovaLog(1684): ----> In StoreCache:saveAll records.length=11 noMerge:false
08-19 13:38:14.556: I/Web Console(1684): ----> In StoreCache:saveAll records.length=11 noMerge:false at file:///android_asset/www/smartsync.js:252
08-19 13:38:14.576: D/CordovaLog(1684): -----> Calling smartstoreClient:runSmartQuery
08-19 13:38:14.576: I/Web Console(1684): -----> Calling smartstoreClient:runSmartQuery at file:///android_asset/www/smartsync.js:46
08-19 13:38:14.585: D/CordovaLog(1684): SmartStore.runSmartQuery: smartSql: SELECT {accounts:_soup} FROM {accounts} WHERE {accounts:Id} IN ('0019000000RiAHeAAN','0019000000RiAHZAA3','0019000000RhyhAAAR','0019000000RhygIAAR','0019000000RJXEyAAP','0019000000RJXEoAAP','0019000000RJXBnAAP','0019000000RJX9XAAX','0019000000GROXPAA5','0019000000GROXKAA5','0019000000F9NsJAAV')
08-19 13:38:14.585: I/Web Console(1684): SmartStore.runSmartQuery: smartSql: SELECT {accounts:_soup} FROM {accounts} WHERE {accounts:Id} IN ('0019000000RiAHeAAN','0019000000RiAHZAA3','0019000000RhyhAAAR','0019000000RhygIAAR','0019000000RJXEyAAP','0019000000RJXEoAAP','0019000000RJXBnAAP','0019000000RJX9XAAX','0019000000GROXPAA5','0019000000GROXKAA5','0019000000F9NsJAAV') at file:///android_asset/www/cordova.force.js:513
08-19 13:38:14.636: D/CordovaLog(1684): ------> Calling errorCB for smartstoreClient:runSmartQuery
08-19 13:38:14.636: I/Web Console(1684): ------> Calling errorCB for smartstoreClient:runSmartQuery at file:///android_asset/www/smartsync.js:37

This is the new error log...

 

akhilesh_sfdcakhilesh_sfdc
Based on the logs it seems that you may not be using the latest (>2.0) version of Smartstore and SDK. Can you check you have the latest code lines. How did you set up the account editor sample app?
karkar

Its working now... issued solved. had probs with library files...

agusagus

Could you tell me what solution did you find? I've been trying to develop a hybrid app with angularjs and smartstore and ended up in the same place as you. I would be very grateful if you could share a bit about it. Thanks in advance.

karkar

The libs were not properly imported. I created a new workspace and again imported the SDK, then the Smartstore and then the account editor sample app alone.. Few issues will paths will be there, if you give the correct path it will be working great...