defold / extension-iap

In-app purchase extension for Defold
MIT License
19 stars 12 forks source link

Upgrade to billing 3.0 #25

Closed britzl closed 3 years ago

AGulev commented 3 years ago

I tried in one of my games and updated plugin. When I launched the game for the first time I got a crash.

AndroidRuntime  E  FATAL EXCEPTION: Thread-16453
                         E  Process: com.potatojam.onet_paradise.match_two_tiles, PID: 23300
                         E  java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
                         E      at com.defold.iap.IapGooglePlay$5.onSkuDetailsResponse(IapGooglePlay.java:336)
                         E      at com.android.billingclient.api.BillingClientImpl.querySkuDetailsAsync(com.android.billingclient:billing@@3.0.0:259)
                         E      at com.defold.iap.IapGooglePlay.querySkuDetailsAsync(IapGooglePlay.java:348)
                         E      at com.defold.iap.IapGooglePlay.listItems(IapGooglePlay.java:366)
britzl commented 3 years ago

@AGulev I've added null checks for additional return values coming from Google Play

britzl commented 3 years ago

I'm going to go ahead and merge now and set this a pre-release and ask for community help to test.