Valid ID Domain not specified

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.d__35:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
Unity.Services.Core.Registration.CorePackageInitializer:Initialize(CoreRegistry)
Unity.Services.Core.Internal.<g__InitializePackageAtIndexAsync|0>d:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
Unity.Services.Core.Internal.<>c__DisplayClass3_0:g__InitializePackageAtIndexAsync|0(Int32)
Unity.Services.Core.Internal.d__3:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
Unity.Services.Core.Internal.CoreRegistryInitializer:InitializeRegistryAsync()
Unity.Services.Core.Internal.<g__InitializePackagesAsync|1>d:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
Unity.Services.Core.Internal.<>c__DisplayClass22_0:g__InitializePackagesAsync|1()
Unity.Services.Core.Internal.d__22:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
Unity.Services.Core.Internal.UnityServicesInternal:InitializeServicesAsync()
Unity.Services.Core.Internal.d__20:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
Unity.Services.Core.Internal.UnityServicesInternal:InitializeAsync(InitializationOptions)
Unity.Services.Core.d__11:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
Unity.Services.Core.UnityServices:InitializeAsync(InitializationOptions)
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.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.AsyncTaskMethodBuilder1:SetException(Exception)** **Unity.Services.Authentication.<SendAsync>d__141: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.TaskCompletionSource1:TrySetException(Exception)** **System.Threading.Tasks.TaskCompletionSource1:SetException(Exception)
Unity.Services.Authentication.WebRequest:RequestCompleted(TaskCompletionSource1, Int64, Boolean, Boolean, String, String, IDictionary2)
Unity.Services.Authentication.<>c__DisplayClass15_0:b__0(AsyncOperation)
UnityEngine.AsyncOperation:InvokeCompletionEvent()

+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.

2 Likes

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.

2 Likes

I really need a way to set CloudProjectId manually or please fix it.

Deleting my Library folder fixed the issue on my Android builds.

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?! :hushed:).

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.

2 Likes