Open BeamDwayne opened 1 week ago
could this be a backend problem? The SDK code that could result in a null
, which in turn results in the "Unable to fetch..." message,
public Promise<TournamentInfo> GetRunningTournamentInfo(string tournamentContentId)
{
return GetAllTournaments(isRunning: true).Map(resp =>
resp.tournaments.FirstOrDefault(tournament => string.Equals(tournament.contentId, tournamentContentId)));
}
Is doing a FirstOrDefault
, so if the predicate doesn't match (content naming case sensitive), then a null in generated.
BUT WHY is there no matching instance? Is it not in the list at all?
Step 1 in my mind is to stick a breakpoint in that code and inspect the GetAllTournaments
value to see if the tournament IS there, but something about our filtering is broken. If its a filtering thing, this is an SDK bug; otherwise it feels like a backend bug.
DevTournamentTest-main link: https://github.com/beamable/DevTournamentTest
DevTournamentTest-main wont run in Staging Environment.
Timeline of events: May 6th - DevTournamentTest-main, returns an error when attempting to run in Staging Environment BUT, relaunching the editor and republishing content eventually runs the program without errors. June 10th - I attempted going back and forth from Staging to Prod to Staging in order to run DevTournamentTest-main July 2nd - I was unable to run DevTournamentTest-main even after attempting the workarounds
To Reproduce
Expected behavior No errors are returned, will look up info on just the selected tournament.
Actual behavior User is prompted with “Exception: Unable to fetch tournament info for 'tournaments.test5min'“
Screenshots
DevTournamentTest-Main_StagingError.txt
Metadata Build Details: 2022.3.48f1 1.19.21
Additional context Add any other context about the problem here.