Dedicated server not spawning any tanks anymore

Hi There,

I’m currently doing the Crashes & Bug Fixes lecture and I can’t work out for the life of me why my game fails to spawn the player. I had it working from a server side and client side in the past and we did the step to fix a potential bug where we manually handle the spawning. I’ve compared it code wise and it seems okay.

I can confirm that it runs fine when i do host and client, only server is breaking.

I successfully load into the scene just without a tank.

I’ve put a debug point on the on the ApprovalCheck method at the start but it looks like it never calls the ApprovalCheck Method which is confusing.

I also took a relatively drastic method and replaced my entire scripts folder with the scripts folder from the github version, rehooked everything up and ran it again and ran into the same problem, so this should rule out any issues from a code perspective i think.

So it makes me think i’ve maybe not dragged in a reference that should be there in the inspector, otherwise i’m stumped.

Any help would be greatly appreciated.

1 Like

Actually now that I think about it, is the approval check from the network server only run on the dedicated server? I’m not sure I’d even see it.

either way, I think replacing the scripts folder should still have ruled out anything code related, but I’m open to any idea’s I can look into / code snips you’d like shared.

Thanks

Hi there,

This could be an issue on the server. Are you able to check the server logs to see what is happening? Sometimes you might just need to turn the servers on and off again when first uploading your builds just to get them working correctly.

Hmm, i attempted a reupload. i’m not sure what to give you in terms of server logs but i did find this here which doesn’t look too good:

GetMatchmakerAllocationPayloadAsync:
{
  "matchProperties": {
    "teams": [
      {
        "teamName": "Solo Team",
        "teamId": "c0c82d39-c3c8-4953-81be-8f4f468dbc4f",
        "playerIds": [
          "5mRz7v7H7K3XwkwTkLSbmspkQRV7"
        ]
      }
    ],
    "players": [
      {
        "id": "5mRz7v7H7K3XwkwTkLSbmspkQRV7",
        "customData": {
          "map": 0,
          "gameMode": 0,
          "gameQueue": 0
        }
      }
    ],
    "region": "c89c70a3-50ab-47b0-8710-222189825f7f",
    "backfillTicketId": "bbe8776f-5c76-440f-a53b-0db42bd53746"
  },
  "generatorName": "Solo Match",
  "queueName": "solo-queue",
  "poolName": "solo-pool",
  "environmentId": "670edae2-52ec-4af3-9b72-2f3505356d02",
  "backfillTicketId": "bbe8776f-5c76-440f-a53b-0db42bd53746",
  "matchId": "5e55c6fd-9a3c-4a4c-bb26-53b5368b1f35",
  "poolId": "5a4e3547-c2dd-43df-ab28-9e81bee4abca"
}
Starting backfill Server: 1/20
[Matchmaker]: EntityNotFound (21404) 
 Title: Not Found 
 Errors: 
{"Ticket":["Backfill Ticket bbe8776f-5c76-440f-a53b-0db42bd53746 not found"]}
HttpException`1: (404) HTTP/1.1 404 Not Found
  at Unity.Services.Matchmaker.Http.ResponseHandler.HandleAsyncResponse (Unity.Services.Matchmaker.Http.HttpClientResponse response, System.Collections.Generic.Dictionary`2[TKey,TValue] statusCodeToTypeMap) [0x00065] in <f62f0be80edb4bbcbb1715e27881282f>:0 
  at Unity.Services.Matchmaker.Http.ResponseHandler.HandleAsyncResponse[T] (Unity.Services.Matchmaker.Http.HttpClientResponse response, System.Collections.Generic.Dictionary`2[TKey,TValue] statusCodeToTypeMap) [0x00000] in <f62f0be80edb4bbcbb1715e27881282f>:0 
  at Unity.Services.Matchmaker.Apis.Backfill.BackfillApiClient.ApproveBackfillTicketAsync (Unity.Services.Matchmaker.Backfill.ApproveBackfillTicketRequest request, System.String payloadProxyToken, Unity.Services.Matchmaker.Configuration operationConfiguration) [0x0011f] in <f62f0be80edb4bbcbb1715e27881282f>:0 
  at Unity.Services.Matchmaker.WrappedMatchmakerService.TryCatchRequest[TRequest,TReturn] (System.Func`4[T1,T2,T3,TResult] func, TRequest request) [0x0008f] in <f62f0be80edb4bbcbb1715e27881282f>:0 
Rethrow as MatchmakerServiceException: HTTP/1.1 404 Not Found
  at Unity.Services.Matchmaker.WrappedMatchmakerService.ResolveErrorWrapping (Unity.Services.Matchmaker.MatchmakerExceptionReason reason, System.Exception exception) [0x00117] in <f62f0be80edb4bbcbb1715e27881282f>:0 
  at Unity.Services.Matchmaker.WrappedMatchmakerService.TryCatchRequest[TRequest,TReturn] (System.Func`4[T1,T2,T3,TResult] func, TRequest request) [0x0010f] in <f62f0be80edb4bbcbb1715e27881282f>:0 
  at Unity.Services.Matchmaker.WrappedMatchmakerService.ApproveBackfillTicketAsync (System.String backfillTicketId) [0x0010e] in <f62f0be80edb4bbcbb1715e27881282f>:0 
  at MatchplayBackfiller.BackfillLoop () [0x00110] in <07f73c0894d74a4591d60841dc4b7a88>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in <bb088ab5ef6b437f85ed9cbe6066127e>:0 
  at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00002] in <9b3eb719efb94c248eaf2f5fe0edd841>:0 
  at UnityEngine.UnitySynchronizationContext.Exec () [0x0005d] in <9b3eb719efb94c248eaf2f5fe0edd841>:0 
  at UnityEngine.UnitySynchronizationContext.ExecuteTasks () [0x00014] in <9b3eb719efb94c248eaf2f5fe0edd841>:0 

Okay, so the good news is i got it fixed.

I realized that after replacing my code base with the git hub repo i republished my old branch rather than the new one i’d replaced with. It means it must’ve had a code issue but i can’t for the life of me find what it is. Either way, i’m pretty happy the ticket can just be marked as resolved, i have no issues at the moment :slight_smile:

Thanks!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms