Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Anonymous Sign ID error in Build

Discussion in 'Authentication' started by VagelisGardikis, Feb 11, 2022.

  1. VagelisGardikis

    VagelisGardikis

    Joined:
    Apr 24, 2018
    Posts:
    20
    I have set the player to sign in anonymously and it works perfectly in the editor.
    when i build my app for android i get this error:

    2022/02/11 17:58:30.047 2008 2054 Error Unity [Authentication]: Request failed: 400, {"title":"INVALID_PARAMETERS","detail":"Valid ID Domain not specified","details":[],"status":400}

    2022/02/11 17:58:30.196 2008 2054 Error Unity Player sign In failed. Error : Unity.Services.Authentication.AuthenticationException: Valid ID Domain not specified ---> Unity.Services.Authentication.Utilities.WebRequestException: {"title":"INVALID_PARAMETERS","detail":"Valid ID Domain not specified","details":[],"status":400}
     
  2. mahdik_unity

    mahdik_unity

    Unity Technologies

    Joined:
    Sep 16, 2021
    Posts:
    15
    Hi @gardikis ,

    Have you set your project ID correctly in the editor settings? If so, can you please provide us your Project ID so that we could take a further look?
     
  3. VagelisGardikis

    VagelisGardikis

    Joined:
    Apr 24, 2018
    Posts:
    20
    the project Id and all that was okay. We managed to fix the issue by adding all the unity gaming services packages to the manifest, even those we havent used yet. I think when we added the Cloud Save package, the problem solved. I dont know why it happened, but it fixed the issue.
     
    RMGK and unity_Ctri like this.
  4. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    78
    Thanks for the update @gardikis :)
    Glad it's all sorted
     
  5. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    78
    For anyone who comes across this issue in the future - make sure the package dependencies (specifically the core package) is installed, and that your project is properly linked to a project in the Unity Dashboard.

    Unlinking and re-linking it may work in situations where the issue persists, as may reinstalling the package & its dependencies - which we think is what caused things to start workin in this instance!
     
  6. VagelisGardikis

    VagelisGardikis

    Joined:
    Apr 24, 2018
    Posts:
    20
    What do you mean by "the core package"?
    Do you mean the authentication package or something else?
     
  7. VagelisGardikis

    VagelisGardikis

    Joined:
    Apr 24, 2018
    Posts:
    20
    So far, on my android builds on 60% the authentiaction glitches.
    ive checked evrything about projectIds , reinstalled packages etc.
    It is very random whether the game will run without an error.
    i keep rebuilding and reimporting the game to my mobile witthout changing anything.
    sometimes it works, sometimes it doesnt and i get this message :

    upload_2022-2-17_18-9-51.png
     
  8. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    78
    Hey Gardikis,

    This is quite a puzzler for us. Is it practical for you to export the project ID into the logs when this happens?
    The feedback from the endpoint suggests that information is getting lost during the build process somehow.

    You should be able to get this with "Application.cloudProjectId"

    Thanks!
     
    Last edited: Feb 17, 2022
  9. VagelisGardikis

    VagelisGardikis

    Joined:
    Apr 24, 2018
    Posts:
    20
    Okay i will do it. Also i want to mention that on the computer it works perfectly(and im using economy, remote config, cloud save, cloude code too!).This is only happening on the android builds.
     
  10. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
  11. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    492
    What do you mean by core package? I have not seen any such package anywhere.
     
  12. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    78
    That's my mistake - in the early days of the beta, users had to install any dependency packages manually.
    These days it's all handled automatically by the package manager, so you can safely ignore references to it :)

    (But since I know that there's curiosity now: The short of it is that some of the UGS packages have shared features, so to avoid duplicated effort, increased file sizes and all that jazz, there's a shared dependency package between some of them :) )
     
    soleron likes this.
  13. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    492
    Ah, it makes sense now. Thanks for explaining.

    Regarding the actual topic, I find such glitches often. It happens to collab/teams as well.
    Receiving an error, saying that your project is not connected to an ID. (While it actually is and you just pushed some changes.) There is some weird lag in your services.

    Automating the package installation process to handle package interdependencies and of course having one common package to manage complexity is a great practice. But automated installation for interdependencies is an "old" feature by now. Happens for at least a year or two. So, it is confusing to see this mentioned even in some parts of the documentation as I see. Sends a lot of people searching in the wrong direction.

    I really like these new "Feature" collections that were introduced in 2021.2 though.
    It would help with the onboarding of many people if you had a similar collection for UGS.
    i.e. something like UGS package families.

    upload_2022-2-18_21-38-3.png
     

    Attached Files:

  14. erickb_unity

    erickb_unity

    Unity Technologies

    Joined:
    Sep 1, 2021
    Posts:
    26
    Hello,

    The project is validated during the build process and won't be available if the current account does not have access to the project.

    Normally when building using the editor build view, you should get a prompt that notifies you of this.

    However if you use your own build pipeline on top of Unity's or automation, you may not get this prompt/warning.

    Could this be the case for when this happened to you for your project?
     
  15. VagelisGardikis

    VagelisGardikis

    Joined:
    Apr 24, 2018
    Posts:
    20
    Im not sure if i got what u said 100% right, but when i want to build i do this:
    Build settings -> Build n run. thats all. i dont use any other pipelines.
    When this occurs , i see in the logger that it doesnt find the cloud project ID when building.
     
  16. RMGK

    RMGK

    Joined:
    Sep 30, 2011
    Posts:
    75
    When I unlink and then retry linking my project, the "Link project" button remains grayed out. Any way to fix this? Unity 2021.3.11
     
  17. RMGK

    RMGK

    Joined:
    Sep 30, 2011
    Posts:
    75
    I have been struggling with this for a while. This worked for me! Thank you. The only thing that I can see that changed is that
    "com.unity.services.authentication": "2.0.0",
    was added as a dependency in the packages-lock.json.
     
  18. cmersereau

    cmersereau

    Joined:
    Nov 6, 2020
    Posts:
    52
    Is there any new information about this issue? I have suddenly starting getting this issue after many months of successful builds. It's very hard to understand why it suddenly has started happening.

    To add as much info as I can, we are using analytics, relay, and lobby (and thus authentication). When running in the editor, we have no issues. When building and running for windows or android, we get errors first from trying to initialize the analytics service and then from sign in attempts. The sign in attempt yields the error for the original post, and the analytics error specifically calls out that the cloud Project ID could not be found. Recent cloud builds for android do not have this issue.
     
    Last edited: Nov 1, 2022
  19. cmersereau

    cmersereau

    Joined:
    Nov 6, 2020
    Posts:
    52
    I was able to resolve my issue by toggling the Burst AOT Settings for my project. It seems that something on my local machine got dirty and toggling this setting, making a build, and then switching back cleared it up. This does not seem like a solution that will work for everyone, but maybe it will help someone out there.