Error 404 when using Xbox Live SDK Leaderboards

423 views Asked by At

I’ve built a game (C#, UWP, Monogame) and want to integrate it with Xbox Live SDK (Microsoft.Xbox.Live.SDK.WinRT.UWP from NuGet).

Already got auth working but experiencing some problems with StatisticManager/Leaderboard.

What exactly am I doing:

  1. Add user with StatisticManager.AddLocalUser(user) and wait for StatisticEventType.LocalUserAdded event from DoWork

  2. Save score with StatisticManager.SetStatisticNumberData(user, leaderboardName, data) and wait for StatisticEventType.StatisticUpdateComplete event from DoWork

  3. Get the leaderboard with StatisticManager.GetLeaderboard(user, leaderboardName, query) and wait for StatisticEventType.GetLeaderboardComplete event from DoWork

On step 3 I get a C++ exception:

“Not found (404)”.

[This looks very similar to this issue](Exceptions and Error 404 when using StatsManager ).

So I’ve already checked the sandbox ID, config file and leaderboard ID but still get the same result.

I did capture the traffic from HTTP monitoring and I see URL like:

"https://leaderboards.xboxlive.com/scids/{scid}/leaderboards/stat({leaderboardId})?xuid={myXboxId}&maxItems=5"
1

There are 1 answers

0
Mrsong1990 On

under development, you must change your Xbox SANDBOX from RETAIL to {your sandbox} using XboxLiveTools (you can find it in github). after published you can switch it back to RETAIL,and if there is no data in leaderboard return result with zero row no exception throw

I fixed the same problem by myself