UriFormatException in SocketWebTcp.cs

On a WebGL build that's connecting to a self-hosted server I am getting the following:

UriFormatException: Invalid URI: The URI scheme is not valid.
System.Uri.CreateThis (System.String uri, System.Boolean dontEscape, System.UriKind uriKind) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
System.Uri..ctor (System.String uriString) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
ExitGames.Client.Photon.SocketWebTcp.Connect () (at Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs:103)
ExitGames.Client.Photon.TPeer.Connect (System.String serverAddress, System.String proxyServerAddress, System.String appID, System.Object customData) (at <a497a6f18e1f4b419421b940add27a6e>:0)
ExitGames.Client.Photon.PhotonPeer.Connect (System.String serverAddress, System.String proxyServerAddress, System.String applicationName, System.Object custom) (at <a497a6f18e1f4b419421b940add27a6e>:0)
Photon.Realtime.LoadBalancingClient.ConnectToMasterServer () (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:901)

After a lot of mucking about I discovered that I had to prepend "ws://" to the server IP address in order for it to work. Hope this helps someone else.

Also would like to raise this with the Photon team as this may not be intended behaviour.


Sign In or Register to comment.