10
votes

My app has been in the play store for a while, and it worked. Yesterday I released an update, and found a bug in it, which I want to fix today. After uploading my alpha apk to the publisher page with a new version and versioncode(so I can test purchases), in app purchases do not work in this new version. I did not change any code related to in app billing. I'm using v3 of the iab library.

I get this error message:

01-16 13:15:34.365: E/Parcel(707): Class not found when unmarshalling: com.google.android.finsky.billing.lightpurchase.PurchaseParams 01-16 13:15:34.365: E/Parcel(707): java.lang.ClassNotFoundException: com.google.android.finsky.billing.lightpurchase.PurchaseParams 01-16 13:15:34.365: E/Parcel(707): at java.lang.Class.classForName(Native Method) 01-16 13:15:34.365: E/Parcel(707): at java.lang.Class.forName(Class.java:204) 01-16 13:15:34.365: E/Parcel(707): at java.lang.Class.forName(Class.java:169) 01-16 13:15:34.365: E/Parcel(707): at android.os.Parcel.readParcelableCreator(Parcel.java:2091) 01-16 13:15:34.365: E/Parcel(707): at android.os.Parcel.readParcelable(Parcel.java:2055) 01-16 13:15:34.365: E/Parcel(707): at android.os.Parcel.readValue(Parcel.java:1971) 01-16 13:15:34.365: E/Parcel(707): at android.os.Parcel.readMapInternal(Parcel.java:2255) 01-16 13:15:34.365: E/Parcel(707): at android.os.Bundle.unparcel(Bundle.java:223) 01-16 13:15:34.365: E/Parcel(707): at android.os.Bundle.getString(Bundle.java:1082) 01-16 13:15:34.365: E/Parcel(707): at android.content.Intent.getStringExtra(Intent.java:4945) 01-16 13:15:34.365: E/Parcel(707): at com.android.server.am.ActivityStack.startActivityLocked(ActivityStack.java:3745) 01-16 13:15:34.365: E/Parcel(707): at com.android.server.am.ActivityStack.startActivityMayWait(ActivityStack.java:4961) 01-16 13:15:34.365: E/Parcel(707): at com.android.server.am.ActivityManagerService.startActivityInPackage(ActivityManagerService.java:3433) 01-16 13:15:34.365: E/Parcel(707): at com.android.server.am.PendingIntentRecord.sendInner(PendingIntentRecord.java:254) 01-16 13:15:34.365: E/Parcel(707): at com.android.server.am.ActivityManagerService.startActivityIntentSender(ActivityManagerService.java:3325) 01-16 13:15:34.365: E/Parcel(707): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:258) 01-16 13:15:34.365: E/Parcel(707): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2122) 01-16 13:15:34.365: E/Parcel(707): at android.os.Binder.execTransact(Binder.java:388) 01-16 13:15:34.365: E/Parcel(707): at dalvik.system.NativeStart.run(Native Method) 01-16 13:15:34.365: E/Parcel(707): Caused by: java.lang.NoClassDefFoundError: com/google/android/finsky/billing/lightpurchase/PurchaseParams 01-16 13:15:34.365: E/Parcel(707): ... 19 more 01-16 13:15:34.365: E/Parcel(707): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.finsky.billing.lightpurchase.PurchaseParams" on path: . 01-16 13:15:34.365: E/Parcel(707): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64) 01-16 13:15:34.365: E/Parcel(707): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 01-16 13:15:34.365: E/Parcel(707): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 01-16 13:15:34.365: E/Parcel(707): ... 19 more

I get it when the buy intent is called. Error message on ui is:

This version of the application is not configured for billing trough Google Play. Check the help center for more information.

I have tried it on different devices, with the same result. Old versions of the app still work. Yesterday it worked perfectly.

Should I just wait for google play services to get the info that I have a new beta update? I'm guessing that the update did not reach my devices yet.

edit: I've uploaded 3 versioncodes as betas to publisher site trying to fix this, and now the previous one works. So I guess I really just have to wait. :(

2
Looks like your build might be broken. A ClassNotFoundException has nothing to do with the beta update. (and for the next time: please do not use blockquote for the stacktrace but use correct indent or the "code" button, it is better readable this way)WarrenFaith
Setting the version code lower(==to the version that is on the market) and making a release build, makes the purchases work again. Code button put my whole log into 1 line.Tamas
Ok so you tried the build process multiple times and it always fails?WarrenFaith
yes. If I lower the version code than it works again. the build process does not fail. I got the error in runtimeTamas
Well this error can be thrown at runtime if the library was not exported into the apk. I am curious why a lower version code works...WarrenFaith

2 Answers

10
votes

As I suspected, I just had to wait a couple hours. :(

edit:to give a bit more info, this is the same thing that happens when you buy an in app item on one device, and the other device with the same google account is not in sync for a while. It's just that the google servers are not updated fast enough.

1
votes

You are suppose to sign your APK with your live certificate. Then install that into your device and test InAppBilling.

If you are using the android.test.purchased it will work all the way, but you won't have the developerPayload in your final response.

If you are using your own draft in app item you can test all the way but you will be charged and so will have to refund it yourself afterwards.

You cannot buy items with the same gmail account that you use for the google play development console.

Check out for more Details