Google Play IAB: Unexpected response code 403

594 Views Asked by At

We are trying to implement Android In-App Billing in our game, made with Unity. The plugin we are using seems to work fine, and I have successfully been able to access Google's In-App billing service in an older project. However, when I try to do a test purchase in our new project (using a test account), I am getting this error: "unexpected response code 403 for https://android.clients.google.com/fdfe/preparePurchase".

I have searched for similar cases on StackOverflow and Google, however none of the solutions I have seen fixes our problem. I believe all our settings should be correct: - The devices we are testing on have had their main accounts added to the list of testers (on Developer Console) and are not Google developer accounts. - The APK has been uploaded and released as alpha, - The in-app product we are testing with has been activated. - Permission for com.android.vending.BILLING has been added to the manifest.

And here is our log:

And here is our log:
D/Finsky ( 3814): [407] InAppBillingUtils.getPreferredAccount: [OUR BUNDLE ID]: Account from first account - [J08vUDQx0XyZqx40E-hxtcffLeU]
D/Finsky ( 3814): [407] InAppBillingUtils.getPreferredAccount: [OUR BUNDLE ID]: Account from first account - [J08vUDQx0XyZqx40E-hxtcffLeU]
D/Finsky ( 3814): [407] InAppBillingUtils.getPreferredAccount: [OUR BUNDLE ID]: Account from first account - [J08vUDQx0XyZqx40E-hxtcffLeU]
E/Parcel ( 815): Class not found when unmarshalling: com.google.android.finsky.billing.lightpurchase.PurchaseParams
E/Parcel ( 815): java.lang.ClassNotFoundException: com.google.android.finsky.billing.lightpurchase.PurchaseParams
......
E/Parcel ( 815): at dalvik.system.NativeStart.run(Native Method)
E/Parcel ( 815): Caused by: java.lang.NoClassDefFoundError: com/google/android/finsky/billing/lightpurchase/PurchaseParams
E/Parcel ( 815): ... 19 more
E/Parcel ( 815): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.finsky.billing.lightpurchase.PurchaseParams" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/Parcel ( 815): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
E/Parcel ( 815): .........
W/ContextImpl( 815): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1478 com.android.server.am.ActivityStack.startPausingLocked:1006 com.android.server.am.ActivityStack.resumeTopActivityLocked:1944 com.android.server.am.ActivityStackSupervisor.resumeTopActivitiesLocked:3054 com.android.server.am.ActivityStackSupervisor.resumeTopActivitiesLocked:3032
W/ContextImpl( 815): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1478 com.android.server.am.ActivityStackSupervisor.realStartActivityLocked:1160 com.android.server.am.ActivityStackSupervisor.startSpecificActivityLocked:1311 com.android.server.am.ActivityStack.resumeTopActivityLocked:2268 com.android.server.am.ActivityStackSupervisor.resumeTopActivitiesLocked:3054
I/ElegantRequestDirector( 3814): I/O exception (org.apache.http.NoHttpResponseException) caught when processing request: The target server failed to respond
I/ElegantRequestDirector( 3814): Retrying request
W/qdhwcomposer( 276): Excessive delay reading vsync: took 99 ms
E/Volley ( 3814): [415] BasicNetwork.performRequest: Unexpected response code 403 for https://android.clients.google.com/fdfe/preparePurchase
D/Finsky ( 3814): [1] PurchaseFragment.handleError: Error: PurchaseError{type=2 subtype=0}
D/Finsky ( 3814): [1] PurchaseFragment.fail: Purchase failed: PurchaseError{type=2 subtype=0}
0

There are 0 best solutions below