5

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"
Martin Zikmund
  • 38,440
  • 7
  • 70
  • 91
cherepets
  • 259
  • 2
  • 10
  • Are those placeholders in the URL or the actual URL? I assume placeholder. – Nkosi Oct 04 '18 at 10:27
  • No, I see real SCID, LeaderboardID and Xbox User ID. – cherepets Oct 04 '18 at 14:25
  • Is it possible saving the score fails? According to the source code of the SDK, 404 is returned if the leaderboard is empty https://github.com/Microsoft/xbox-live-api/blob/c8461904ac389940c12b18c0473f65540bf69a1a/Include/xsapi/errors.h#L228 – Martin Zikmund Oct 05 '18 at 05:51
  • Possible. But shouldn't we get any error at step 2 then? – cherepets Oct 05 '18 at 13:51
  • 1
    @MartinZikmund, I uploaded my game to the store and I checked that I can see the correct leaderboard in console menus so I think saving the score works perfectly. – cherepets Oct 06 '18 at 02:55
  • @cherepets Did you ever resolve this issue? I'm getting this same error. Everything looks fine as Xbox Player is logged in (this would fail if the sand box id wasn't right) and I'm using my own Xbox Live account as a Test account. – Dominique Jan 02 '21 at 22:14
  • @Dominique I did. By not using the SDK anymore ‍♂️ – cherepets Jun 29 '21 at 16:35
  • @Dominique Documentation says it's necessary to have the log in and select user functionality to pass the certification. But actually you can easily pass without it at all – cherepets Jun 29 '21 at 16:36
  • @cherepets what did you use instead or did you give up on leaderboards? – Dominique Jul 06 '21 at 12:54
  • @Dominique Yes, I've removed all Xbox Live related functionality. – cherepets Jul 06 '21 at 14:32
  • @Dominique May be it's possible to use own leaderboards server. But I didn't try as it's not that important for my game. – cherepets Jul 06 '21 at 14:33
  • @cherepets I had considered it. I just wish things that Microsoft say work, would just work. It would make dev so much simpler. Native leaderboards JUST work on iOS! I've had 2 tickets outstanding on this Xbox leaderboard issue for 6 months now and 2 weeks ago, XboxSupport, on Twitter, told me to log a NEW ticket!! Absolute shambles! – Dominique Jul 19 '21 at 10:40
  • XBOX live is dead. Long live XBOX. Not helpful due to obsolescence. –  Dec 23 '22 at 00:42

1 Answers1

0

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

burnsi
  • 6,194
  • 13
  • 17
  • 27