Search Unity

Cannot connect to matchmaking when using WebGL

Discussion in 'Connected Games' started by peterwilli, Jul 13, 2015.

  1. peterwilli

    peterwilli

    Joined:
    Jun 2, 2013
    Posts:
    30
    Hi there,

    I'm trying to run the NetworkStarter project from here: http://forum.unity3d.com/threads/unet-sample-projects.331978/

    And it's working fine on the editor (I also set my own cloud id in player settings)

    But on WebGL, it says this in the console: Failed to read the ID for the match maker, please set the Cloud Project ID string in the Player Settings (see https://unet.cloud.unity3d.com).

    The strange thing is that it's only on WebGL and for the rest it works just fine. I have Unity 5.1.1f1 free.
    I hope someone knows how to fix this, I tried rebuilding as well as reopening editor etc.

    Thanks!
     
  2. najak3d

    najak3d

    Joined:
    Sep 18, 2015
    Posts:
    1
    I'm on Unity 5.2 now. Same issue here. Match Maker works fine from Editor and EXE, but not WebGL.

    Note, in Unity 5.2, the difference in how to enter your "Cloud Project ID" -- now you do this through "Windows -> Unity Services -> Multiplayer"... instead of through the old method of "Edit -> project -> Player". It took me a long time to find out the new way of connecting up the Project ID to match maker.

    No matter, WebGL fails. Other platforms are working fine.
     
  3. tkoknordic

    tkoknordic

    Joined:
    Jan 31, 2013
    Posts:
    93
    Hi, I had building problems wiht Unity 5.2.1 and I updated and patched to the Unity version of 5.2.2p1 and Building works nicely.

    Now when I open a game in web browser there is a error in console. I think it's about that XMLHttpRequest does not allow streaming of data in Web GL.
    Error:
    Code (JavaScript):
    1. XMLHttpRequest cannot load https://mm.unet.unity3d.com/json/reply/CreateMatchRequest. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://nordicedu.com' is therefore not allowed access.
    2. webv03.js:1 XHR failed loading: POST "https://mm.unet.unity3d.com/json/reply/CreateMatchRequest"._JS_WebRequest_Send @ webv03.js:1bHc @ webv03.js:25T3a @ webv03.js:29hTb @ webv03.js:20$Vj @ webv03.js:6XVj @ webv03.js:6Gek @ webv03.js:8Fek @ webv03.js:8F$e @ webv03.js:13k1e @ webv03.js:13q1e @ webv03.js:13Ikk @ webv03.js:8Hkk @ webv03.js:8mhm @ webv03.js:11$kk @ webv03.js:8jlk @ webv03.js:8qlk @ webv03.js:8atj @ webv03.js:6btj @ webv03.js:6Rem @ webv03.js:11coj @ webv03.js:12f6e @ webv03.js:13Rmk @ webv03.js:8wrj @ webv03.js:6vrj @ webv03.js:6prj @ webv03.js:6D$l @ webv03.js:11znj @ webv03.js:12krl @ webv03.js:5_I @ webv03.js:35Pu @ webv03.js:35Fdb @ webv03.js:29hzb @ webv03.js:27gzb @ webv03.js:27vxb @ webv03.js:27wxb @ webv03.js:27Bpe @ webv03.js:18Jpe @ webv03.js:18mub @ webv03.js:27Dzd @ webv03.js:21bwm @ webv03.js:41Runtime.dynCall @ webv03.js:1(anonymous function) @ webv03.js:1Browser.mainLoop.runIter @ webv03.js:1Browser_mainLoop_runner @ webv03.js:1
     
  4. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    WebGL platform is not supported for UNet relay server / MM.
     
  5. tkoknordic

    tkoknordic

    Joined:
    Jan 31, 2013
    Posts:
    93
    I was thinking something like that could be the reason :) Do you have any plans if it will ever be supported and when could that happen? It didn't see anything related on the roadmap page.
     
    webagency1 likes this.
  6. AntySK

    AntySK

    Joined:
    Aug 30, 2013
    Posts:
    31
    I have the same error in the console, where could be a problem ?
     
  7. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    301
    It is planned to work at any time in the future?
     
  8. UnityUser9860

    UnityUser9860

    Joined:
    Dec 8, 2015
    Posts:
    179
  9. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    6,298
    There is currently no HLAPI development happening at Unity while they figure out what its future is.