Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android : App crash while receiving iap.TRANS_STATE_PURCHASED state #56

Closed
RedHunter7 opened this issue Jan 27, 2023 · 0 comments · Fixed by #59
Closed

Android : App crash while receiving iap.TRANS_STATE_PURCHASED state #56

RedHunter7 opened this issue Jan 27, 2023 · 0 comments · Fixed by #59

Comments

@RedHunter7
Copy link

Hello, I test the IAP transaction on my 'Throwing Spear' Game, and the game suddenly crashes when receive iap.TRANS_STATE_PURCHASED state.

Steps to reproduce the behavior:

  1. Disable auto-finish-transaction on game.project
  2. Buy a consumable item & choose the "Slow test card, approves after a few minutes"
  3. Quit the app, after that open app again
  4. Wait for a few minutes to receive iap.TRANS_STATE_PURCHASED state
  5. App crash while receiving iap.TRANS_STATE_PURCHASED state

Defold version :

  • Version 1.4.1

Platforms :

  • Platforms: Android
  • OS: Android 13
  • Device: Samsung A32

Logs :

01-26 20:14:45.066 28683 28683 E AndroidRuntime: FATAL EXCEPTION: main
01-26 20:14:45.066 28683 28683 E AndroidRuntime: Process: com.throwingspear, PID: 28683
01-26 20:14:45.066 28683 28683 E AndroidRuntime: java.lang.RuntimeException: Error receiving broadcast Intent { act=com.android.vending.billing.PURCHASES_UPDATED flg=0x10 pkg=com.throwingspear (has extras) } in com.android.billingclient.api.zzn@63d92f5
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$android-app-LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1928)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at android.app.LoadedApk$ReceiverDispatcher$Args$$ExternalSyntheticLambda0.run(Unknown Source:2)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:942)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:226)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:313)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:8741)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
01-26 20:14:45.066 28683 28683 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void com.defold.iap.IPurchaseListener.onPurchaseResult(int, java.lang.String)' on a null object reference
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at com.defold.iap.IapGooglePlay.handlePurchase(IapGooglePlay.java:356)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at com.defold.iap.IapGooglePlay.onPurchasesUpdated(IapGooglePlay.java:367)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at com.android.billingclient.api.zzn.onReceive(com.android.billingclient:billing@@5.0.0:5)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$android-app-LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1918)
01-26 20:14:45.066 28683 28683 E AndroidRuntime:        ... 9 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant