0

I have an issue with parse + unity in WebGL, it works perfectly in android or pc, but when i test in web this error appears

exception thrown: SyntaxError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': 'sme 0' is not a valid HTTP header field value.,Error: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': 'sme 0' is not a valid HTTP header field value.
    at Error (native)
    at _JS_WebRequest_SetRequestHeader (http://localhost:60265/Release/Web.js:1:299623)
    at aAg (http://localhost:60265/Release/Web.js:28:772491)
    at YBc (http://localhost:60265/Release/Web.js:23:638406)
    at Array.Are (http://localhost:60265/Release/Web.js:24:499286)
    at U4p (http://localhost:60265/Release/Web.js:5:760172)
    at Z4p (http://localhost:60265/Release/Web.js:5:770191)
    at bXo (http://localhost:60265/Release/Web.js:9:582682)
    at Array.vWo (http://localhost:60265/Release/Web.js:9:501983)
    at Array.dap (http://localhost:60265/Release/Web.js:9:944092)Module.printErr @ (index):34Browser.mainLoop.runIter @ Web.js:1Browser_mainLoop_runner @ Web.js:1

Do you know if this is a bug? I'm using a personal edition of unity

It was tested in chrome and firefox, in both cases appears an error

EDITED

this code breaks the WebGL game

ParseUser.LogInAsync ("aaaaaa", "bbbbbb").ContinueWith (t => {
        if (t.IsFaulted || t.IsCanceled){

            ParseUser user = new ParseUser ();
            user ["username"] = "aaaaaa";
            user ["password"] = "bbbbbb";


            ParseUser.LogOutAsync().ContinueWith(c=>{
                user.SignUpAsync().ContinueWith(b =>{
                    if (b.IsFaulted || b.IsCanceled){
                        print ("signup fail");
                    }else{
                        print ("signup success");
                    }
                });
            });



        }else{
            print ("login success");
        }
    });
gman
  • 100,619
  • 31
  • 269
  • 393
Luis Cruz
  • 159
  • 1
  • 11
  • I'm not familiar with the parse API, but are you explicitly settings headers somewhere? Do you know where that `'sme 0'` is coming from? – John B Aug 24 '15 at 03:51
  • thats happens behind scenes, i do not need to set anything about HTTP headers, all request is done by parse plugin – Luis Cruz Aug 24 '15 at 05:59
  • I think that the problem is in the unity compiler because the error character 'sme 0' is not the same in each compilation, i will try to compile in other PC or Mac – Luis Cruz Aug 24 '15 at 07:11
  • today i tested the compilation in a mac, everything is ok and i can run the game on Webgl – Luis Cruz Aug 25 '15 at 20:16

0 Answers0