Search Unity

Xbox Live sign-in error

Discussion in 'Windows' started by stuey0016, Nov 11, 2020.

  1. stuey0016

    stuey0016

    Joined:
    Oct 6, 2012
    Posts:
    10
    I've been fighting with a strange error when trying to sign-in a test user on the Xbox (see error message below). I have two users assigned to my test Xbox console. I've set the sandbox ID correctly (and added that Sandbox ID to my Xbox in Dev Mode). I've added <uap:SupportedUsers>multiple</uap:SupportedUsers> to my Package.appxmanifest file. Is there anything I'm missing?

    I have done a good bit of debugging in Microsoft.Xbox.Services.Client.SignInManager class. When the game launches, the Xbox opens the side-bar dialog with a list of all the test users on the console. I choose one, and SignInManager tries to run playerInfo.XboxLiveUser.SignInSilentlyAsync(). That returns a status of UserInteractionRequired. After seeing that status, SignInAsync() is called. The Xbox puts up a dialog for a moment, and then it closes, and that's when I get this exception:

    XboxException: Xbox Services flat C API return error code -1000 with message "Provider Error: Unexpected response code: Unknown error: 0x80131509"

    Does anyone know what that means? The processing of the sign-in bails when that exception is thrown. I'm sure it's one little thing I'm doing wrong, but it's hard to know what it is. Also, I had trouble finding a good forum on any of Microsoft's sites to post this...if you guys feel this post belongs there, please feel free to send me a link to the proper forum.

    Thanks, all!
     
  2. Stephen1701

    Stephen1701

    Joined:
    Mar 29, 2016
    Posts:
    132
    Hello

    I am unfamiliar with that error, but I do have XBL sign in working, so I can try and help you with it.
    Which version of the plugin are you using?
    QFE3? https://github.com/Microsoft/xbox-live-unity-plugin/releases/tag/v1804qfe3
    Or
    QFE 2?
    https://github.com/microsoft/xbox-live-unity-plugin/releases/tag/v1804qfe2

    I couldn't get 3 to work so I went to 2, which I now have working.
    Here are a couple of other points to check too

    • Is your Xbox in the correct sandbox> You can check at the top of the screen when the xbox loads in dev mode.
    • Did you associate the build with a game on your store list before deploying to Xbox?
    • Does it sign in correctly when running on the PC?
     
  3. stuey0016

    stuey0016

    Joined:
    Oct 6, 2012
    Posts:
    10
    Hello @StephenW,

    Apologies for not responding sooner...I'd sorta stopped watching this thread! I always appreciate someone trying to help.

    Unfortunately, I believe I've looked into all your possible causes. I do have the correct sandbox set and I did associate my project to the correct store App. When on the PC, it returns the Fake User that the Microsoft docs say it should. I even trying reverting to QFE2 (I had been running QFE 3) as you mentioned, but it doesn't seem to have helped.

    I debugged pretty far down into SignInManager.cs, which handles most of the cases of signing in. It's tough to know exactly what all the error messages mean. The MS docs are good with the Sunny Day case, but their explanation of error codes and such is very limited. Thankfully I also have some major performance optimizations to do, so that gives me a distraction from this problem! But if I ever figure it out I'll post it back here. Thanks, again!
     
    Stephen1701 likes this.
  4. Stephen1701

    Stephen1701

    Joined:
    Mar 29, 2016
    Posts:
    132
    Hello, I use QFE2, so I'm sure I could help you get that version running.
    There is a bug in the code for QFE2 (and it might even be in QFE3) when connecting to XBL which means it will never download your profile picture. This may or may not be your current problem, but it's definitely one to fix.

    The offending code is inside the function private IEnumerator FinishLoadingProfileInfo(), that is inside PlayerAuthentication.cs

    the code socialUser.DisplayPicRaw returns a URL with '&mode=Padding' inside it. And it is that that is causing the 400 Bad Request. They said they fixed it in 2017 but it's still occurring. So I used a string function called Replace to remove it from the string
    upload_2020-11-24_17-31-57.png
    so var socialUser is the returned string, I then enter it into testURL string and replace the '&mode=Padding' with an empty string and it worked fine.

    And double check that you have all of these correct details inside the XboxServices.config file
    {
    "PublisherId": "CN=00000000-0000-0000-0000-000000000000",
    "PublisherDisplayName": "",
    "PackageIdentityName": "",
    "DisplayName": "",
    "AppId": "",
    "ProductFamilyName": "",
    "PrimaryServiceConfigId": "00000000-0000-0000-0000-000000000000",
    "TitleId": 0,
    "Sandbox": "",
    }
     
  5. SkullSameh

    SkullSameh

    Joined:
    Mar 29, 2020
    Posts:
    3
    hello, @StephenW what about if (www.isDone && ............) should I remove it from the script?
     
  6. SkullSameh

    SkullSameh

    Joined:
    Mar 29, 2020
    Posts:
    3
    Hello @stuey0016 I have the same problem did you solve it? I have tried everything and still not working :(
     
  7. Stephen1701

    Stephen1701

    Joined:
    Mar 29, 2016
    Posts:
    132
    Sorry I haven't been keeping an eye on this thread.
    I don't think I removed that, no. I haven't used this in ages, pretty much gave up on XBL Integration.