Google Play Services Show External Login UI node NEVER fires OnSuccess

I have google play services and google play leaderboard fully integrated into my Unreal Android game and everything works, and displays almost correctly but its a bit buggy. Among other things, I have a bug whereby the ON SUCCESS path for the “Show External Login UI” node never ever fires despite receiving a login google play services popup at the top of the screen. Again, my leaderboards display, I can login, but the on success nodes never fire.

Everything in my project is setup VERBATIM as per the canonical documentation and the various posts in this forum.

Can somebody please help me find the source of this bug?

1 Like

I am having problems with Show External Login UI node too. It makes my game crash. I am trying to add firebase, it is the only thing i don’t have in my configuration. But i don’t know how to add the google-services.json file

Has there been any progress on your side?

So I got past the point where you are. My “basic” stuff works. I can see the login page. I can login. I can see the leaderboard. However, my on-success on-failure pins dont fire.

For your particular problem, I would follow this link:

Firebase wasnt necessary in my case to get the basics going and neither was a google.services.json file.

Thanks
I initially followed this explanations too, ads and in-app purchase are working fine. I just finished adding firebase with a plugin. I test in closed tests.
I was hoping login would be fixed now but no, it still crashes at the same time.
Firebase analytics tells that 3 phones from google are connected. And in the google play console, i see the screenshots of the pre-launch report details. The bots can connect, i see the connexion interface. What would it work for them but not on my actual phone?

Do you see crashes in the pre-launch report details?

You wont see crashes in pre launch report. I have 1 good news and 2 bad news for you. The good news is that you could run your game and wait for the app to crash and then inspect the log file that is stored on your phone. If you then inspect the log file, you can presumably see some more details which may contain an error code/message. The bad news is twofold:

  1. To enable log files, you need to… Are you ready for it?.. compile unreal engine from source, AND, compile it in such a way that log file are enabled.
  2. You will have to find a way to get those log files working on ANDROID.

I have managed to enable log files, but only for the product shipped to WINDOWS. I could never get log files enabled for Android.

I think that your best bet would be for us to compare your project to mine and to mimic your settings to mine to get your login screen to show normally and not crash. For that it would be better if you DM me and then we can arrange a screenshare and you can see my proj layout and you can tick the boxes.

Thanks for the proposition, i’ll think about it!

I manage to have the log files enable for android (it was quite a ride). The main error message is JNI DETECTED ERROR IN APPLICATION: java_class == null
But i haven’t found what to do with it.

A longer sample:

Exception in dalvik/system/DexClassLoader.loadClass: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.games.NativeSdkCallbacks" on path: DexPathList[[zip file "/data/user/0/com.Company.MyGame/app_.gpg.classloader/2e190de0913242cfb3e30a895073c67e_games.jar"],nativeLibraryDirectories=[/system/lib64, /system/system_ext/lib64]].
07-30 21:41:52.434  7077  7566 F es.MyGame: java_vm_ext.cc:591] JNI DETECTED ERROR IN APPLICATION: java_class == null
07-30 21:41:52.434  7077  7566 F es.MyGame: java_vm_ext.cc:591]     in call to RegisterNatives
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691] Runtime aborting...
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691] Dumping all threads without mutator lock held
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691] All threads:
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691] DALVIK THREADS (81):
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691] "main" prio=10 tid=1 Native
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   | group="" sCount=1 ucsCount=0 flags=1 obj=0x739ee0c8 self=0x6f05ec57b0
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   | sysTid=7077 nice=-10 cgrp=default sched=0/0 handle=0x70af2b9500
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   | state=S schedstat=( 600061308 161686950 1298 ) utm=31 stm=28 core=4 HZ=100
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   | stack=0x7fdda99000-0x7fdda9b000 stackSize=8188KB
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   | held mutexes=
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   native: #00 pc 0004e1dc  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28) (BuildId: 173441c90e5afc5b5229a361bc9d8d2d)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   native: #01 pc 00232670  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks+140) (BuildId: 5b1e3dce5abfbdc410d71d256d308227)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   native: #02 pc 005528e8  /apex/com.android.art/lib64/libart.so (art::JNI<false>::FindClass+1836) (BuildId: 5b1e3dce5abfbdc410d71d256d308227)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   native: #03 pc 001b8d68  /system/lib64/libandroid_runtime.so ((anonymous namespace)::Receiver::handleEvent+124) (BuildId: e5c6a65cab0a807925f97c0edce0bd5a)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   native: #04 pc 000177ac  /system/lib64/libutils.so (android::Looper::pollInner+1060) (BuildId: a5ca39eaeeeb017be4afa358811e69fb)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   native: #05 pc 00017328  /system/lib64/libutils.so (android::Looper::pollOnce+112) (BuildId: a5ca39eaeeeb017be4afa358811e69fb)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   native: #06 pc 001624dc  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce+44) (BuildId: e5c6a65cab0a807925f97c0edce0bd5a)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   at android.os.MessageQueue.nativePollOnce(Native method)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   at android.os.MessageQueue.next(MessageQueue.java:335)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   at android.os.Looper.loopOnce(Looper.java:186)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   at android.os.Looper.loop(Looper.java:313)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   at android.app.ActivityThread.main(ActivityThread.java:8762)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   at java.lang.reflect.Method.invoke(Native method)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
07-30 21:41:52.506  7077  7566 F es.MyGame: runtime.cc:691]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

I don’t see crash on pre-launch report menu, but on the screenshot sub-menu, i can see that the Google’s bot manage to get the google play signing pop-up. On several phones with android 13, it crashes when we try to connect with a login fail method, On phones with android 14, it’s just login fail without the crash

Which version of unreal do you use ? (I am on 5.2)

I’m also on 5.2.

Perhaps it has something to do with the android sdk version you are targeting. I have heard that this could also be an issue. Under project settings, my minimum SDK version is 26 and my target SDK version is 32.

Did you compile from source to get log files working? After doing so, I couldnt get logs working on Android.

After checking the above, I would then consider the fact that there is actually nothing wrong with your login node itself, but a bug in your actual game or the incorrect placement of the login node. In other words, the login process commences, but then immediately pursuant to that, a bug occurs due to incorrect invocation/placement. The first thing that comes to mind is you need to make sure that your Show External Login UI node occurs in an event graph and NOT a function. This is because the login node is a latent node (asynchronous node) and latent nodes are only work correctly in event graphs.

The node Show External Login UI is called in the event graph of my game instance. To help debugging. I’ve added a button on the main screen that triggers an event in the game instance. The event launches Show External Login UI that now only tries to connect. I thought about what you said: the login node is in the event graph of the game instance. I checked all screenshots from the prelaunch reports. It works every time: sdk 30, 31 and 33. I don’t know what the difference between the google test environments and mine.

About the sdk version target: it seems that google will refute games which doesn’t target sdk 34 at the end of august or september.

About the log: yes, i downloaded the source code, activated the log in shipped builds and build the project. I get the log with when my phone is plugged. I followed the epic tutorial.

Do you make any progress on your problem?

For your issue, did you try to update:

dependencies {
    implementation "com.google.android.gms:play-services-games-v2:+"
}

I came right with my issue. The problem was that the google login mechanism only works if your game is one continuous level. In other words, the google services login only works as intended if you use level streaming. If you change levels without using level streaming, your player controller loses its login context.