PUN2 and Chat authenticate, but Voice... doesn't

Options
EdwinWiseOne
edited February 2022 in Photon Voice

I've been running PUN2 and Chat for a while now, and they work fine with the Oculus custom authentication. Now I want to add Voice - it looks so simple! Going through the steps here:

https://doc.photonengine.com/en-us/voice/current/getting-started/voice-for-pun

And when I enter the Photon room I get endless repeats of this error:



02-03 16:02:49.591 23018 23041 E Unity  : OperationResponse 230: ReturnCode: 32755 (Oculus nonce validation failed). Parameters: {} Server: NameServer Address: ns.photonengine.io:5058

02-03 16:02:49.591 23018 23041 E Unity  : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)

02-03 16:02:49.591 23018 23041 E Unity  : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])

02-03 16:02:49.591 23018 23041 E Unity  : UnityEngine.Logger:Log (UnityEngine.LogType,object)

02-03 16:02:49.591 23018 23041 E Unity  : UnityEngine.Debug:LogError (object)

02-03 16:02:49.591 23018 23041 E Unity  : Photon.Realtime.LoadBalancingClient:DebugReturn (ExitGames.Client.Photon.DebugLevel,string) (at /Users/edwinwise/OculusProjects/Field-Effect-2021/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2564)

02-03 16:02:49.591 23018 23041 E Unity  : Photon.Realtime.LoadBalancingClient:OnOperationResponse (ExitGames.Client.Photon.OperationResponse) (at /Users/edwinwise/OculusProjects/Field-Effect-2021/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2644)

02-03 16:02:49.591 23018 23041 E Unity  : ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback (ExitGames.Client.Photon.StreamBuffer) (at D:/Dev/Work/photon-dotnet-sdk/P

02-03 16:02:49.596 23018 23041 E Unity  : [PhotonVoiceNetwork.PhotonVoiceNetwork] 2022-02-03T22:02:49:Operation 230 response error code 32755 message Oculus nonce validation failed

02-03 16:02:49.596 23018 23041 E Unity  : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)

02-03 16:02:49.596 23018 23041 E Unity  : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])

02-03 16:02:49.596 23018 23041 E Unity  : UnityEngine.Logger:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])

02-03 16:02:49.596 23018 23041 E Unity  : UnityEngine.Debug:LogErrorFormat (UnityEngine.Object,string,object[])

02-03 16:02:49.596 23018 23041 E Unity  : Photon.Voice.Unity.VoiceLogger:LogError (string,object[]) (at /Users/edwinwise/OculusProjects/Field-Effect-2021/Assets/Photon/PhotonVoice/Code/VoiceLogger.cs:67)

02-03 16:02:49.596 23018 23041 E Unity  : Photon.Voice.Unity.VoiceConnection:OnOperationResponseReceived (ExitGames.Client.Photon.OperationResponse) (at /Users/edwinwise/OculusProjects/Field-Effect-2021/Assets/Photon/PhotonVoice/Code/VoiceConnection.cs:1058)

02-03 16:02:49.596 23018 23041 E Unity  : Photon.Realtime.LoadBalancingClient:OnOperationResponse (ExitGames.Client.Photon.OperationResponse) (at /Users/edwinwis


I had removed my previous Photon assets and installed Voice2 cleanly. All three services (PUN2, Chat, and Voice) have the same Oculus custom authentication settings, and my Photon Server Settings have all three app ids set.

Auto connect and join is true, and input source type is "microphone" of type "Unity".


I'm running:


Unity 2021.2.9f1

Building for Mono, Arm7 (it's faster)

Photon Voice: 2.29

Photon Voice API: rev. 6315

Photon Realtime and Unity Library: 4.1.6.11

PUN2: 2.40

Target is Oculus Quest 2


Help! I'm not sure what to do ... chat and PUN2 continue to work fine, but Voice2... not so much, and Google has been of no value for this (weirdly).


Thanks,


Edwin

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited February 2022
    Options

    hi @EdwinWiseOne,

    Thank you for choosing Photon!

    I'm guessing Voice app has auth providers configured in dashboard.

    How do you set authentication values in voice client?

    Or maybe you have PhotonVoiceNetwork.Instance.UsePunAuthValues enabled, which is the case by default?

    Otherwise try to disable that and set PhotonVoiceNetwork.Instance.Client.AuthValues before connecting PUN as I assume you also leave PhotonVoiceNetwork.Instance.AutoConnectAndJoinRoom true.

    You could also disable that and connect voice client manually explicitly.

  • Yes, the auth provider is configured in the dashboard, and I have UsePunAuthValues true as well as AutoConnectAndJoinRoom - but I'll try the more manual methods and see if that helps.

  • Unfortunately, that did not help at all. I made the settings changes and duplicated the PhotonNetwork.AuthValues setup for PhotonVoiceNetwork.Instance.Client.AuthValues before calling PhotonNetwork.ConnectUsingSettings and it still errors the same way.

  • EdwinWiseOne
    edited February 2022
    Options

    A new wrinkle - I apparently had anonymous access enabled for all of the apps, which is honored by PUN2 and Chat but maybe not Voice? When I turned it off, chat starts to fail... need to dig into this now.


    EDIT: I hook up authentication values for Chat and now it has oculus nonce failures too. I have no idea what's going on here. The main PUN2 seems to authenticate okay. Maybe I need a unique nonce for each app?


    EDIT 2: Yeah, A Nonce should only be used once so I need to get a new one for chat and then voice I think. Time to poke the Oculus documentation I guess.


    EDIT 3: I went the other way. Authenticate the PUN2 and let anonymous for Chat and Voice and... it all mysteriously works now (as best I can tell). Had to make Voice not use the pun authentication and then set it to a mostly blank (with user ID) AuthenticationValues. Someday I may want to authenticate all three, but I'm not sure I care right now -- and if I do, then I'll have to do the oculus 'GetUserProof` once per nonce needed.