Start a new topic

offline appdata sync question

Hello,


I am new to Kinvey and I am playing with the TestDrive sample code to learn about it.


I wanted see how cache and offline of appData work, so I added the setCache() and setOffline() in the original sample code and tested it, but it gives me a fatal exception whenever I run the code and try to save the entity.


My code is almost the same as the code attached in the below post. The occurring error message is the same too.


http://stackoverflow.com/questions/23627151/offline-appdata-sync-in-kinvey-android


Can anyone give me an idea why the exception is thrown whenever I try to save the data?  Thank you.


I am not sure the below exception is also related to the above error.


I analyzed logcat and noticed that the below error occurs at the start of the TestDrive app.



02-09 20:47:12.101 15681-15696/? E/DatabaseUtils: Writing exception to parcel

                                                  java.lang.SecurityException: PID 16127 not recognized.

                                                      at com.amazon.dcp.settings.SettingsProvider.verifyCallerAccess(SettingsProvider.java:477)

                                                      at com.amazon.dcp.settings.SettingsProvider.query(SettingsProvider.java:242)

                                                      at com.amazon.dcp.settings.SettingsProvider.query(SettingsProvider.java:219)

                                                      at android.content.ContentProvider.query(ContentProvider.java:1000)

                                                      at android.content.ContentProvider$Transport.query(ContentProvider.java:214)

                                                      at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)

                                                      at android.os.Binder.execTransact(Binder.java:446)

02-09 20:47:12.101 16127-16167/? E/com.amazon.dcp.settings.BackgroundSynchronizer: Initial sync failed

                                                                                   java.lang.SecurityException: PID 16127 not recognized.

                                                                                       at android.os.Parcel.readException(Parcel.java:1546)

                                                                                       at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)

                                                                                       at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:137)

                                                                                       at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)

                                                                                       at android.content.ContentProviderClient.query(ContentProviderClient.java:153)

                                                                                       at android.content.ContentProviderClient.query(ContentProviderClient.java:119)

                                                                                       at com.amazon.dcp.settings.SettingsCacheUpdater.addSettings(SettingsCacheUpdater.java:126)

                                                                                       at com.amazon.dcp.settings.SettingsCacheUpdater.updateFromContentProvider(SettingsCacheUpdater.java:86)

                                                                                       at com.amazon.dcp.settings.BackgroundSynchronizer$2.run(BackgroundSynchronizer.java:110)

                                                                                       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)

                                                                                       at java.util.concurrent.FutureTask.run(FutureTask.java:237)

                                                                                       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)

                                                                                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

                                                                                       at java.lang.Thread.run(Thread.java:818)

02-09 20:47:12.101 16127-16167/? W/com.amazon.venezia/com.amazon.identity.platform.setting.PlatformSettings: Failed to initialize DCP settings; using defaults

02-09 20:47:12.101 16127-16167/? W/com.amazon.venezia/com.amazon.identity.platform.setting.PlatformSettings: com.amazon.dcp.settings.SettingsSyncException: java.lang.SecurityException: PID 16127 not recognized.

                                                                                                                 at com.amazon.dcp.settings.BackgroundSynchronizer.waitForInitialSync(BackgroundSynchronizer.java:159)

                                                                                                                 at com.amazon.dcp.settings.SettingsCache.waitForInitialSyncImpl(SettingsCache.java:135)

                                                                                                                 at com.amazon.dcp.settings.SettingsCache.waitForInitialSync(SettingsCache.java:117)

                                                                                                                 at com.amazon.identity.platform.setting.DCPSettings.getDCPSettings(DCPSettings.java:27)

                                                                                                                 at com.amazon.identity.platform.setting.PlatformSettings.getInstance(PlatformSettings.java:62)

                                                                                                                 at com.amazon.identity.auth.device.api.MAPInit$1.run(MAPInit.java:94)

                                                                                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)

                                                                                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

                                                                                                                 at java.lang.Thread.run(Thread.java:818)

                                                                                                              Caused by: java.lang.SecurityException: PID 16127 not recognized.

                                                                                                                 at android.os.Parcel.readException(Parcel.java:1546)

                                                                                                                 at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)

                                                                                                                 at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:137)

                                                                                                                 at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)

                                                                                                                 at android.content.ContentProviderClient.query(ContentProviderClient.java:153)

                                                                                                                 at android.content.ContentProviderClient.query(ContentProviderClient.java:119)

                                                                                                                 at com.amazon.dcp.settings.SettingsCacheUpdater.addSettings(SettingsCacheUpdater.java:126)

                                                                                                                 at com.amazon.dcp.settings.SettingsCacheUpdater.updateFromContentProvider(SettingsCacheUpdater.java:86)

                                                                                                                 at com.amazon.dcp.settings.BackgroundSynchronizer$2.run(BackgroundSynchronizer.java:110)

                                                                                                                 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)

                                                                                                                 at java.util.concurrent.FutureTask.run(FutureTask.java:237)

                                                                                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 

                                                                                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 

                                                                                                                 at java.lang.Thread.run(Thread.java:818)  

nvm I added the kinvey.properties file and the error when saving entity is fixed.

Login or Signup to post a comment