Error in network establishment (net::ERR_CERT_COMMON_NAME_INVALID)

Options
Hi, recently I've got the Photon Server setup thanks to @vadim ! However, as i upload my games on netlify.com, i need to use wss connections. Using wss connection causes this issue and I can't connect:
Photon-Javascript_SDK.js:1 WebSocket connection to 'wss://app-eu.exitgamescloud.com:19090/af962eb6-4b15-4488-a09b-8243a448d4ba?libversion=4.1.0.0' failed: Error in connection establishment: net::ERR_CERT_COMMON_NAME_INVALID

I used to use the Photon Engine plugin for Construct 2 and am still able to enable wss connections there, as well as upload on the same site netlify.com without any hitch. Now that I'm trying to use a new engine that requires my own coding, I think I did not resolve the secure certificates portion.

How can I resolve this problem with minimal setup? Photon Engine realtime plugin for Construct 2 had great coverage as the wss connection worked across almost all platforms. I read online about how to manually solve this certificate problem and mostly mentioned using OpenSSL and stuff, which I'm not sure if the Photon Engine plugin for Construct 2 did implicitly. Any pointers would be appreciated!

Comments

  • Dban1
    Options
    This is all the code related to my simple connection setup for my JavaScript game in Cocos Creator:

    eeyu840.png
  • Dban1
    Options
    I think I solved it so far..
    Error was that I did
    this.loadBalancingClient.connect()
    

    What I should have done was
    this.loadBalancingClient.connectToRegionMaster('asia');
    
  • vadim
    Options
    Hi,
    connectToRegionMaster() and connectToNameServer() are two methods implementing up-to-date workflow using name server. connect() connects directly to a master server (at address specified in setMasterServerAddress) and normally should not be used.