Search Unity

Failed to join Lobby (solved - BUG)

Discussion in 'Lobby' started by Andreas12345, Aug 12, 2022.

  1. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Bug will be reported.
    When i see the millions of Problems here in the forum, i dont think thats
    the new Netcode is ready, and should be marked as beta.


    Error when try to join the lobby:
    it start with:
    Code (CSharp):
    1. [Lobby]: ValidationError, (16000). Message: request failed validation
    2. UnityEngine.Logger:LogError (string,object)
    3. Unity.Services.Lobbies.Logger:LogError (object) (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Utils/Logger.cs:17)
    4. Unity.Services.Lobbies.Internal.WrappedLobbyService:ResolveErrorWrapping (Unity.Services.Lobbies.LobbyExceptionReason,System.Exception) (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/SDK/WrappedLobbyService.cs:410)
    5. Unity.Services.Lobbies.Internal.WrappedLobbyService/<TryCatchRequest>d__19`2<Unity.Services.Lobbies.Lobby.JoinLobbyByCodeRequest, Unity.Services.Lobbies.Models.Lobby>:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/SDK/WrappedLobbyService.cs:356)
    6. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Lobbies.Response`1<Unity.Services.Lobbies.Models.Lobby>>:SetException (System.Exception)
    7. Unity.Services.Lobbies.Apis.Lobby.LobbyApiClient/<JoinLobbyByCodeAsync>d__11:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Apis/LobbyApi.cs:370)
    8. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Lobbies.Http.HttpClientResponse>:SetResult (Unity.Services.Lobbies.Http.HttpClientResponse)
    9. Unity.Services.Lobbies.Http.HttpClient/<MakeRequestAsync>d__3:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Http/HttpClient.cs:47)
    10. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Lobbies.Http.HttpClientResponse>:SetResult (Unity.Services.Lobbies.Http.HttpClientResponse)
    11. Unity.Services.Lobbies.Http.HttpClient/<CreateWebRequestAsync>d__7:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Http/HttpClient.cs:138)
    12. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Lobbies.Http.HttpClientResponse>:SetResult (Unity.Services.Lobbies.Http.HttpClientResponse)
    13. Unity.Services.Lobbies.Http.HttpClient/<>c__DisplayClass7_0/<<CreateWebRequestAsync>b__0>d:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Http/HttpClient.cs:135)
    14. System.Threading.Tasks.TaskCompletionSource`1<Unity.Services.Lobbies.Http.HttpClientResponse>:SetResult (Unity.Services.Lobbies.Http.HttpClientResponse)
    15. Unity.Services.Lobbies.Http.UnityWebRequestHelpers/<>c__DisplayClass0_0:<GetAwaiter>b__0 (UnityEngine.AsyncOperation) (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Http/UnityWebRequestHelpers.cs:34)
    16. UnityEngine.AsyncOperation:InvokeCompletionEvent ()
    17.  
    Code (CSharp):
    1. Unity.Services.Lobbies.LobbyServiceException: request failed validation ---> Unity.Services.Lobbies.Http.HttpException`1[Unity.Services.Lobbies.Models.ErrorStatus]: HTTP/1.1 400 Bad Request
    2.   at Unity.Services.Lobbies.Http.ResponseHandler.HandleAsyncResponse (Unity.Services.Lobbies.Http.HttpClientResponse response, System.Collections.Generic.Dictionary`2[TKey,TValue] statusCodeToTypeMap) [0x0006d] in G:\FGR2\FGR2_clone_0\Library\PackageCache\com.unity.services.lobby@1.0.1\Runtime\Http\ResponseHandler.cs:103
    3.   at Unity.Services.Lobbies.Http.ResponseHandler.HandleAsyncResponse[T] (Unity.Services.Lobbies.Http.HttpClientResponse response, System.Collections.Generic.Dictionary`2[TKey,TValue] statusCodeToTypeMap) [0x00000] in G:\FGR2\FGR2_clone_0\Library\PackageCache\com.unity.services.lobby@1.0.1\Runtime\Http\ResponseHandler.cs:186
    4.   at Unity.Services.Lobbies.Apis.Lobby.LobbyApiClient+<JoinLobbyByCodeAsync>d__11.MoveNext () [0x00173] in G:\FGR2\FGR2_clone_0\Library\PackageCache\com.unity.services.lobby@1.0.1\Runtime\Apis\LobbyApi.cs:369
    5. --- End of stack trace from previous location where exception was thrown ---
    6.   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
    7.   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <695d1cc93cca45069c528c15c9fdd749>:0
    8.   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <695d1cc93cca45069c528c15c9fdd749>:0
    9.   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <695d1cc93cca45069c528c15c9fdd749>:0
    10.   at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
    11.   at Unity.Services.Lobbies.Internal.WrappedLobbyService+<TryCatchRequest>d__19`2[TRequest,TReturn].MoveNext () [0x0003f] in G:\FGR2\FGR2_clone_0\Library\PackageCache\com.unity.services.lobby@1.0.1\Runtime\SDK\WrappedLobbyService.cs:352
    12.    --- End of inner exception stack trace ---
    13.   at Unity.Services.Lobbies.Internal.WrappedLobbyService.ResolveErrorWrapping (Unity.Services.Lobbies.LobbyExceptionReason reason, System.Exception exception) [0x000c1] in G:\FGR2\FGR2_clone_0\Library\PackageCache\com.unity.services.lobby@1.0.1\Runtime\SDK\WrappedLobbyService.cs:410
    14.   at Unity.Services.Lobbies.Internal.WrappedLobbyService+<TryCatchRequest>d__19`2[TRequest,TReturn].MoveNext () [0x0009f] in G:\FGR2\FGR2_clone_0\Library\PackageCache\com.unity.services.lobby@1.0.1\Runtime\SDK\WrappedLobbyService.cs:356
    15. --- End of stack trace from previous location where exception was thrown ---
    16.   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
    17.   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <695d1cc93cca45069c528c15c9fdd749>:0
    18.   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <695d1cc93cca45069c528c15c9fdd749>:0
    19.   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <695d1cc93cca45069c528c15c9fdd749>:0
    20.   at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
    21.   at Unity.Services.Lobbies.Internal.WrappedLobbyService+<JoinLobbyByCodeAsync>d__8.MoveNext () [0x00085] in G:\FGR2\FGR2_clone_0\Library\PackageCache\com.unity.services.lobby@1.0.1\Runtime\SDK\WrappedLobbyService.cs:133
    22. --- End of stack trace from previous location where exception was thrown ---
    23.   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
    24.   at Unity.Services.Lobbies.Internal.WrappedLobbyService+<JoinLobbyByCodeAsync>d__8.MoveNext () [0x0018f] in G:\FGR2\FGR2_clone_0\Library\PackageCache\com.unity.services.lobby@1.0.1\Runtime\SDK\WrappedLobbyService.cs:147
    25. --- End of stack trace from previous location where exception was thrown ---
    26.   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
    27.   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <695d1cc93cca45069c528c15c9fdd749>:0
    28.   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <695d1cc93cca45069c528c15c9fdd749>:0
    29.   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <695d1cc93cca45069c528c15c9fdd749>:0
    30.   at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
    31.   at LobbyManager+<JoinLobby>d__10.MoveNext () [0x0002d] in G:\FGR2\FGR2_clone_0\Assets\Scripts\LobbyManager.cs:76
    32. UnityEngine.Debug:LogError (object)
    33. LobbyManager/<JoinLobby>d__10:MoveNext () (at Assets/Scripts/LobbyManager.cs:80)
    34. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Lobbies.Models.Lobby>:SetException (System.Exception)
    35. Unity.Services.Lobbies.Internal.WrappedLobbyService/<JoinLobbyByCodeAsync>d__8:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/SDK/WrappedLobbyService.cs:147)
    36. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Lobbies.Response`1<Unity.Services.Lobbies.Models.Lobby>>:SetException (System.Exception)
    37. Unity.Services.Lobbies.Internal.WrappedLobbyService/<TryCatchRequest>d__19`2<Unity.Services.Lobbies.Lobby.JoinLobbyByCodeRequest, Unity.Services.Lobbies.Models.Lobby>:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/SDK/WrappedLobbyService.cs:386)
    38. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Lobbies.Response`1<Unity.Services.Lobbies.Models.Lobby>>:SetException (System.Exception)
    39. Unity.Services.Lobbies.Apis.Lobby.LobbyApiClient/<JoinLobbyByCodeAsync>d__11:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Apis/LobbyApi.cs:370)
    40. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Lobbies.Http.HttpClientResponse>:SetResult (Unity.Services.Lobbies.Http.HttpClientResponse)
    41. Unity.Services.Lobbies.Http.HttpClient/<MakeRequestAsync>d__3:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Http/HttpClient.cs:47)
    42. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Lobbies.Http.HttpClientResponse>:SetResult (Unity.Services.Lobbies.Http.HttpClientResponse)
    43. Unity.Services.Lobbies.Http.HttpClient/<CreateWebRequestAsync>d__7:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Http/HttpClient.cs:138)
    44. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Lobbies.Http.HttpClientResponse>:SetResult (Unity.Services.Lobbies.Http.HttpClientResponse)
    45. Unity.Services.Lobbies.Http.HttpClient/<>c__DisplayClass7_0/<<CreateWebRequestAsync>b__0>d:MoveNext () (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Http/HttpClient.cs:135)
    46. System.Threading.Tasks.TaskCompletionSource`1<Unity.Services.Lobbies.Http.HttpClientResponse>:SetResult (Unity.Services.Lobbies.Http.HttpClientResponse)
    47. Unity.Services.Lobbies.Http.UnityWebRequestHelpers/<>c__DisplayClass0_0:<GetAwaiter>b__0 (UnityEngine.AsyncOperation) (at Library/PackageCache/com.unity.services.lobby@1.0.1/Runtime/Http/UnityWebRequestHelpers.cs:34)
    48. UnityEngine.AsyncOperation:InvokeCompletionEvent ()
    Any Idea? Lobby and relay is setuped
     
    Last edited: Aug 13, 2022
  2. neviovalsa

    neviovalsa

    Joined:
    Jun 24, 2019
    Posts:
    52
    Hey there,

    I'm getting the same error. The only thing I noticed is that every time I recompile the code the request will succeed once. From the second attempt without recompiling I get the same error again.
     
  3. Soloden

    Soloden

    Joined:
    Feb 15, 2023
    Posts:
    3
    Hi, I got the same error but then I just change the type of request and I didn't got this error anymore but I got other one:(
     
  4. RobustKnittedTortoise

    RobustKnittedTortoise

    Unity Technologies

    Joined:
    Dec 10, 2018
    Posts:
    16
    Apologies, for some reason this thread never popped up in my feed!
    This issue has come up over and over and its usually the same thing, as referenced in this post here:
    To paraphrase the response there again:
    Looking further into this, I now see why there is so much confusion, it appears the validation errors coming back from the service are not being displayed in the error log messages! We will try to get this fixed in the next SDK release:
    Log message:
    Code (CSharp):
    1. [Lobby]: ValidationError, (16000). Message: request failed validation
    Message returned by server (captured via Fiddler):
    Code (CSharp):
    1. {
    2.     "code": 16000,
    3.     "detail": "request failed validation",
    4.     "details": [
    5.         {
    6.             "errorType": "validation",
    7.             "message": "lobby code 'BDE2589B-34F4-4B97-B932-16FA95C1C50C' is invalid because it contains an invalid character 'B' (index 0)"
    8.         }
    9.     ],
    10.     "status": 400,
    11.     "title": "Bad Request",
    12.     "type": "http://unity3d/lobby/errors/validation-error"
    13. }
     
    neviovalsa likes this.
  5. Mannerly_Chorus

    Mannerly_Chorus

    Joined:
    Mar 7, 2023
    Posts:
    1
    bruh this error still exists and i checked the string as well it contains only 6 character as well,
    Message: lobby code 'B' contains an invalid character 'B' (U+0042) at index 0

    the error i am able to see is lobby code does not allow specific characters to be used in the code, but i was using the relay code and then setting the same for the lobby

    upload_2023-4-26_11-35-22.png
    these are the characters which cannot be included in the lobby code duh idk why is this such a boundation?
     
  6. veleek_unity

    veleek_unity

    Ben Randall Unity Technologies

    Joined:
    Aug 25, 2021
    Posts:
    59
    The Lobby Code is _usually_ intended to be shared manually (e.g. you're in a Discord voice chat with your friends, and you're just saying it, or maybe you're on your phone and you're texting it to someone), so the set of characters that you can or cannot use is restricted to avoid accidentally miscommunication. We've also just recently made a change to return a more explicit error message in this case, to help make it clear that there's an invalid character.

    For example B/8, I/1, O/0/Q, S/5/Z, etc and not included in Join Codes.

    Lobby and Relay both have restricted alphabets, and they've just ended up with different alphabets.

    BUT, in general this shouldn't be a problem for you because you don't get to set the Lobby or Relay join code. When you create a lobby, it gets assigned a random join code.