onepf / OpenIAB

Open In-App Billing for Google Play, SlideMe, Amazon Store, Nokia Store, Samsung Apps, Yandex.Store, Appland, Aptoide, AppMall and Fortumo.
http://onepf.org/openiab/
Apache License 2.0
474 stars 172 forks source link

In-app billing unsupported after fresh app installation #246

Closed BABACHAN closed 9 years ago

BABACHAN commented 10 years ago

The very first time startSetup() is called from OnCreate() in my app it returns in-app billing unsupported. And with first time I mean right after a fresh install. Any calls after that succeed.

I'm only using Google Play Store and library 0.9.6 jar.

Here is the logcat:

... 07-04 09:46:32.434: D/OpenIabHelper(13003): in: 4 startSetup() discovered openstores: [] 07-04 09:46:32.434: D/PauseHandler(13003): pause 07-04 09:46:32.434: D/GooglePlay(13003): isBillingAvailable() packageName: babachan.android.dunemediacontroller 07-04 09:46:33.799: V/webkit(13003): BrowserFrame constructor: this=Handler (android.webkit.BrowserFrame) {42801788} 07-04 09:46:33.819: D/dalvikvm(13003): DexOpt: --- END 'ads-1770265885.jar' (success) --- 07-04 09:46:33.819: D/dalvikvm(13003): DEX prep '/data/data/babachan.android.dunemediacontroller/cache/ads-1770265885.jar': unzip in 0ms, rewrite 2347ms 07-04 09:46:34.274: D/dalvikvm(13003): GC_FOR_ALLOC freed 356K, 15% free 15254K/17864K, paused 118ms, total 118ms 07-04 09:46:34.274: I/dalvikvm-heap(13003): Grow heap (frag case) to 20.606MB for 3686416-byte allocation 07-04 09:46:34.299: D/dalvikvm(13003): GC_CONCURRENT freed 1K, 13% free 18853K/21468K, paused 3ms+2ms, total 26ms 07-04 09:46:34.299: D/dalvikvm(13003): WAIT_FOR_CONCURRENT_GC blocked 17ms 07-04 09:46:34.299: D/dalvikvm(13003): WAIT_FOR_CONCURRENT_GC blocked 19ms 07-04 09:46:34.304: D/dalvikvm(13003): WAIT_FOR_CONCURRENT_GC blocked 24ms 07-04 09:46:34.429: E/GooglePlayServicesUtil(13003): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. 07-04 09:46:34.544: D/AmazonAppstore(13003): hasAmazonClasses() cannot load class com.amazon.android.Kiwi 07-04 09:46:34.544: D/AmazonAppstore(13003): isPackageInstaller() sandBox: true 07-04 09:46:34.604: D/OpenIabHelper(13003): in: 2189 0 inventory candidates 07-04 09:46:34.609: D/OpenIabHelper(13003): in: 2192 inventory check done 07-04 09:46:34.609: D/OpenIabHelper(13003): in: 2192 select equipped 07-04 09:46:34.609: D/GooglePlay(13003): isBillingAvailable() packageName: babachan.android.dunemediacontroller 07-04 09:46:34.659: D/OpenIabHelper(13003): in: 2245 select non-equipped 07-04 09:46:34.659: D/OpenIabHelper(13003): in: 2245 fireSetupFinished() === SETUP DONE === result: IabResult: 3, Billing isn't supported (response: 3:Billing Unavailable) 07-04 09:46:34.659: D/IabHelper(13003): IAB helper created. 07-04 09:46:34.659: D/IabHelper(13003): Disposing. 07-04 09:46:34.659: D/OpenIabHelper(13003): in: 2246 startSetup() disposing com.google.play 07-04 09:46:34.664: D/OpenIabHelper(13003): in: 2247 startSetup() disposing com.amazon.apps 07-04 09:46:34.664: I/dalvikvm(13003): Failed resolving Lorg/onepf/oms/appstore/TStoreRequestCallback; interface 3813 'Lcom/skplanet/dodo/IapPlugin$RequestCallback;' 07-04 09:46:34.664: W/dalvikvm(13003): Link of class 'Lorg/onepf/oms/appstore/TStoreRequestCallback;' failed 07-04 09:46:34.669: E/dalvikvm(13003): Could not find class 'org.onepf.oms.appstore.TStoreRequestCallback', referenced from method org.onepf.oms.appstore.TStoreBillingService.launchPurchaseFlow 07-04 09:46:34.669: W/dalvikvm(13003): VFY: unable to resolve new-instance 4406 (Lorg/onepf/oms/appstore/TStoreRequestCallback;) in Lorg/onepf/oms/appstore/TStoreBillingService; 07-04 09:46:34.669: D/dalvikvm(13003): VFY: replacing opcode 0x22 at 0x0017 07-04 09:46:34.669: I/dalvikvm(13003): Could not find method com.skplanet.dodo.IapPlugin.getPlugin, referenced from method org.onepf.oms.appstore.TStoreBillingService.startSetup 07-04 09:46:34.669: W/dalvikvm(13003): VFY: unable to resolve static method 28072: Lcom/skplanet/dodo/IapPlugin;.getPlugin (Landroid/content/Context;)Lcom/skplanet/dodo/IapPlugin; 07-04 09:46:34.669: D/dalvikvm(13003): VFY: replacing opcode 0x71 at 0x0002 07-04 09:46:34.669: I/dalvikvm(13003): Failed resolving Lorg/onepf/oms/appstore/TStoreRequestCallback; interface 3813 'Lcom/skplanet/dodo/IapPlugin$RequestCallback;' 07-04 09:46:34.669: W/dalvikvm(13003): Link of class 'Lorg/onepf/oms/appstore/TStoreRequestCallback;' failed 07-04 09:46:34.669: D/dalvikvm(13003): DexOpt: unable to opt direct call 0x7adf at 0x1b in Lorg/onepf/oms/appstore/TStoreBillingService;.launchPurchaseFlow 07-04 09:46:34.669: D/OpenIabHelper(13003): in: 2253 startSetup() disposing com.tmobile.store 07-04 09:46:34.669: D/OpenIabHelper(13003): in: 2253 startSetup() disposing com.nokia.nstore 07-04 09:46:37.224: D/dalvikvm(13003): GC_FOR_ALLOC freed 4374K, 31% free 15319K/21956K, paused 40ms, total 40ms ...

bariscigal commented 9 years ago

Hello is this problem resolved with the latest build on on onepf.org site for unity? (v.0.9.8) Because it seems i am having this exact same problem right now. And couldn't be sure if it is because of something i am doing wrong. I would be glad which files i should get from git if it is not in the latest build already.

akarimova commented 9 years ago

Hello @bariscigal, it was solved (connection timeout was removed). https://github.com/onepf/OpenIAB/releases/tag/0.9.8.1 - our latest release

special thanks to @shafty023

TobyKaos commented 9 years ago

I will test more but it seems resolve. It was due to long loading datas in my game.