Can't connect to server with WebGl build

Hi. I use Photon Server with Amazon EC2. Desktop build work correctly- I cane connect and work with server. In editor with WebGl platform settings all work also correctly if I use name server or if I connect to master server. If I push build to web host, I can't connect to name server or master server. Don't see any errors in browser console. I use not secure web sockets. In server logs I don't see any attempts to connect from hosted build. Thanks

Environment:

Unity 2019.4

Photon Server v5


Comments

  • hi, @Golandez

    try to use telnet. you will see whether ports are open.

    best

    ilya

  • JohnTube
    JohnTube mod
    edited December 2021

    Hi @Golandez,

    Thank you for choosing Photon!

    Did you follow steps shown here?

    Change different browser, check firewall?

    Try from different machine, different network?

  • Hi @chvetsov , @JohnTube

    I checked ports 9093, 9091, 9090 on server side, it's ok-they are opened, I tried to outside check ports from my machine, they are opened. Yes, I followed manuals. My server has completed plugin and it's work successfully with desktop build. But with WebGl work only in UnityEditor. I use WebGl build on github Pages and on dedicate server, checked with Chrome on my desktop machine and with Safari on Macbook. I used different network providers for test. Always WebGl work only in UnityEditor. Thanks for try to help! 

  • Golandez
    Golandez
    edited December 2021

    @JohnTube

    I updated photon plugin in Unity to latest version and my problem was fixed. But I have more issue- I checked OnOperationResponce in LoadballancingCliend and saw that server send for MasterserverAddress "localhost:9090/Master", but my expectations is "ws://serverIp:9090/Master". This is my error in server configuration or plugin error in work with ws ? I use ws, not wss

  • hi, @Golandez

    do you have have Policy listeners open?

    try to open them, because they are commented by default in sdk v5

    best,

    ilya

  • Golandez
    Golandez
    edited December 2021

    Hi, @chvetsov

    I tried to open policy listener, but this not resolved my issue- in OnOperationResponce I get localhost address, not server ip. I wrote in last message that problem with connect is resolved

  • Hey @Golandez,

    Set MasterServer IP in "deploy\Nameserver.json".

    It should be the "IpAddress" of the default region node "EU".

  • hi, @Golandez

    Yes, I see that I missed your message.

    Probably you also have to check that your game server public IP and host name are correct - PublicIpAddress and PublicHostName

    You can find this settings in GameServer.xml.config

    best,

    ilya

  • Golandez
    Golandez
    edited December 2021

    Hi. @JohnTube , @chvetsov  The issue was resolved- in Nameserver.json fixed Hostname value from localhost to real ip. Thanks a lot!