Ios Authentication Issue (Social.ILocalUser.Authenticate()) Caused user deadlock

Hey all.

I have recently been setting up the Authentication Services for our newest game and recently published and seem to have come across a horrible issue.

The issue being the following method – Social.LocalUser.Authetnicate(), sometimes // constantly never prompts or does anything for some users.

Method REF:- Unity - Scripting API: SocialPlatforms.ILocalUser.Authenticate

So an example would be.

  • The user launches the game, beginning the authentication Process.
  • User gets to the Login stage of authentication and calls – Social.LocalUser.Authetnicate()
  • User never gets any feedback from this method, no modal popup, or error messages.
    – Causes the user to be permanently stuck in this method and no way to opt out or do anything else due to the method being fired off.

The issue laying here is, there’s no way to handle a failed / missing - Social.LocalUser.Authetnicate() calls, from what I can see, due to I already handle Failure/Success and even had to opt to make a forced time out method if the user somehow linger in that area for more than 100 seconds.

Is there anything else I can look at or do to amend this for users, the main thing i’m wanting to find out is why this occurs or if there already a built in Timeout function for that method that I could use, or even a way to check the status of the current existing call of Social.LocalUser.Authetnicate().

– WorkAround for this issue I found out –

I have also found a work around recently to which does permanently fix the issue for users and it does seem to be a constant GameCenter issue for other people in the past, so it’s possible that’s it not a unity issue.

Work Around found from EA Support Staff - https://answers.ea.com/t5/Technical-Issues/Game-Center-Not-Available/td-p/5609677

The acutal workaround is as follows — Go to settings → Game Center —> log out — > Log in — > restart phone.

To which permanently fixes this issue, the problem here is it’s quite hard warning users about this issue and how to fix it, due to it really shouldn’t be an issue to begin with.

Unity Version: 2019.4.4

TL : DR – Social.LocalUser.Authetnicate() can sometimes never return a value, deadlocking the Authentication process, only way to fix this is by making a forced time out after 100 seconds or the user doing the work around I mentioned above.

I can confirm we have the same issue in our game and have been using this workaround, although I don’t think we require players to restart their phones.

Like so many other cripling bugs I’m sure this will get ignored for months to come or fixed in the latest version of Unity which no sane developer should be using for production.

1 Like

What verison of unity are you on, we’re on 2019.4.4

@PandaArcade

We’re using Unity 2019.4.9f1

happened to us on 2021.3.16 a couple of times, any solutions ? why the timeout has to be after 100 seconds and not earlier?

My project also has the same issue.
Unity 2020.3.40f1

Per documentation:

On certain platforms (including but not limited to iOS and tvOS), the callback is only invoked on the first call to Authenticate(). Subsequent calls to Authenticate() on such platforms results in no callback being triggered. This can occur if, for example, the user or the OS cancels the authentication operation before it has completed. Please ensure you test for this situation.