Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Vivox sometimes meet error HttpException: (404)

Discussion in 'Multiplayer' started by unity_qyNAJ9CdbDf9rw, Jan 31, 2024.

  1. unity_qyNAJ9CdbDf9rw

    unity_qyNAJ9CdbDf9rw

    Joined:
    Jun 18, 2019
    Posts:
    9
    I tried to install Vivox with chat voice into my game. My step by step were:

    1. UnityServices.InitializeAsync
    2. VivoxService.Instance.InitializeAsync()
    3. Wait for user to login as anonymous.
    4. await SignInAnonymouslyAsync
    5. VivoxManager.Instance.LoginToVivoxService()
    6. StartHost local for singleplayer.
    7. Connect to shared scene with deliciated server hosted by a server.


    Sometime, I think maybe after 3 successful try with my editor. This error happen ! I had read some about maybe Vivox handles multiple incoming API calls in an arbitrary order. But I have no way to fix it.
    Bonus: When I play Chat Sample from Unity Vivox official, login process take more than than me about 5 second and no error at all.

    Thanks for help, expert !

    HttpException: (404) HTTP/1.1 404 Not Found
    Unity.Services.Vivox.Mint.Http.ResponseHandler.HandleAsyncResponse (Unity.Services.Vivox.Mint.Http.HttpClientResponse response, System.Collections.Generic.Dictionary`2[TKey,TValue] statusCodeToTypeMap) (at ./Library/PackageCache/com.unity.services.vivox@16.0.1/Runtime/Generated/Http/ResponseHandler.cs:121)
    Unity.Services.Vivox.Mint.Http.ResponseHandler.HandleAsyncResponse[T] (Unity.Services.Vivox.Mint.Http.HttpClientResponse response, System.Collections.Generic.Dictionary`2[TKey,TValue] statusCodeToTypeMap) (at ./Library/PackageCache/com.unity.services.vivox@16.0.1/Runtime/Generated/Http/ResponseHandler.cs:227)
    Unity.Services.Vivox.Mint.Apis.Default.DefaultApiClient.ConnectTokenV1Async (Unity.Services.Vivox.Mint.Default.ConnectTokenV1Request request, Unity.Services.Vivox.Mint.Configuration operationConfiguration) (at ./Library/PackageCache/com.unity.services.vivox@16.0.1/Runtime/Generated/Apis/DefaultApi.cs:111)
    Unity.Services.Vivox.VivoxJWTTokenGen.FetchLoginMintTokenAsync () (at ./Library/PackageCache/com.unity.services.vivox@16.0.1/Runtime/VivoxServiceInternal.cs:1132)
    Rethrow as MintException: HTTP/1.1 404 Not Found
    Unity.Services.Vivox.VivoxJWTTokenGen.FetchLoginMintTokenAsync () (at ./Library/PackageCache/com.unity.services.vivox@16.0.1/Runtime/VivoxServiceInternal.cs:1137)
    Unity.Services.Vivox.VivoxJWTTokenGen.GetTokenAsync (System.String issuer, System.Nullable`1[T] expiration, System.String targetUserUri, System.String action, System.String tokenKey, System.String channelUri, System.String fromUserUri) (at ./Library/PackageCache/com.unity.services.vivox@16.0.1/Runtime/VivoxServiceInternal.cs:1118)
    Unity.Services.Vivox.LoginSession.LoginAsync (Unity.Services.Vivox.SubscriptionMode subscriptionMode, Unity.Services.Vivox.IReadOnlyHashSet`1[T] presenceSubscriptions, Unity.Services.Vivox.IReadOnlyHashSet`1[T] blockedPresenceSubscriptions, Unity.Services.Vivox.IReadOnlyHashSet`1[T] allowedPresenceSubscriptions, System.String accessToken, System.AsyncCallback callback) (at ./Library/PackageCache/com.unity.services.vivox@16.0.1/Runtime/VivoxUnity/Private/LoginSession.cs:499)
    Unity.Services.Vivox.VivoxServiceInternal.LoginAsync (Unity.Services.Vivox.LoginOptions loginOptions) (at ./Library/PackageCache/com.unity.services.vivox@16.0.1/Runtime/VivoxServiceInternal.cs:232)
    VivoxManager.LoginToVivox () (at Assets/Scripts/Network Related/Vivox/VivoxManager.cs:161)
    VivoxManager.LoginToVivoxService () (at Assets/Scripts/Network Related/Vivox/VivoxManager.cs:133)
    ClientGameManager.AuthUser (AuthMethod authMethod, System.Action`1[T] callback) (at Assets/Scripts/Networking/Client/ClientGameManager.cs:64)
    System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <787acc3c9a4c471ba7d971300105af24>:0)
    UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <10871f9e312b442cb78b9b97db88fdcb>:0)
    UnityEngine.UnitySynchronizationContext.Exec () (at <10871f9e312b442cb78b9b97db88fdcb>:0)
    UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <10871f9e312b442cb78b9b97db88fdcb>:0)
     

    Attached Files:

    • 2.png
      2.png
      File size:
      166.2 KB
      Views:
      9