WebGL Build WWW class : Unknown Error
Hello, We have an Web Application created by Unity. We're trying to access a remote server using WWW class provided. When I try the WebGL build on my local machine, it can communicate with remote server. However when I put the WebGL build on the remote server (which will represent our Web Application, simply where the index.html is ) the communication gives error. Here's the code: IEnumerator ss() {
WWWForm form = new WWWForm ();
form.AddField ("name", "hello");
url = "remote.server.ip.address:port";
WWW www = new WWW(url,form);
yield return www;
if (www.error != null) {
Debug.Log ("Error is not null" + www.error);
theText.text = "Err:" +www.error;
} else {
string formText = www.text;
Debug.Log ("Response: " + formText);
theText.text = formText;
}
}
And error www.error returns an UNKNOWN ERROR. What may be the cause? I've seen some topics that says it may be related to CORS. But I am not sure about the real reason behind this problem. Could you please help?
Thank you.
Your answer
![](https://koobas.hobune.stream/wayback/20220612112513im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
WebGl taking too long to load. size is large 1 Answer
Unity3D - Parse Migration 0 Answers
WWW.assetBundle is null (Unity3d 5.3.4f1) 2 Answers
webgl + Facebook Canvas not working 0 Answers