Speaker getting unlinked after reconnection?

Everything thing is working fine in voice, but if one player disconnects and reconnects, the player who disconnected voice is not working, but he can hear the other guy's voice. We are using PhotonNetwork.ReconnectAndRejoin(). In voice settings, it is set to Auto connect, and I was checking the Client state also, it disconnects and reconnects back but he cant speak.

Comments

  • Hi @Krishna_jokerTM,

    What Photon Voice version are you using?
    Could you provide 100% minimal repro steps?
    Do you have full logs of a repro scenario with log level increased?
  • Voice is working. After you told to use PhotonNetwork.Instantiate, It is working fine, But when a user disconnects and reconnects, he can only hear the other user speaking. After that, log prints as PUNVoice: Player voice #1 speaker unlinked." , How to relink the speaker?
  • JohnTubeJohnTube mod
    edited May 2019
    If you are using Photon Voice Classic update to the latest version.
    How to relink the speaker?
    This should happen automatically and you do not need to do it explicitly.
    After that, log prints as PUNVoice: Player voice #1 speaker unlinked."
    This log message is normal after disconnection. Other players will unlink their local speakers from the player who got disconnected but this also should result in his GameObject (instantiated using PhotonNetwork.Instantiate) being destroyed. then it gets recreated when rejoined using PhotonNetwork.ReconnectAndRejoin. Is it the case?
    Did you change PhotonNetwork.autoCleanUpPlayerObjects? when you create rooms do you set RoomOptions.CleanupCacheOnLeave?
    Provide full log of a voice session with the issue reproduced for two players: the one who can't speak once connected and another player from the same room.
  • For online user: Image attached
    Disconnected User: Log Attached
    IMAGE LINK: https://imgur.com/5x2w3ce

    LOG:
    05-24 18:48:56.332 3728 3928 E Unity : Cannot send to: 169.38.88.109. Network is unreachable
    05-24 18:48:56.332 3728 3928 E Unity : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    05-24 18:48:56.332 3728 3928 E Unity : UnityEngine.Logger:Log(LogType, Object)
    05-24 18:48:56.332 3728 3928 E Unity : ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    05-24 18:48:56.332 3728 3928 E Unity : ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    05-24 18:48:56.332 3728 3928 E Unity : PhotonHandler:Update()
    05-24 18:48:56.332 3728 3928 E Unity :
    05-24 18:48:56.332 3728 3928 E Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    05-24 18:48:56.332 3728 3928 E Unity :
    05-24 18:48:58.375 3728 3928 W Unity : PUNVoice: [PV] Frame event for voice #1 of not inited channel 1
    05-24 18:48:58.375 3728 3928 W Unity : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    05-24 18:48:58.375 3728 3928 W Unity : UnityEngine.Logger:Log(LogType, Object)
    05-24 18:48:58.375 3728 3928 W Unity : ExitGames.Client.Photon.Voice.VoiceClient:onFrame(Int32, Int32, Byte, Byte, Byte[])
    05-24 18:48:58.375 3728 3928 W Unity : ExitGames.Client.Photon.Voice.VoiceClient:onVoiceEvent(Object, Int32, Int32, Int32)
    05-24 18:48:58.375 3728 3928 W Unity : ExitGames.Client.Photon.Voice.LoadBalancingFrontend:onEventActionVoiceClient(EventData)
    05-24 18:48:58.375 3728 3928 W Unity : ExitGames.Client.Photon.LoadBalancing.LoadBalancingClient:OnEvent(EventData)
    05-24 18:48:58.375 3728 3928 W Unity : ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer)
    05-24 18:48:58.375 3728 3928 W Unity : ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    05-24 18:48:58.375 3728 3928 W Unity : ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    05-24 18:48:58.375 3728 3928 W Unity : PhotonVoiceHandler:Update()
    05-24 18:48:58.375 3728 3928 W Unity :
    05-24 18:48:58.375 3728 3928 W Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    05-24 18:48:58.375 3728 3928 W Unity :
    05-24 18:48:58.404 3728 3928 W Unity : PUNVoice: [PV] Frame event for voice #1 of not inited channel 1
    05-24 18:48:58.404 3728 3928 W Unity : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    05-24 18:48:58.404 3728 3928 W Unity : UnityEngine.Logger:Log(LogType, Object)
    05-24 18:48:58.404 3728 3928 W Unity : ExitGames.Client.Photon.Voice.VoiceClient:onFrame(Int32, Int32, Byte, Byte, Byte[])
    05-24 18:48:58.404 3728 3928 W Unity : ExitGames.Client.Photon.Voice.VoiceClient:onVoiceEvent(Object, Int32, Int32, Int32)
    05-24 18:48:58.404 3728 3928 W Unity : ExitGames.Client.Photon.Voice.LoadBalancingFrontend:onEventActionVoiceClient(EventData)
    05-24 18:48:58.404 3728 3928 W Unity : ExitGames.Client.Photon.LoadBalancing.LoadBalancingClient:OnEvent(EventData)
    05-24 18:48:58.404 3728 3928 W Unity : ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer)
    05-24 18:48:58.404 3728 3928 W Unity : ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    05-24 18:48:58.404 3728 3928 W Unity : ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    05-24 18:48:58.404 3728 3928 W Unity : PhotonVoiceHandler:Update()
    05-24 18:48:58.404 3728 3928 W Unity :
    05-24 18:48:58.404 3728 3928 W Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    05-24 18:48:58.404 3728 3928 W Unity :
    05-24 18:48:58.411 3728 3928 I Unity : PUNVoice: Player 1 voice #1 speaker created.
    05-24 18:48:58.411 3728 3928 I Unity : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    05-24 18:48:58.411 3728 3928 I Unity : UnityEngine.Logger:LogFormat(LogType, String, Object[])
    05-24 18:48:58.411 3728 3928 I Unity : UnityEngine.Debug:LogFormat(String, Object[])
    05-24 18:48:58.411 3728 3928 I Unity : UnityVoiceFrontend:linkVoice(Int32, Byte, VoiceInfo, PhotonVoiceSpeaker)
    05-24 18:48:58.411 3728 3928 I Unity : UnityVoiceFrontend:OnRemoteVoiceInfo(Int32, Int32, Byte, VoiceInfo, RemoteVoiceOptions&)
    05-24 18:48:58.411 3728 3928 I Unity : ExitGames.Client.Photon.Voice.RemoteVoiceInfoDelegate:Invoke(Int32, Int32, Byte, VoiceInfo, RemoteVoiceOptions&)
    05-24 18:48:58.411 3728 3928 I Unity : ExitGames.Client.Photon.Voice.VoiceClient:onVoiceInfo(Int32, Int32, Object)
    05-24 18:48:58.411 3728 3928 I Unity : ExitGames.Client.Photon.Voice.VoiceClient:onVoiceEvent(Object, Int32, Int32, Int32)
    05-24 18:48:58.411 3728 3928 I Unity : ExitGames.Client.Photon.Voice.LoadBalancingFrontend:onEventActionVoiceClient(EventData)
    05-24 18:48:58.411 3728 3928 I Unity : ExitGames.Client.Photon.LoadBalancing.LoadBalancingClient:OnEvent(EventData)
    05-24 18:48:58.411 3728 3928 I Unity : ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer)
    05-24 18:48:58.411 3728 3928 I Unity : ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    05-24 18:48:58.411 3728 3928 I Unity : ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    05-24 18:48:58.411 3728 3928 I Unity : Phot
    --------- beginning of system
    05-24 18:49:12.693 3728 3928 I Unity : PUNVoice: Player 1 voice # 1 speaker unlinked.
    05-24 18:49:12.693 3728 3928 I Unity : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    05-24 18:49:12.693 3728 3928 I Unity : UnityEngine.Logger:LogFormat(LogType, String, Object[])
    05-24 18:49:12.693 3728 3928 I Unity : UnityEngine.Debug:LogFormat(String, Object[])
    05-24 18:49:12.693 3728 3928 I Unity : UnityVoiceFrontend:OnRemoteVoiceRemove(Int32, Byte)
    05-24 18:49:12.693 3728 3928 I Unity : ExitGames.Client.Photon.Voice.RemoteVoice:removeAndDispose()
    05-24 18:49:12.693 3728 3928 I Unity : ExitGames.Client.Photon.Voice.VoiceClient:removePlayerVoices(Int32, Int32)
    05-24 18:49:12.693 3728 3928 I Unity : ExitGames.Client.Photon.Voice.VoiceClient:removePlayerVoices(Int32)
    05-24 18:49:12.693 3728 3928 I Unity : ExitGames.Client.Photon.Voice.LoadBalancingFrontend:onPlayerLeave(Int32)
    05-24 18:49:12.693 3728 3928 I Unity : ExitGames.Client.Photon.Voice.LoadBalancingFrontend:onEventActionVoiceClient(EventData)
    05-24 18:49:12.693 3728 3928 I Unity : ExitGames.Client.Photon.LoadBalancing.LoadBalancingClient:OnEvent(EventData)
    05-24 18:49:12.693 3728 3928 I Unity : ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer)
    05-24 18:49:12.693 3728 3928 I Unity : ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    05-24 18:49:12.693 3728 3928 I Unity : ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    05-24 18:49:12.693 3728 3928 I Unity : PhotonVoiceHandler:Update()
    05-24 18:49:12.693 3728 3928 I Unity :
    05-24 18:49:12.693 3728 3928 I Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    05-24 18:49:12.693 3728 3928 I Unity :
    05-24 18:49:14.579 3728 3928 I Unity : Local Notification Subscribed
    05-24 18:49:14.579 3728 3928 I Unity : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    05-24 18:49:14.579 3728 3928 I Unity : UnityEngine.Logger:Log(LogType, Object)
    05-24 18:49:14.579 3728 3928 I Unity : LocalNotificationsManager:ScriptingGeneralNotification()
    05-24 18:49:14.579 3728 3928 I Unity :
    05-24 18:49:14.579 3728 3928 I Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    05-24 18:49:14.579 3728 3928 I Unity :
  • JohnTubeJohnTube mod
    edited May 2019
    Hi @Krishna_jokerTM,

    I still can't see the issue.
    How can I reproduce? how do you test disconnects?
    Can you try reproducing using our demo scenes?
  • Checked your demo scene, there, you guys are creating a new prefab for disconnected player when he comes back. My case is different we have playerTTL, so when he comes back, he is the same player. The problem I am having is he can hear what the other player says, he just can't speak, because on the other side, the player who did not disconnect falls a log that says "SPEAKER CREATED", and falls another log "SPEAKER UNLINKED", Can you please explain me why this is happening??
  • Thanks bro, I figured it out!!
  • Hi @Krishna_jokerTM,

    I'm glad you figured it out on your own!

    Could you tell us a bit more about the issue and how you fixed it?
    Others may find this useful later.
  • Solution is, to destroy the prefab that was created when joining and creating a new one while reconnecting!
Sign In or Register to comment.