Photon speaker sometimes does not get created for users in a multiuser session on Quest

Unity 2018.4
Oculus Quest (and HoloLens, but we have no issues on HoloLens)
Photon Voice 2.16
Networking solution: Nakama by Heroic Labs

Hi there, we've been trying to solve this issue for weeks now, hoping to get some pointers to where we can look next.
We have a cross-platform, multi-user app built in Unity, for UWP (HoloLens 2) and Android (Oculus Quest).
Our networking solution is Nakama. We were able to implement Photon Voice on the HL2 quickly, with no issues.
But on the Quest we have about a 50% chance of not being able to connect the Photon Voice service.
We've narrowed down the issue to the Speaker Object not being created in the scene.
When testing between a Quest and a Unity instance, we can see that about half the time, the Speaker object doesn't get instantiated in the scene.
However, we cannot consistently reproduce this bug.

I've looked through several Quest related posts, but all of them use Photon as the networking solution, so the troubleshooting steps are not all applicable to us.
Are there known issues with Nakama? Do you have suggestions for us?

thank you!


  • JohnTube
    JohnTube ✭✭✭✭✭
    hi @davidyAN,

    Thank you for choosing Photon!

    Are you saying you changed the underlying transport layer to use Nakama instead of Photon Realtime?
    Or do you mean you are using Photon Voice integrated (in parallel) with Nakama?
    I'm not sure how Nakama is relevant here or is being used, otherwise.
    Do you have suggestions for us?
    Update to the latest and retry.
    See debug info in VoiceConnection inspector in Unity.
  • davidyAN
    Hi, thanks for the response. To answer your questions:
    - We are using Nakama and Photon Voice in parallel; we did not change the transport layer
    - I did update to PHoton Voice 2.17, I did not observe any difference, so I rolled it back (to match the same version as the Hololens branch which is 2.16)
    - I have been looking through the debugs, and sometimes I'll see a speaker being created, sometimes I don't.

    Attached are 2 screenshots, using 2 Unity instances for testing. One screenshot shows "...from Joining to Joined" as the last log, the other shows "...from Joining to Joined" FOLLOWED by "...voice#1 userData", which indicates that a speaker has been created in the scene.

    I tried digging through the code to stack trace where the speaker are getting created to see if there are any potential hang ups, but I didn't get anywhere. Also the fact that the bug happen inconsistently makes it tough to troubleshoot.

    Please let me know what else you need to help us diagnose this problem, we are holding our release pending solving the audio issue, thank you!
  • davidyAN
    Here is the imgur link for the screenshots:
  • davidyAN
    edited July 2020
    I did some more testing on the DemoVoiceMinimal-scene and I'd like to share my results:
    (keep in mind that we don't see issues on our UWP version of our app)

    I ran 4 instances of Unity, 2 Android, and 2 UWP (we deploy android to Quest, and uwp to Hololens)
    I set up the DemoVoiceMinimal-scene using our App Voice ID
    Then I try to connect a combination of the 4 instances (by connection I mean seeing a speaker object created in the scene)

    UWP-UWP - 100% connection, speaker prefab gets instantiated in both instances without fail, I can hear echos on the PC speaker
    Android-Android - very inconsistent connection, speaker prefab does not get instantiated about 90% of the time

    Android-UWP - inconsistent connection, although seems better than Android to Android
    Android-Android-UWP - very low chance of connection
    UWP-UWP-Android - the 2 UWP instances always connect

    I have attached screenshots with logs, hopefully it's helpful.
    The Unity editor colors are:
    light pink - android
    light green - android
    light yellow - uwp
    light blue - uwp

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @davidyAN,

    First make sure clients are joined to the same server and room.
    Check the matchmaking checklist.

    To see more useful debug info:

    Enable VoiceConnection.SupportLogger to get info about region/server.

    Open foldouts in VoiceConnection custom editor/inspector: "Client Debug Info" and "Cached Remote Voices Info".