Does the self-hosted Photon Server support Photon Voice 2?

Currently getting the following error when connecting to a self-hosted server after PUN 2 successfully connects (AutoConnectAndJoin is set to true for PhotonVoiceNetwork). This error does not appear when connecting to the cloud:

[Networking.PhotonVoiceNetwork] Connecting to server failed.
UnityEngine.Debug:LogErrorFormat(Object, String, Object[])
Photon.Voice.Unity.VoiceLogger:LogError(String, Object[]) (at Assets/Photon/PhotonVoice/Code/VoiceLogger.cs:54)
Photon.Voice.PUN.PhotonVoiceNetwork:ConnectOrJoin() (at Assets/Photon/PhotonVoice/Code/PUN/PhotonVoiceNetwork.cs:325)
Photon.Voice.PUN.PhotonVoiceNetwork:FollowPun() (at Assets/Photon/PhotonVoice/Code/PUN/PhotonVoiceNetwork.cs:386)
Photon.Voice.PUN.PhotonVoiceNetwork:OnVoiceStateChanged(ClientState, ClientState) (at Assets/Photon/PhotonVoice/Code/PUN/PhotonVoiceNetwork.cs:247)
Photon.Realtime.LoadBalancingClient:set_State(ClientState) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:338)
Photon.Realtime.LoadBalancingClient:OnStatusChanged(StatusCode) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2343)
ExitGames.Client.Photon.EnetPeer:ExecuteCommand(NCommand) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:1639)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:413)
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1422)
Photon.Voice.Unity.VoiceConnection:FixedUpdate() (at Assets/Photon/PhotonVoice/Code/VoiceConnection.cs:297)

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @john__primitive,

    Thank you for choosing Photon and sorry for the inconvenience!

    We will be releasing Voice2.1 soon, meanwhile here is an unreleased package that includes the fix.
    A suggested way to import is to:

    1. (optional but RECOMMENDED) Restart Unity Editor (read "Native Library Updates")
    2. (optional) Delete "Assets/Photon" folder from within Unity Editor (maybe backup your "Assets/Photon/PhotonUnityNetworking/Resources/PhotonServerSettings" file)
    3. Import custom package
  • @JohnTube following up after importing the new package: it looks like we're experiencing the same authentication problem on a self hosted server with Photon Voice Network 2 as we do with PUN 2 (solved the problem with PUN 2 by passing custom AuthenticationValues). The second player to join a room gets stuck in this authentication loop with PhotonVoiceNetwork:

    [Networking.PhotonVoiceNetwork] PUN joined room, now joining Voice room
    [Networking.PhotonVoiceNetwork] OnVoiceStateChanged from ConnectedToMasterserver to Joining
    [Networking.PhotonVoiceNetwork] OnVoiceStateChanged from Joining to DisconnectingFromMasterserver
    [Networking.PhotonVoiceNetwork] OnVoiceStateChanged from DisconnectingFromMasterserver to ConnectingToGameserver
    [Networking.PhotonVoiceNetwork] OnVoiceStateChanged from ConnectingToGameserver to Authenticating
    [Networking.PhotonVoiceNetwork] OnVoiceStateChanged from Authenticating to Joining
    [Networking.PhotonVoiceNetwork] OnVoiceStateChanged from Joining to DisconnectingFromGameserver
    [Networking.PhotonVoiceNetwork] OnVoiceStateChanged from DisconnectingFromGameserver to ConnectingToMasterserver
    [Networking.PhotonVoiceNetwork] OnVoiceStateChanged from ConnectingToMasterserver to Authenticating
    [Networking.PhotonVoiceNetwork] OnVoiceStateChanged from Authenticating to ConnectedToMasterserver
    [Networking.PhotonVoiceNetwork] PUN joined room, now joining Voice room
    ....
    repeated indefinitely

    Is there a way to pass the same custom authentication values to Photon Voice Network 2?
  • Answering my own question:
    Getting the PhotonVoiceNetwork component and setting Client.AuthValues solved the problem.