Description

App is frequently terminated with a NullPointerException when attempt to request in-app purchase.
It is assumed that product information cannot be retrieved if there is no Google account logged in to the Android phone.

It hasn't been happening since I added the null check to the two lines of code below.
Please check if it is the correct correction.

Engine\Plugins\Online\Android\OnlineSubsystemGooglePlay\Source\Java\BillingApiV2\com\epicgames\ue4\GooglePlayStoreHelper.java

Line 177 :
if (response == BillingClient.BillingResponseCode.OK && skuDetailsList != null)

Line 277:
if(response == BillingClient.BillingResponseCode.OK && skuDetailsList != null)

Steps to Reproduce

It was fixed/verified with [Link Removed]

Callstack

java.lang.NullPointerException:

at com.epicgames.ue4.GooglePlayStoreHelper$c.a (Unknown Source:35)

at com.android.billingclient.api.BillingClientImpl.a (Unknown Source:9)

at com.epicgames.ue4.GooglePlayStoreHelper.a (Unknown Source:99)

at com.epicgames.ue4.GameActivity$w.run (Unknown Source:12)

at android.os.Handler.handleCallback (Handler.java:883)

at android.os.Handler.dispatchMessage (Handler.java:100)

at android.os.Looper.loop (Looper.java:237)

at android.app.ActivityThread.main (ActivityThread.java:8167)

at java.lang.reflect.Method.invoke (Native Method)

at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:496)

at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1100)

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

2
Login to Vote

Fixed
ComponentUE - Online
Affects Versions4.25.44.26.1
Target Fix4.27.1
Fix Commit17399197
Release Commit17399197
CreatedApr 21, 2021
ResolvedSep 9, 2021
UpdatedDec 1, 2022
View Jira Issue