#Unity Player Accounts Unexpected Error on Android and iOS

1 messages · Page 1 of 1 (latest)

worn moon
#

Hello,

I use for a Project the Unity Services Authentication and Player Services. When i use it in the Unity Editor everything works fine with the player login. But on Device i get after 30 sec. a Unexpeted Error because it took to long and i break up the try.

Does anyone know where i can find more about it. 🙂

#

Autoconnected Player "Autoconnected Player" Unexpected error during sign-up: Authentication timed out while waiting for Unity Player Accounts sign-in.
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
SumoVolley.Infrastructure.Authentication.<SignUp>d__53:MoveNext() (at D:\Unity\Unity Projects\SumoVolley\Assets\Application\Infrastructure\Client\Authentication\AuthenticationWrapper.cs:131)
System.Runtime.CompilerServices.MoveNextRunner:InvokeMoveNext(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Threading.Tasks.<>c:<.cctor>b__7_0(Object)
UnityEngine.WorkRequest:Invoke() (at \home\bokken\build\output\unity\unity\Runtime\Export\Scripting\UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext:Exec() (at \home\bokken\build\output\unity\unity\Runtime\Export\Scripting\UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext:ExecuteTasks() (at \home\bokken\build\output\unity\unity\Runtime\Export\Scripting\UnitySynchronizationContext.cs:107)

last radish
#

I wouldn't use a while loop and Task.Delay to await UPA sign-in. PlayerAccountService has an event that fires when a sign-in is detected.

fallen barn
#

Hi @last radish thanks for your answer 🙂 Unfortunately it didn't work 😬 Any other ideas?

fallen barn
#

It fires but it doesn't solve the problem with the login time out

last radish
fallen barn
#

I think so, but maybe @worn moon can tell you more about that 🙂

last radish
#

I just wouldn't use it. It's not really necessary. Using the event to listen for a successful sign in is all you really need to do.

#

Any while loop or timeout logic doesn't really make sense to use because starting the UPA sign in process opens a browser on mobile and backgrounds the app. It won't run anyway.

torpid silo
#

I would remove the while loop and Task Delay. The try catch is all you need

worn moon
#

So i did it without the timeout. It does still does not work on device but on the Editor it works.

#

i just get no connection to the target info:

Autoconnected Player "Autoconnected Player" Player connection [544275938480] Started UDP target info broadcast (1) on [225.0.0.222:54997].

torpid silo
#

could be a permissions issue maybe?

last radish
#

I just tested UPA sign in on Android without issue. My code almost exactly follows the sample on the docs.

#

I would test the sample code in fresh scene and see if that gives you the same issue or not.

#

Since you're getting issues on both Android and iOS, I suspect it's something specific to your setup and not anything permissions related.

#

I still suspect it's something related to how you're awaiting tasks and mobile devices not agreeing with it when they get backgrounded. I would just cut all of that out and try to stick pretty close to the sample.

torpid silo
#

I forgot it opens a separate browser window