Unity Photon Pun connect to Photon Server (Self-hosted) on WebGL

Options
Hi, I have downloaded the Photon Server v5.0.12.24499 and follow this guide https://doc.photonengine.com/en-us/server/current/getting-started/photon-server-in-5min. On the Android platform works fine, I can connect to my server by home IP 127.0.0.1, but on the WebGL platform it says UriFormatException: Invalid URI: The format of the URI could not be determined.
In forums I found the solution to add ws:// protocol prefix to the URL after that I get the error Exiting receive thread. Server: ws://127.0.0.1:0 Error: An exception has occurred while connecting.

Has anybody had the same issue?

Thanks.

Comments

  • Artak
    Options
    I fixed it. I had a problem with the certificate. I fixed it by generating the certificate with OpenSSL (the first time I generated it with IIS), but after that, Unity stuck on "Connecting To Master". This fixed by deleting * in the PhotonServer.config file in the URL line.


    <HTTPListener
    Name="*:[PORT]::Master"
    IPAddress="0.0.0.0"
    Port="9090"
    DisableNagle="true"
    InactivityTimeout="10000">
    <Routing>
    <Route
    Url="/*(delete this)"
    OverrideApplication="Master"
    PeerType="WebSocket"
    Counters="false"
    />
    </Routing>
    </HTTPListener>
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Artak,

    Thank you for choosing Photon!

    Yes this is a known issue in v5 RC1 that will be fixed in next version.
    See here.

    Thank you for your patience and understanding!