beamable / BeamableProduct

The beamable product suite including com.beamable, com.beamable.server, microservice base image, portal, the installer, and build scripts
Other
4 stars 0 forks source link

[Beam-Staging] User is prompted with "Exception: Unable to fetch tournament info for 'tournaments.test5min'" when tapping Fetch TournamentID #3522

Open BeamDwayne opened 1 week ago

BeamDwayne commented 1 week ago

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

  1. Launch DevTournamentTest-main project
  2. Change Environment to Staging
  3. Register/Login
  4. Open the Scenes/MainScene.unity scene
  5. Go to Content Manager and make sure content is published
  6. Enter Unity Play mode
  7. Click "Fetch TournamentID"

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 DevTournamentTest-Main_StagingError.txt

Metadata Build Details: 2022.3.48f1 1.19.21

Additional context Add any other context about the problem here.

cdhanna commented 5 days 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.