UE 5.3 Mobile Developer get In-App purchases working without crash on Android

Hello,
I am using UE 5.3 and trying to implement in app purchases. Signing in to Google Play and Leaderboards work but the second any of the 2 in app purchases nodes are called, the app crashes. There isn’t anything online about this issue. I have tried different Android Studio versions, different SDK versions, different NDK versions, different JDK versions and still no luck! I am using Blueprints not C++.

Error from log:
Assertion failed: false && “Java JNI call failed with an exception.” [File:./Runtime/Core/Private/Android/AndroidJavaEnv.cpp] [Line: 231]

  • I am using 1 plugin called EasyAdsPro for ads but the problem I am having is related to In-App-Purchases
  • The project is all blueprints.
  • I got the packaging to work using:
    Flamingo 2022.2.1 Patch 2
    Android SDK 33
    NDK r25b
    JDK 20 (also tried 17,18,19)

Please find attached the nodes that crash the game once they are called with the error specified in the job posting

Another thread with full log (same as mine):

Any help is much appreciated! It’s been a couple of days and I’m going crazy haha

1 Like

Hi,
you need use source code build of unreal engine, and change the file
Engine/Source/Runtime/Core/Private/Android/AndroidJavaEnv.cpp
in line 282

FScopedJavaObject FJavaHelper::ToJavaStringArray(JNIEnv* Env, const TArray& UnrealStrings)
{

// Change from
// jclass JavaStringClass = AndroidJavaEnv::FindJavaClass(“java/lang/String”);
// to
jclass JavaStringClass = Env->FindClass(“java/lang/String”);

1 Like

Does In-App purchases work for anyone in UE 5.3 on iOS? I haven’t been able to get it working due to this error:

UInAppPurchaseCallbackProxy::Trigger - Invalid player UniqueNetId

This is happening because in the InAppPurchaseCheckoutCallbackProxy::TriggerCheckout() function, this line is failing on IsValid() check:

if( FUniqueNetIdRepl PurchasingPlayer = PlayerController->GetLocalPlayer()->GetUniqueNetIdFromCachedControllerId(); PurchasingPlayer.IsValid())

Any luck with in-app purchases with the latest hotfix UE 5.3.2?

Nope, nothing changed. Really hoping for a fix soon this is insane.

Still broken for me in UE 5.3.2 as well.

Have we gotten confirmation that this is indeed an issue with UE and not something we are doing wrong? Seems like this issue would be much bigger than it is if it was broken for everybody. Especially since iOS broke as of UE 5.1, which was released about 1 year ago. And Android as of UE 5.3, which is coming up on 6 months.

Out of all of the hundreds/thousands of UE games, we are the only ones seeing and reporting this problem in the last year?

It is very strange. I think we should all submit bug reports. I already did twice but it never showed up on the bugs website for some reason.

The problem is still here in 5.4.

1 Like

they just keep adding “features” to the “engine” while the most important parts are falling apart, wtf kind of business are they running?

3 Likes

Well, it’s been almost a year, and IAP are still not working.

Epic is ignoring our bug reports and keeps releasing new patches without fixing this.

1 Like

I’m starting to believe they hate mobile developers. I’ve spent months looking for solutions and the problem is with them.
5.3.2 Same problems / 5.4 Same problems / 5.4.4 Same problems
The only version I didn’t have any problems with on Android was the version 4.27, but it’s impossible for me to go back to this one because even downgrading projects they make it a nightmare.