Search Unity

Bug Valid ID Domain not specified

Discussion in 'Authentication' started by han_neogames, Dec 13, 2022.

  1. han_neogames

    han_neogames

    Joined:
    Aug 7, 2022
    Posts:
    5
    Hello,
    we are using 2021.3.11f. (now 3.16f and still hapening)

    when I call "await UnityServices.InitializeAsync()" It works but shows error messages on xcode console
    No cloud project ID was found by the Analytics SDK. This means Analytics events will not be sent. Please make sure to link your cloud project in the Unity editor to fix this problem.

    To use Unity's dashboard services, you need to link your Unity project to a project ID. To do this, go to Project Settings to select your organization, select your project and then link a project ID. You also need to make sure your organization has access to the required products. Visit https://dashboard.unity3d.com to sign up. This will throw an exception in future release.

    and after that, I call this "await AuthenticationService.Instance.SignInAnonymouslyAsync()" and it returns "Valid ID Domain not specified" error.
    Request failed: 400, {"title":"INVALID_PARAMETERS","detail":"Valid ID Domain not specified","details":[],"status":400}


    ProjectId is fine on build logs.
    "OnPostprocessBuild().CloudProjectSettings.projectId: 3acf858e-****-****-****-b06b69b44c6d"
    "OnPostprocessBuild().Application.cloudProjectId: 3acf858e-****-****-****-b06b69b44c6d"

    ProjectId is not fine on runtime.
    "Application.cloudProjectId: "


    It SignInAnonymouslyAsync() works well on Android(development/release) and iOS(development) builds.
    This problem only happens on iOS build(release)

    I use RestAPI on iOS instead. it works.


    This is full logs from xcode console,

    [ServicesCore]: To use Unity's dashboard services, you need to link your Unity project to a project ID. To do this, go to Project Settings to select your organization, select your project and then link a project ID. You also need to make sure your organization has access to the required products. Visit https://dashboard.unity3d.com to sign up. This will throw an exception in future release.
    Unity.Services.Core.Registration.<Initialize>d__35:MoveNext()
    System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
    Unity.Services.Core.Registration.CorePackageInitializer:Initialize(CoreRegistry)
    Unity.Services.Core.Internal.<<InitializeRegistryAsync>g__InitializePackageAtIndexAsync|0>d:MoveNext()
    System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
    Unity.Services.Core.Internal.<>c__DisplayClass3_0:<InitializeRegistryAsync>g__InitializePackageAtIndexAsync|0(Int32)
    Unity.Services.Core.Internal.<InitializeRegistryAsync>d__3:MoveNext()
    System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
    Unity.Services.Core.Internal.CoreRegistryInitializer:InitializeRegistryAsync()
    Unity.Services.Core.Internal.<<InitializeServicesAsync>g__InitializePackagesAsync|1>d:MoveNext()
    System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
    Unity.Services.Core.Internal.<>c__DisplayClass22_0:<InitializeServicesAsync>g__InitializePackagesAsync|1()
    Unity.Services.Core.Internal.<InitializeServicesAsync>d__22:MoveNext()
    System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
    Unity.Services.Core.Internal.UnityServicesInternal:InitializeServicesAsync()
    Unity.Services.Core.Internal.<InitializeAsync>d__20:MoveNext()
    System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
    Unity.Services.Core.Internal.UnityServicesInternal:InitializeAsync(InitializationOptions)
    Unity.Services.Core.<InitializeAsync>d__11:MoveNext()
    System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
    Unity.Services.Core.UnityServices:InitializeAsync(InitializationOptions)
    <InitUnityGamingServices>d__89:MoveNext()
    System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
    AppLoader:InitUnityGamingServices(CancellationToken)



    [Authentication]: Request failed: 400, {"title":"INVALID_PARAMETERS","detail":"Valid ID Domain not specified","details":[],"status":400}
    Unity.Services.Authentication.AuthenticationServiceInternal:BuildServerException(WebRequestException)
    Unity.Services.Authentication.<HandleSignInRequestAsync>d__101:MoveNext()
    System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
    System.Runtime.CompilerServices.MoveNextRunner:Run()
    System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
    System.Threading.Tasks.Task:FinishContinuations()
    System.Threading.Tasks.Task:TrySetException(Object)
    System.Threading.Tasks.Task:FinishContinuations()
    System.Threading.Tasks.Task:TrySetException(Object)
    System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)
    Unity.Services.Authentication.<SendAsync>d__14`1:MoveNext()
    System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
    System.Runtime.CompilerServices.MoveNextRunner:Run()
    System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
    System.Threading.Tasks.Task:FinishContinuations()
    System.Threading.Tasks.Task:TrySetException(Object)
    System.Threading.Tasks.TaskCompletionSource`1:TrySetException(Exception)
    System.Threading.Tasks.TaskCompletionSource`1:SetException(Exception)
    Unity.Services.Authentication.WebRequest:RequestCompleted(TaskCompletionSource`1, Int64, Boolean, Boolean, String, String, IDictionary`2)
    Unity.Services.Authentication.<>c__DisplayClass15_0:<SendAttemptAsync>b__0(AsyncOperation)
    UnityEngine.AsyncOperation:InvokeCompletionEvent()

     
    Last edited: Jan 13, 2023
  2. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    76
    +1 here. I've found out UnityCloudProjectID key is missing its value in Info.plist for some reason. However adding it manually do not resolve the issue, so the problem is deeper.

    Also I've noticed a warning panel on the top of the build settings window about connection problem to Unity Services. But there is no such a warning if I do not launch building process. So as soon is building is complete this panel disappears.
     
    Last edited: Dec 15, 2022
    samol2014 and han_neogames like this.
  3. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    76
    I've managed to resolve the issue after deleting all temporary and cache folders of my project such as Library and etc. After reimport everything works fine.
     
    han_neogames and mahdik_unity like this.
  4. han_neogames

    han_neogames

    Joined:
    Aug 7, 2022
    Posts:
    5
    I really need a way to set CloudProjectId manually or please fix it.
     
  5. battlecouchstudio

    battlecouchstudio

    Joined:
    Sep 7, 2023
    Posts:
    4
    Deleting my Library folder fixed the issue on my Android builds.
     
  6. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    76
    I also have an update. I faced the same issue a year later and came across this post with my own answer (Oh my, am I really that old?! :eek:).

    However, this time deleting the Library folder didn't help, and I began to feel frustrated. Eventually, I realized that Unity had changed some of their plans. Our Team Advanced plan was automatically switched to Basic, causing all developers to lose their seats. This was the reason Unity services weren't functioning in my builds. Once I reassigned all the seats, everything started working again.

    For those to whom this information might be relevant.
     
    samol2014 and battlecouchstudio like this.