Can't connect to Play. All codes and settings are present

Hi Guys.
For a while now I’ve been trying to figure out why my game always returns “On Failure” when attempting to sign in to Play using “Show External Login UI”.

The steps I have taken:

  • Created an Application and Game Services entry in the developer console and linked them together in the ‘Linked Apps’ section.
  • Put the Game App ID in UE4 ‘Project Settings’.
  • Put the Licensing key in UE4 ‘Project Settings’.
  • Created a keystore and placed it in ‘Build/Android’ along with necessary entries in ‘Project Settings’.
  • Input the SHA1 code from the generated keystore into the developer console.
  • Package name input along with SHA1 is the same as in the project settings.
  • The email address for my account is on the testing list.
  • Added necessary code to the build file (project was not blueprint only)

I have also added the following extra manifests and permissions I found on another thread about the same problem:

  • com…android.gms.games.APP_ID=“@string/app_id”
  • com…android.gms.appstate.APP_ID=“@string/app_id”
  • android.permission.GET_ACCOUNTS
  • android.permission.USE_CREDENTIALS

The Developer Console also says the Game services is “Ready to Test” and I have uploaded an APK to “Production”.
When I play the app that is now on my phone from pressing “Launch” in the editor, it attempts to log in and even shows the Play login screen on-top the game screen, however after a few seconds my “Print String” to indicate a failure will fire.
I feel like I’ve tried everything and even started the process from scratch to make sure I didn’t mess up at some point, I don’t know what else I can try.
If anyone has any ideas for fixes please let me know.

Thanks.

,

Have you compared your set up to the one in Unreal Match 3? Are you able to provide me with a sample project to test with, or exact reproduction steps/screenshots to see how it’s set up?

[Unreal Match 3 Guide][1]

Thanks!

Sample Game Projects for Unreal Engine | Unreal Engine 5.1 Documentation

I have it set up just like the Unreal Match 3 project, with the login function being called from the game instance.

Ok, so I have looked at your set up and I have tested it myself. I too am receiving a failure. I believe this is due to your whole blueprint not being complete.

If you take a look at my example, you’ll see that there is more added in the blueprint for Unreal Match 3:

Try to add the function: Get Online Account ID > Register Online ID > Init Achievements (if you plan to implement acheivements) > Load Options (if you plan to implement options)

I would also suggest going back over the Unreal Match 3 Guide and making sure that no steps were missed when you were setting this up.

  • [Not connecting to Play Services (4.7)][2]
  • [Guide: Using Play Services Leaderboards][3]
  • [Guide: Using Play Achievements][4]
  • [Guide from 2014: Play Setup][5]

I hope this information helps you. Let me know if anything is unclear or does not work well for you, and we’ll dig into this deeper.

Thanks!

The functions you suggest I add seem to be custom for the Unreal Match 3 game, as they are not available in my project. The order in the Match 3 project also has the functions called after the Play login is successful or unsuccessful, so would this affect the result anyway? Could the issue be due to the log in being called in the game instance? I have also tried moving it to the game mode but get the same result.

So, when you’re trying to get Play to work in your game, you’re going to want to recreate the same type of functions that are in Unreal Match 3.

You need to make sure that you’re setting up the blueprint to ‘Register Online ID’ which is shown in the example above. You’ll find it in the C++ file called “Match3GameInstance.cpp”. Scroll down to line 110 and you’ll see the new function created. You may need more than just that one simple line of code, so please make sure that you read over the C++ classes that are listed in Unreal Match and go from there.

Without setting up all of the logic in your blueprints and/or code, your Play is going to continue to fail, because it’s not able to connect with the amount of logic currently set up in your blueprint.

You’re also going to need to make sure that you have all of the Play Services information to enter into the Project Settings > Android > Play Services section.

Good luck! :slight_smile:

Creating the functions “Get Online Account ID” and “Register Online ID” solved the problem, and now Play seems to work. Thanks for your help.

Hello

Looks like I have same problem as this guy. My game is created only with blueprints , but I cant connect to get achievements working. the main problem that I cant create function " get online account ID" is there any other way around to get it without coding?

Abuzhis,

If your issue is not resolved by the accepted answer on this post, you’ll need to create a new AnswerHub post. Please be sure to provide as many details as possible.

Thank you!