2

I have been trying to submit 2 separate apps into the Amazon App store but they keep being rejected. Here is the stack trace for the first:

11-05 11:14:36.488 E/AndroidRuntime(28128): FATAL EXCEPTION: AsyncTask #1
11-05 11:14:36.488 E/AndroidRuntime(28128): java.lang.RuntimeException: An error occured while executing doInBackground()
11-05 11:14:36.488 E/AndroidRuntime(28128): at android.os.AsyncTask$3.done(AsyncTask.java:200)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.lang.Thread.run(Thread.java:1096)
11-05 11:14:36.488 E/AndroidRuntime(28128): Caused by: java.lang.VerifyError: com.companionfree.WLThemeViewer.AmazonClientManager
11-05 11:14:36.488 E/AndroidRuntime(28128): at com.companionfree.WLThemeViewer.UpdateDBs.doInBackground(UpdateDBs.java)
11-05 11:14:36.488 E/AndroidRuntime(28128): at com.companionfree.WLThemeViewer.UpdateDBs.doInBackground(UpdateDBs.java)
11-05 11:14:36.488 E/AndroidRuntime(28128): at android.os.AsyncTask$2.call(AsyncTask.java:185)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
11-05 11:14:36.488 E/AndroidRuntime(28128): ... 4 more

And the relevant logcat for the second

10-12 15:41:48.929 D/dalvikvm( 2451): GC_FOR_MALLOC freed 8099 objects / 524416 bytes in 34ms
10-12 15:41:49.327 I/RPC     ( 1563): rx thread timeout (1 clients):
10-12 15:41:49.828 I/RPC     ( 1563): rx thread timeout (1 clients):
10-12 15:41:50.089 I/ActivityManager( 1563): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.companionfree.pushup/.MainScreen }
10-12 15:41:50.099 D/SurfaceFlinger( 1563): Layer::setBuffers(this=0xeafa50), pid=1563, w=1, h=1
10-12 15:41:50.099 D/SurfaceFlinger( 1563): Layer::setBuffers(this=0xeafa50), pid=1563, w=1, h=1
10-12 15:41:50.139 D/SurfaceFlinger( 1563): Layer::requestBuffer(this=0xeafa50), index=0, pid=1563, w=480, h=800 success
10-12 15:41:50.189 I/ActivityManager( 1563): Start proc com.companionfree.pushup for activity com.companionfree.pushup/.MainScreen: pid=2644 uid=10129 gids={1015, 3003}
10-12 15:41:50.319 I/RPC     ( 1563): rx thread timeout (1 clients):
10-12 15:41:50.359 W/dalvikvm( 2644): VFY: Lcom/companionfree/pushup/WorkoutDbAdapter; is not instance of Landroid/app/Activity;
10-12 15:41:50.369 W/dalvikvm( 2644): VFY: bad arg 0 (into Landroid/app/Activity;)
10-12 15:41:50.369 W/dalvikvm( 2644): VFY:  rejecting call to Lcom/amazon/android/Kiwi;.onActivityResult (Landroid/app/Activity;IILandroid/content/Intent;)Z
10-12 15:41:50.369 W/dalvikvm( 2644): VFY:  rejecting opcode 0x71 at 0x0000
10-12 15:41:50.369 W/dalvikvm( 2644): VFY:  rejected Lcom/companionfree/pushup/WorkoutDbAdapter;.onActivityResult (IILandroid/content/Intent;)V
10-12 15:41:50.369 W/dalvikvm( 2644): Verifier rejected class Lcom/companionfree/pushup/WorkoutDbAdapter;
10-12 15:41:50.369 D/AndroidRuntime( 2644): Shutting down VM
10-12 15:41:50.369 W/dalvikvm( 2644): threadid=1: thread exiting with uncaught exception (group=0x40025a70)
10-12 15:41:50.369 E/AndroidRuntime( 2644): FATAL EXCEPTION: main
10-12 15:41:50.369 E/AndroidRuntime( 2644): java.lang.VerifyError: com.companionfree.pushup.WorkoutDbAdapter
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at com.companionfree.pushup.MainScreen.onCreateMainScreen(MainScreen.java)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at com.companionfree.pushup.MainScreen.onCreate(MainScreen.java)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2802)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2859)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at android.app.ActivityThread.access$2300(ActivityThread.java:136)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2179)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at android.os.Looper.loop(Looper.java:143)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at android.app.ActivityThread.main(ActivityThread.java:5073)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at java.lang.reflect.Method.invokeNative(Native Method)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at java.lang.reflect.Method.invoke(Method.java:521)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-12 15:41:50.369 E/AndroidRuntime( 2644):     at dalvik.system.NativeStart.main(Native Method)
10-12 15:41:50.379 W/ActivityManager( 1563):   Force finishing activity com.companionfree.pushup/.MainScreen
10-12 15:41:50.399 D/SurfaceFlinger( 1563): Layer::setBuffers(this=0xeff6b8), pid=1563, w=1, h=1
10-12 15:41:50.399 D/SurfaceFlinger( 1563): Layer::setBuffers(this=0xeff6b8), pid=1563, w=1, h=1
10-12 15:41:50.419 D/SurfaceFlinger( 1563): Layer::requestBuffer(this=0xeff6b8), index=0, pid=1563, w=480, h=337 success
10-12 15:41:50.469 D/dalvikvm( 2451): GC_FOR_MALLOC freed 7889 objects / 521072 bytes in 105ms
10-12 15:41:50.819 I/RPC     ( 1563): rx thread timeout (1 clients):

I see the same verify error on both but I can't figure it out. The only common library used between the 2 apps is the FlurryAgent.jar for analytics.

For the top app I have For the bottom app I have in the manifests. The only information I have been able to find out is about libraries (GSON) and needing to use dx but I am using Eclipse so that doesn't help.

To make this more difficult, the error does NOT occur on the Android Market. Yet the testers at Amazon say that it FC 5/5 times on each of their devices (I tried using an emulator for their test devices and they worked fine). I know they use "wrapper" code around my app and I think it must be interfering in some way.

Does anyone have any experience with this?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
easycheese
  • 5,859
  • 10
  • 53
  • 87

4 Answers4

2

I had a similar problem - resolved it by removing the non activity class from AndroidManifest.xml

Amazon injects their own code into your apps Activities life-cycle events. Knowing that and looking at the log you've provided:

10-12 15:41:50.359 W/dalvikvm( 2644): VFY: Lcom/companionfree/pushup/WorkoutDbAdapter; is not instance of Landroid/app/Activity;

It appears that Amazon's code tried to instrument a class (WorkoutDbAdapter) which is NOT an Activity (doesn't extends Activity), ending up being rejected by the JVM's verifier.

With my app this happened since the class was listed was listed an an Activity on AndroidManifest.xml. Removing this listing from AndroidManifest.xml resolved the issue and the app was admitted to the market.

Sarp wrote that renaming your class' packaged solved the issue, perhaps by doing so you've made your listing on AndroidManifest.xml no longer relevant. Thereby circumventing the problem.

Gili Nachum
  • 5,288
  • 4
  • 31
  • 33
0

I just solved my problem and may help to you

I just update the AS to 2.0 and ADT, and the verify issue come out finally, be careful with the constructor like:

class abc {
  abc(int x) {
    ....
  }
  abc(byte x) {
    ....
  }
}
Will
  • 151
  • 1
  • 6
0

I'd say this is the problem of the Amazon. Apparently they are injecting some DRM code into your apk: Injecting code into APK

Other people are seeing similar errors - Android app issue (Amazon)

Community
  • 1
  • 1
Peter Knego
  • 79,991
  • 11
  • 123
  • 154
  • Yeah I found those. I guess I will just contact Amazon and see what they say. It's really frustrating though. Terrible experience with their appstore. – easycheese Nov 12 '11 at 18:19
0

In my case, the class that was causing a VerifyError was in a package called util. It was probably clashing with an injected package by Amazon, because renaming it to utils solved the problem.

Because our app was using Facebook SDK, it was given a "No, I will sign my binary" option when uploading a new binary. When you upload an unsigned APK this way, Amazon will let you download the processed binary (that includes their injected code) as Step 2 so that you can sign it. I was able to download a copy of my APK that crashes, and test my changes without going through the approval process this way.

Sarp Centel
  • 1,283
  • 2
  • 14
  • 23