Search Unity

Question Leave a Voice and Text channel Error Message

Discussion in 'Vivox (Voice & Text Chat)' started by AltavaGroup, Mar 20, 2023.

  1. AltavaGroup

    AltavaGroup

    Joined:
    Apr 1, 2021
    Posts:
    2
    Vivox login is also normal,
    Channel access / other user access event normal operation confirmed.
    When leaving the channel, the error occurred.
    I haven't been able to figure out the current cause.
    I am asking for help.

    Code (CSharp):
    1. <SetNoSessionTransmitting>b__0: vx_req_sessiongroup_set_tx_no_session_t failed: VivoxUnity.VivoxApiException: Target Object Does Not Exist (1001)
    2.   at VivoxUnity.VxClient.EndIssueRequest (System.IAsyncResult result) [0x0004c] in C:\Projects\Altava_Main\Library\PackageCache\com.unity.services.vivox@15.1.190400-pre.1\Runtime\VivoxUnity\VxClient.cs:232
    3.   at VivoxUnity.Private.LoginSession+<>c__DisplayClass136_0.<SetNoSessionTransmitting>b__0 (System.IAsyncResult result) [0x00002] in C:\Projects\Altava_Main\Library\PackageCache\com.unity.services.vivox@15.1.190400-pre.1\Runtime\VivoxUnity\Private\LoginSession.cs:1356
    4. UnityEngine.Debug:LogError (object)
    5. VivoxUnity.VivoxDebug:DebugMessage (object,vx_log_level) (at Library/PackageCache/com.unity.services.vivox@15.1.190400-pre.1/Runtime/VivoxUnity/VivoxDebug.cs:87)
    6. VivoxUnity.VivoxDebug:VxExceptionMessage (string) (at Library/PackageCache/com.unity.services.vivox@15.1.190400-pre.1/Runtime/VivoxUnity/VivoxDebug.cs:45)
    7. VivoxUnity.Private.LoginSession/<>c__DisplayClass136_0:<SetNoSessionTransmitting>b__0 (System.IAsyncResult) (at Library/PackageCache/com.unity.services.vivox@15.1.190400-pre.1/Runtime/VivoxUnity/Private/LoginSession.cs:1360)
    8. VivoxUnity.AsyncResult`1<vx_resp_base_t>:SetComplete (vx_resp_base_t) (at Library/PackageCache/com.unity.services.vivox@15.1.190400-pre.1/Runtime/VivoxUnity/AsyncResult.cs:120)
    9. VivoxUnity.VxClient:InstanceOnMainLoopRun (bool&) (at Library/PackageCache/com.unity.services.vivox@15.1.190400-pre.1/Runtime/VivoxUnity/VxClient.cs:167)
    10. MessagePump:RunOnce () (at Library/PackageCache/com.unity.services.vivox@15.1.190400-pre.1/Runtime/VivoxUnity/MessagePump.cs:73)
    11. MessagePump:RunUntil (LoopDone) (at Library/PackageCache/com.unity.services.vivox@15.1.190400-pre.1/Runtime/VivoxUnity/MessagePump.cs:56)
    12. VivoxUnity.Client:RunOnce () (at Library/PackageCache/com.unity.services.vivox@15.1.190400-pre.1/Runtime/VivoxUnity/Client.cs:298)
    13. VivoxUnity.VxUnityInterop/<VivoxUnityRun>d__6:MoveNext () (at Library/PackageCache/com.unity.services.vivox@15.1.190400-pre.1/Runtime/VivoxUnity/VxUnityInterop.cs:66)
    14. UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)

    Code (CSharp):
    1. Error: Target Object Does Not Exist (1001)
    2. UnityEngine.Debug:LogError (object)
    3. VivoxUnity.VxUnityInterop/<VivoxUnityRun>d__6:MoveNext () (at Library/PackageCache/com.unity.services.vivox@15.1.190400-pre.1/Runtime/VivoxUnity/VxUnityInterop.cs:70)
    4. UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
    ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
    Channel Leave Code


    Code (CSharp):
    1.  
    2. public void CurLeaveChannel()
    3. {
    4.             if (curChannelInfo.channelSession == null)
    5.                 return;
    6.  
    7.             var state = curChannelInfo.channelSession.AudioState;
    8.             if (state == ConnectionState.Disconnected || state == ConnectionState.Disconnecting)
    9.                 return;
    10.  
    11.             Debug.Log("[Vivox] CurLeaveChannel : Start");
    12.  
    13.             if (curChannelInfo.channelSession != null && state == ConnectionState.Connected)
    14.             {
    15.                 var channelSession = loginSession.GetChannelSession(curChannelInfo.curJoinChannel);
    16.  
    17.                 if (channelSession == null)
    18.                     return;
    19.  
    20.                 channelSession.Disconnect();
    21.                 loginSession.DeleteChannelSession(curChannelInfo.curJoinChannel);
    22.                 Debug.Log($"[Vivox] CurLeaveChannel : {curChannelInfo.curJoinChannel.Name}");
    23.             }
    24.             Debug.Log("[Vivox] CurLeaveChannel : End");
    25. }
    26.  
     
  2. MurphyMurph_21

    MurphyMurph_21

    Joined:
    Jul 3, 2020
    Posts:
    73
    I think the problem is on line 21. Instead of
    loginSession.DeleteChannelSession(curChannelInfo.curJoinChannel);
    use
    loginSession.DeleteChannelSession(channelSession);
    and see if that works