#Unity Player Accounts Unexpected Error on Android and iOS
1 messages · Page 1 of 1 (latest)
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)
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.
Hi @last radish thanks for your answer 🙂 Unfortunately it didn't work 😬 Any other ideas?
The event just never fires?
It fires but it doesn't solve the problem with the login time out
The timeout is your custom logic, no?
I think so, but maybe @worn moon can tell you more about that 🙂
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.
I would remove the while loop and Task Delay. The try catch is all you need
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].
could be a permissions issue maybe?
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.
I forgot it opens a separate browser window