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
476 stars 171 forks source link

[Android] Crash on purchase in Google Play (app has stopped) #362

Closed litsungyi closed 10 years ago

litsungyi commented 10 years ago

OpenIAB was crashed when turn on/off wifi in purchasing. This issue can be reproduce in OpenIAB Sample App

Here is reproduce step 1: (Turn off wifi in purchasing) NOTE: Make sure wifi in Enabled

  1. Purchase a product and press "BUY" button.
  2. In the "Confirm password" dialog switch to "Setting" and turn off wifi.
  3. Back to app and press "BACK"
  4. The app was crashed.

Another reproduce step 2: (Turn on wifi in purchasing) NOTE: Make sure wifi in Disabled

  1. Purchase a product and you will see the "Error" dialog says "No Connection.".
  2. Switch to "Setting" and turn on wifi.
  3. Back to app and press "OK"
  4. The app was crashed.

Hope this information useful.

RomanZhilich commented 10 years ago

I wasn't able to reproduce this crash. Can you please post here crash trace from device logs?

litsungyi commented 10 years ago

Sorry for late response. Here's stack trace. I test on Nexus 7 and Samsung Galaxy S3, only happened on Nexus 7.

java.lang.RuntimeException: Unable to stop activity {com.maxon.vega/org.onepf.openiab.UnityProxyActivity}: java.lang.IllegalArgumentException: Receiver not registered: org.onepf.openiab.UnityProxyActivity$1@41f64300 at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3447) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3501) at android.app.ActivityThread.access$1400(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1249) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalArgumentException: Receiver not registered: org.onepf.openiab.UnityProxyActivity$1@41f64300 at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:658) at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1461) at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:489) at org.onepf.openiab.UnityProxyActivity.onStop(UnityProxyActivity.java:73) at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1212) at android.app.Activity.performStop(Activity.java:5376) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3442) ... 11 more java.lang.IllegalArgumentException: Receiver not registered: org.onepf.openiab.UnityProxyActivity$1@41f64300 at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:658) at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1461) at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:489) at org.onepf.openiab.UnityProxyActivity.onStop(UnityProxyActivity.java:73) at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1212) at android.app.Activity.performStop(Activity.java:5376) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3442) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3501) at android.app.ActivityThread.access$1400(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1249) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method)

akarimova commented 10 years ago

Hi @LiTsungYi this crash was fixed It will be in the next release of the plugin The src already contain it.

akarimova commented 10 years ago

@LiTsungYi could you please try our new version of the plugin https://yadi.sk/d/deNLD9mfbtFFh?

litsungyi commented 10 years ago

@akarimova I tried the new plugin, and the bug if fixed. Thx.