question

bbiwer avatar image
bbiwer asked James Tickett commented

Clover apps crash after update

After applying all Clover updates to my test devices (physical and emulator), the Launcher and other Clover apps (Connection History, Metrics, and perhaps others) are crashing. The behavior continued after a factory reset and fresh installation of development APKs.

Android v4.4.2/19 No special setup; connecting to US prod Setups have worked perfectly for months.

Here are the exceptions from device manager:

DatabaseUtils(17195): Writing exception to parcel
DatabaseUtils(17195): java.lang.SecurityException: Access denied to package com.clover.launcher
DatabaseUtils(17195):   at com.clover.engine.authenticator.AccountAuthenticator.checkCallerClover(AccountAuthenticator.java:469)
DatabaseUtils(17195):   at com.clover.engine.providers.AppInfoProvider.query(AppInfoProvider.java:398)
DatabaseUtils(17195):   at android.content.ContentProvider.query(ContentProvider.java:857)
DatabaseUtils(17195):   at android.content.ContentProvider$Transport.query(ContentProvider.java:200)
DatabaseUtils(17195):   at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
DatabaseUtils(17195):   at android.os.Binder.execTransact(Binder.java:404)
DatabaseUtils(17195):   at dalvik.system.NativeStart.run(Native Method)


DatabaseUtils(20169): Writing exception to parcel
DatabaseUtils(20169): java.lang.SecurityException: Forbidden
DatabaseUtils(20169):   at com.clover.metrics.MetricsProvider.authenticate(MetricsProvider.java:203)
DatabaseUtils(20169):   at com.clover.content.Provider.getSQLContext(Provider.java:182)
DatabaseUtils(20169):   at com.clover.content.Provider.update(Provider.java:259)
DatabaseUtils(20169):   at com.clover.content.sync.SyncProvider.update(SyncProvider.java:142)
DatabaseUtils(20169):   at com.clover.metrics.MetricsProvider.update(MetricsProvider.java:302)
DatabaseUtils(20169):   at android.content.ContentProvider$Transport.update(ContentProvider.java:287)
DatabaseUtils(20169):   at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:215)
DatabaseUtils(20169):   at android.os.Binder.execTransact(Binder.java:404)
DatabaseUtils(20169):   at dalvik.system.NativeStart.run(Native Method)


clover(17195): java.lang.SecurityException: Caller com.clover.engine is not Clover or System
clover(17195):  at com.clover.engine.providers.LockScreenProvider.checkBinderPermission(LockScreenProvider.java:220)
clover(17195):  at com.clover.engine.providers.LockScreenProvider.call(LockScreenProvider.java:173)
clover(17195):  at android.content.ContentProvider$Transport.call(ContentProvider.java:325)
clover(17195):  at android.content.ContentResolver.call(ContentResolver.java:1358)
clover(17195):  at com.clover.http.DeviceClient.loadEngineKeyStore(DeviceClient.java:214)
clover(17195):  at com.clover.http.DeviceClient.loadKeyStore(DeviceClient.java:205)
clover(17195):  at com.clover.http.DeviceClient.getSocketFactory(DeviceClient.java:43)
clover(17195):  at com.clover.http.DeviceClient.getSocketFactory(DeviceClient.java:36)
clover(17195):  at com.clover.http.DeviceHttpClient.newInstance(DeviceHttpClient.java:162)
clover(17195):  at com.clover.http.CloverRequester.getInstance(CloverRequester.java:50)
clover(17195):  at com.clover.engine.simplesync.SimpleSyncAdapter.onPerformSync(SimpleSyncAdapter.java:43)
clover(17195):  at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)


BroadcastMessagesSyncAdapter(17195): onPerformSync(SimpleSyncAdapter.java:51): sync failed for authority: com.clover.broadcast_messages
BroadcastMessagesSyncAdapter(17195): java.lang.IllegalArgumentException: Socket factory may not be null
BroadcastMessagesSyncAdapter(17195):    at org.apache.http.conn.scheme.Scheme.<init>(Scheme.java:96)
BroadcastMessagesSyncAdapter(17195):    at com.clover.http.DeviceHttpClient.newInstance(DeviceHttpClient.java:184)
BroadcastMessagesSyncAdapter(17195):    at com.clover.http.DeviceHttpClient.newInstance(DeviceHttpClient.java:162)
BroadcastMessagesSyncAdapter(17195):    at com.clover.http.CloverRequester.getInstance(CloverRequester.java:50)
BroadcastMessagesSyncAdapter(17195):    at com.clover.engine.simplesync.SimpleSyncAdapter.onPerformSync(SimpleSyncAdapter.java:43)
BroadcastMessagesSyncAdapter(17195):    at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)


BrandAssetsSyncAdapter(17195): onPerformSync(SimpleSyncAdapter.java:51): sync failed for authority: com.clover.brand_assets
    BrandAssetsSyncAdapter(17195): java.lang.IllegalArgumentException: Socket factory may not be null
    BrandAssetsSyncAdapter(17195):  at org.apache.http.conn.scheme.Scheme.<init>(Scheme.java:96)
    BrandAssetsSyncAdapter(17195):  at com.clover.http.DeviceHttpClient.newInstance(DeviceHttpClient.java:184)
    BrandAssetsSyncAdapter(17195):  at com.clover.http.DeviceHttpClient.newInstance(DeviceHttpClient.java:162)
    BrandAssetsSyncAdapter(17195):  at com.clover.http.CloverRequester.getInstance(CloverRequester.java:50)
    BrandAssetsSyncAdapter(17195):  at com.clover.engine.simplesync.SimpleSyncAdapter.onPerformSync(SimpleSyncAdapter.java:43)
    BrandAssetsSyncAdapter(17195):  at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)

AndroidRuntime(20736): FATAL EXCEPTION: IntentService[FindLaunchActivityService]
AndroidRuntime(20736): Process: com.clover.launcher, PID: 20736
AndroidRuntime(20736): java.lang.SecurityException: Access denied to package com.clover.launcher
AndroidRuntime(20736):  at android.os.Parcel.readException(Parcel.java:1472)
AndroidRuntime(20736):  at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
AndroidRuntime(20736):  at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:137)
AndroidRuntime(20736):  at android.content.ContentProviderProxy.query(ContentProviderNative.java:413)
AndroidRuntime(20736):  at android.content.ContentProviderClient.query(ContentProviderClient.java:128)
AndroidRuntime(20736):  at android.content.ContentProviderClient.query(ContentProviderClient.java:114)
AndroidRuntime(20736):  at com.clover.launcher.FindLaunchActivityService.getCloverApps(FindLaunchActivityService.java:287)
AndroidRuntime(20736):  at com.clover.launcher.FindLaunchActivityService.updateActivities(FindLaunchActivityService.java:135)
AndroidRuntime(20736):  at com.clover.launcher.FindLaunchActivityService.onHandleIntent(FindLaunchActivityService.java:70)
AndroidRuntime(20736):  at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
AndroidRuntime(20736):  at android.os.Handler.dispatchMessage(Handler.java:102)
AndroidRuntime(20736):  at android.os.Looper.loop(Looper.java:157)
AndroidRuntime(20736):  at android.os.HandlerThread.run(HandlerThread.java:61)

Crash reporting is not working.

CrashSendQueue(17195): run(CrashSendQueue.java:143): failed sending: /storage/emulated/0/crash/sending/crash-be9d12f9-9237-4d87-870c-1bc5e01e0c0e.data
CrashSendQueue(17195): java.lang.SecurityException: Access denied to package com.clover.engine
CrashSendQueue(17195):  at com.clover.engine.providers.MerchantsProvider.query(MerchantsProvider.java:631)
CrashSendQueue(17195):  at android.content.ContentProvider.query(ContentProvider.java:857)
CrashSendQueue(17195):  at android.content.ContentProvider$Transport.query(ContentProvider.java:200)
CrashSendQueue(17195):  at android.content.ContentResolver.query(ContentResolver.java:464)
CrashSendQueue(17195):  at android.content.ContentResolver.query(ContentResolver.java:407)
CrashSendQueue(17195):  at com.clover.engine.EngineMerchantImpl.getEmployeeBundle(EngineMerchantImpl.java:439)
CrashSendQueue(17195):  at com.clover.engine.EngineMerchantImpl.getEmployeeBundle(EngineMerchantImpl.java:433)
CrashSendQueue(17195):  at com.clover.engine.EngineMerchantImpl.getEmployeeBundle(EngineMerchantImpl.java:409)
CrashSendQueue(17195):  at com.clover.engine.EngineMerchantImpl.getActiveEmployee(EngineMerchantImpl.java:404)
CrashSendQueue(17195):  at com.clover.common.util.Utils.updateBaseRequest(Utils.java:719)
CrashSendQueue(17195):  at com.clover.engine.io.http.JsonHttpClient.objectToJson(JsonHttpClient.java:68)
CrashSendQueue(17195):  at com.clover.engine.io.http.JsonHttpClient.execute(JsonHttpClient.java:210)
CrashSendQueue(17195):  at com.clover.engine.io.http.JsonHttpClient.post(JsonHttpClient.java:331)
CrashSendQueue(17195):  at com.clover.engine.crash.CrashSendQueue$1.run(CrashSendQueue.java:137)
CrashSendQueue(17195):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
CrashSendQueue(17195):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
CrashSendQueue(17195):  at java.lang.Thread.run(Thread.java:841)
6 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mike M avatar image Mike M commented ·

Are these crashes all on emulator or did you deploy the dev-apks to the device as well?

0 Likes 0 ·
bbiwer avatar image bbiwer commented ·

Emulator and device have identical symptoms and logged exceptions. I had been using both to successfully deploy and test our app.

0 Likes 0 ·
Mike M avatar image Mike M commented ·

Sorry, I'm having a difficult time in reproducing the issue. Can you please list the versions of the updater and engine apks that you installed?

0 Likes 0 ·
Dan avatar image Dan commented ·

I' m getting the same. I thought my account was in a funny state so I wiped Clover and all installed apks and accounts off the device and tried again. As soon as I open the launcher to login I get this exception. Something has changed and recently. I have tried App Updater 1095 apk, and the Clover engine is the 1467 apk (which were the ones that have been working fine for months). Also tried the latest (App Updater 1096 and Clover engine 1787). Device is a Samsung SM-T560 on Android 4.4.4, apks are pointing to the US.

0 Likes 0 ·
bbiwer avatar image bbiwer commented ·

I am simply using the current version from this website: Development APKs

  • App Updater: com.clover.appupdater-1096.apk
  • Clover: com.clover.engine-1787.apk

The first batch of updates downloaded by the App Updater allows me to login with no crashing. Clover begins to immediately download additional updates, and apps begin to crash if I install these.

I was able to sideload the Register and Orders apps from the website to hobble along in my testing.

0 Likes 0 ·
Show more comments
Jeffrey Blattman avatar image
Jeffrey Blattman answered

We are working on a fix. Stay tuned.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

anthonypinto avatar image
anthonypinto answered James Tickett commented

We had an issue with a recent release that impacts emulators and emulating devices using Clover Engine in the production environment. In order to fix the issue do one of the following:

1) If you have root adb access you can run: adb shell sqlite3 -header -line /data/data/com.android.providers.settings/databases/settings.db "UPDATE secure SET value='prod_us' where name like 'clover_target';

Or

2) Manually download and install the newest version of engine to your device from http://bit.ly/getclover

l

8 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bbiwer avatar image bbiwer commented ·

I manually downloaded the Clover engine APK from this link, and it solved my crashing problem. Thank you.

0 Likes 0 ·
Dan avatar image Dan commented ·

Thanks guys, you scared the pants off me there. :D

0 Likes 0 ·
georgi avatar image georgi commented ·

This is ridiculous. After update everything starts crashing again. Can you please fix the latest release in the dev apks which is com.clover.engine-1804.apk. It is still crashing and this is really unforgivable.

0 Likes 0 ·
Mike M avatar image Mike M commented ·

Another option is to just try retargeting your emulator/device to the applicable environment via the environment script.
https://github.com/clover/clover-andr...

0 Likes 0 ·
James Tickett avatar image James Tickett commented ·

Should be fairly straightforward but just wanted to point out a missing speech mark at the end of the query. I used:

sqlite3 -header -line /data/data/com.android.providers.settings/databases/settings.db "UPDATE secure SET value='prodeu' where name like 'clovertarget'";

Initially worried as it crashed a couple more times (probably tried too soon), but a moment later I could open "Add Account" without crashes and log in successfully.

Thanks

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community