Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Third Party Photon - OnRegionListReceived is never triggered when ConnectUsingSettings on WebGL

Discussion in 'Multiplayer' started by jcbadboy, Apr 24, 2023.

  1. jcbadboy

    jcbadboy

    Joined:
    Mar 24, 2010
    Posts:
    56
    Hello,

    I have this issue with the OnRegionListReceived event never getting triggered when ConnectUsingSettings on WebGL.

    The event works well on the Unity editor, as expected.

    Some additional details:

    The working code:
    client.AddCallbackTarget(this);
    client.StateChanged += OnStateChange;
    client.AppId = _appId;
    var appSettings = PhotonServerSettings.CloneAppSettings(PhotonServerSettings.Instance.AppSettings);
    appSettings.AppIdRealtime = _appId;
    client.ConnectUsingSettings(appSettings);


    Settings:



    Without the regions list I can't to know where to connect. I'm looking for the best region ping.


    Thanks in advanced.
     
  2. jcbadboy

    jcbadboy

    Joined:
    Mar 24, 2010
    Posts:
    56
  3. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,013
    There are a few things here to keep in mind:
    If you host the WebGL client via https, it must use "Web Socket Secure" as protocol or it won't connect anywhere.
    You can skip the region-fetchin by defining a "Fixed Region". This probably helps you figure out if you connect at all.
    If you can't connect, you don't get regions. Check the console log and let us know of any errors.
    Complete callstacks or complete log files help us help you so please don't screenshot a single error line.
     
  4. jcbadboy

    jcbadboy

    Joined:
    Mar 24, 2010
    Posts:
    56
    It was working just fine until last week. It suddenly stopped receiving the regions list in the callback.
    I'm testting withou SSL, but I tried to use "Web Socket Secure" just in case, it don't works.
    I have a build version in the cloud that still works. For sure something inside the project was changed, but I can't figure out.
     
  5. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,013
    There is a contact via Discord too. It makes sense to discuss it in one place, so ... moving over to Discord.