onepf / OpenIAB-Unity-Plugin

OpenIAB Unity Plugin for Android (Google Play, Samsung Apps, Amazon Appstore, SlideME, Nokia Store, Appland, Aptoide, AppMall, Yandex.Store, Fortumo), Windows Phone and iOS.
Apache License 2.0
147 stars 58 forks source link

Can't set up Play Store. Unity 5 #65

Open yura415 opened 9 years ago

yura415 commented 9 years ago

Here is logs from device (android 5.0 emulator):

I/Unity   ( 2720): ********** Android OpenIAB plugin initialized **********
I/Unity   ( 2720):
I/Unity   ( 2720): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bug.gen.cpp Line: 56)
I/Unity   ( 2720):
I/dex2oat ( 2769): /system/bin/dex2oat --runtime-arg -classpath --runtime-arg  -
-instruction-set=x86 --instruction-set-features=default --runtime-arg -Xrelocate
 --boot-image=/system/framework/boot.art --dex-file=/data/data/com.natakids.icec
reamcafe/cache/ads-1337908387.jar --oat-fd=42 --oat-location=/data/data/com.nata
kids.icecreamcafe/cache/ads-1337908387.dex --runtime-arg -Xms64m --runtime-arg -
Xmx512m
I/Unity   ( 2720): OpenIAB inited
I/Unity   ( 2720):
I/Unity   ( 2720): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bug.gen.cpp Line: 56)
I/Unity   ( 2720):
I/LibraryLoader( 2720): Loading: webviewchromium
I/LibraryLoader( 2720): Time to load native libraries: 74 ms (timestamps 4393-44
67)
I/LibraryLoader( 2720): Expected native library version number "",actual native
library version number ""
V/WebViewChromiumFactoryProvider( 2720): Binding Chromium to main looper Looper
(main, tid 1) {3c42d0e1}
I/LibraryLoader( 2720): Expected native library version number "",actual native
library version number ""
I/chromium( 2720): [INFO:library_loader_hooks.cc(106)] Chromium logging enabled:
 level = 0, default verbosity = 0
I/BrowserStartupController( 2720): Initializing chromium process, renderers=0
W/art     ( 2720): Attempt to remove local handle scope entry from IRT, ignoring

W/dex2oat ( 2769): Compilation of void com.google.android.ads.zxxz.a.<init>() to
ok 111.435ms
W/dex2oat ( 2769): Compilation of void com.google.android.ads.zxxz.c.<init>() to
ok 111.670ms
W/dex2oat ( 2769): Compilation of void com.google.android.ads.zxxz.b.<init>() to
ok 112.061ms
W/dex2oat ( 2769): Compilation of void com.google.android.ads.zxxz.d.<init>() to
ok 110.240ms
W/AudioManagerAndroid( 2720): Requires BLUETOOTH permission
W/chromium( 2720): [WARNING:resource_bundle.cc(315)] locale_file_path.empty()
I/dex2oat ( 2769): dex2oat took 169.765ms (threads: 4)
I/chromium( 2720): [INFO:aw_browser_main_parts.cc(63)] Load from apk succesful,
fd=53 off=46092 len=2953
I/chromium( 2720): [INFO:aw_browser_main_parts.cc(78)] Loading webviewchromium.p
ak from, fd:42 off:228796 len:643667
W/chromium( 2720): [WARNING:mailbox_synchronizer.cc(36)] MailboxSync not support
ed due to missing EGL image/fence support
I/Ads     ( 2720): CsiReporterFactory: CSI is not enabled. No CSI reporter creat
ed.
I/Ads     ( 2720): Starting ad request.
I/Ads     ( 2720): Use AdRequest.Builder.addTestDevice("2761986DECB3DFE3CB491C94
2400F289") to get test ads on this device.
I/Ads     ( 2720): Please set theme of AdActivity to @android:style/Theme.Transl
ucent to enable transparent background interstitial ad.
D/OpenIAB-UnityPlugin( 2720): createBroadcasts
D/OpenIAB-UnityPlugin( 2720): Starting setup.
D/OpenIAB-UnityPlugin( 2720): Setup finished.
E/OpenIAB-UnityPlugin( 2720): Problem setting up in-app billing: IabResult: 3, N
o suitable appstore was found (response: 3:Billing Unavailable)
I/Unity   ( 2720): billing not supported: No suitable appstore was found (respon
se: 3:Billing Unavailable)
I/Unity   ( 2720):
I/Unity   ( 2720): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bug.gen.cpp Line: 56)
I/Unity   ( 2720):
I/Unity   ( 2720): IAB ANDROID GOOGLE : com.google.play
I/Unity   ( 2720):
I/Unity   ( 2720): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bug.gen.cpp Line: 56)
I/Unity   ( 2720):
I/Ads     ( 2720): CsiReporterFactory: CSI is not enabled. No CSI reporter creat
ed.
W/chromium( 2720): [WARNING:proxy_service.cc(901)] PAC support disabled because
there is no system implementation
W/chromium( 2720): [WARNING:data_reduction_proxy_settings.cc(403)] SPDY proxy OF
F at startup
W/art     ( 2720): Attempt to remove local handle scope entry from IRT, ignoring

W/AwContents( 2720): onDetachedFromWindow called when already detached. Ignoring

W/art     ( 2720): Attempt to remove local handle scope entry from IRT, ignoring

W/art     ( 2720): Attempt to remove local handle scope entry from IRT, ignoring

W/FlurryAgent( 2720): Analytics report sent.
I/chromium( 2720): [INFO:CONSOLE(0)] "Document was loaded from Application Cache
 with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sd
k-core-v40.appcache", source: https://googleads.g.doubleclick.net/mads/static/ma
d/sdk/native/sdk-core-v40.html (0)
I/chromium( 2720): [INFO:CONSOLE(0)] "Application Cache Checking event", source:
 https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.htm
l (0)
I/chromium( 2720): [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source:
 https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.htm
l (0)
W/art     ( 2720): Attempt to remove local handle scope entry from IRT, ignoring

W/AwContents( 2720): onDetachedFromWindow called when already detached. Ignoring

W/art     ( 2720): Attempt to remove local handle scope entry from IRT, ignoring

W/art     ( 2720): Attempt to remove local handle scope entry from IRT, ignoring

W/ScreenOrientationListener( 2720): Removing an inexistent observer!
I/Ads     ( 2720): Ad finished loading.
D/InitAlarmsService( 2567): Clearing and rescheduling alarms.
I/Unity   ( 2720): purchase button pressed
I/Unity   ( 2720):
I/Unity   ( 2720): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bug.gen.cpp Line: 56)
I/Unity   ( 2720):
I/ActivityManager( 1693): START u0 {cmp=com.natakids.icecreamcafe/org.onepf.open
iab.UnityProxyActivity (has extras)} from uid 10061 on display 0
E/OpenIAB ( 2720): Illegal state for operation (launchPurchaseFlow): IAB helper
setup failed.
D/OpenIAB-UnityPlugin( 2720): Purchase finished: IabResult: 3, Cannot start purc
hase process. Billing unavailable. (response: 3:Billing Unavailable), purchase:
null
E/OpenIAB-UnityPlugin( 2720): Error purchasing: IabResult: 3, Cannot start purch
ase process. Billing unavailable. (response: 3:Billing Unavailable)
W/FlurryAgent( 2720): Flurry session resumed for context:org.onepf.openiab.Unity
ProxyActivity@1b6070bc
D/OpenIAB-UnityPlugin( 2720): Finish broadcast was received
W/InputMethodManagerService( 1693): Window already focused, ignoring focus gain
of: com.android.internal.view.IInputMethodClient$Stub$Proxy@29c2952e attribute=n
ull, token = android.os.BinderProxy@3fafab1e
W/FlurryAgent( 2720): Flurry session paused for context:org.onepf.openiab.UnityP
roxyActivity@1b6070bc
I/Unity   ( 2720): purhase failed : Cannot start purchase process. Billing unava
ilable. (response: 3:Billing Unavailable) 3
I/Unity   ( 2720):
I/Unity   ( 2720): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bug.gen.cpp Line: 56)
I/Unity   ( 2720):
I/MediaFocusControl( 1693):  AudioFocus  abandonAudioFocus() from android.media.
AudioManager@b9b9107com.android.music.MediaPlaybackService$3@9d71234
I/ActivityManager( 1693): Start proc com.android.musicfx for broadcast com.andro
id.musicfx/.ControlPanelReceiver: pid=2828 uid=10009 gids={50009, 9997, 3003, 30
02} abi=x86
V/MusicFXControlPanelReceiver( 2828): onReceive
V/MusicFXControlPanelReceiver( 2828): Action: android.media.action.CLOSE_AUDIO_E
FFECT_CONTROL_SESSION
V/MusicFXControlPanelReceiver( 2828): Package name: com.android.music
V/MusicFXControlPanelReceiver( 2828): Audio session: 6
V/MusicFXControlPanelEffect( 2828): closeSession(android.app.ReceiverRestrictedC
ontext@2972eb9c, com.android.music, 6)
I/ActivityManager( 1693): Killing 2190:com.android.music/u0a42 (adj 15): empty #
17
W/libprocessgroup( 1693): failed to open /acct/uid_10042/pid_2190/cgroup.procs:
No such file or directory

I set up OpenIAB on Start like this:

OpenIAB.mapSku(SKU_ADV_DISABLE, OpenIAB_Android.STORE_GOOGLE, "...");

var options = new Options();
options.checkInventoryTimeoutMs = Options.INVENTORY_CHECK_TIMEOUT_MS * 2;
options.discoveryTimeoutMs = Options.DISCOVER_TIMEOUT_MS * 2;
options.verifyMode = OptionsVerifyMode.VERIFY_SKIP;
options.availableStoreNames = new[] { OpenIAB_Android.STORE_GOOGLE };
options.prefferedStoreNames = new[] { OpenIAB_Android.STORE_GOOGLE };
options.storeKeys = new Dictionary<string, string> {
    {
        OpenIAB_Android.STORE_GOOGLE,
        "MIIBIjA..."
    }
};
options.checkInventory = false;
options.storeSearchStrategy = SearchStrategy.INSTALLER_THEN_BEST_FIT;

OpenIAB.init(options);

Tried installing via

adb install -i com.myapp.bundle /path/to/apk

and

adb install -i com.google.play /path/to/apk

and even

adb install -i com.android.vending /path/to/apk

still same result.

Tried signing app with valid keystore and with debug keystore.

yura415 commented 9 years ago

Issue was in Crimean sanctions (Executive Order 13685) and my Google account.