Question by
yeagob · May 13, 2019 at 09:13 AM ·
c#webglwebrequest
UnityWebRequest error on WebGL
Hi!
Im having a lot of problems with UnityWebRequest and WebGL. My code is this:
static IEnumerator GetText(string web)
{
Debug.Log("Iniciando petición" + web);
UnityWebRequest webRequest = UnityWebRequest.Get(web);
using (webRequest)
{
yield return webRequest.SendWebRequest();
if (webRequest.isHttpError)
{
throw new Exception("Could not connect to backend: " + webRequest.responseCode);
}
// Player results ID
Player.Id = webRequest.downloadHandler.text;
Debug.Log("User added!");
In editor It works perfectly, but when we try it in WebGL browser lauch this error, when this line is executed: yield return webRequest.SendWebRequest();
An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
uncaught exception: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at jsStackTrace (Ches81 WebGL.wasm.framework.unityweb:2:15158)
stackTrace (Ches81 WebGL.wasm.framework.unityweb:2:15329)
onAbort@http://chess81.x10.bz/Build/UnityLoader.js:4:9322
abort (Ches81 WebGL.wasm.framework.unityweb:2:497045)
_dlopen (Ches81 WebGL.wasm.framework.unityweb:2:222751)
@blob:http://chess81.x10.bz/74023ca5-995f-4e9a-8ade-19570c9d9fd9 line 2 > WebAssembly.instantiate:wasm-function[46858]:0xdff4b1 (blob:http://chess81.x10.bz/74023ca5-995f-4e9a-8ade-19570c9d9fd9 line 2 > WebAssembly.instantiate:wasm-function[46429]:0xded5a3)
...
Please Help!!!!
PD. May be @jonas-echterhoff knows... XD
Comment
Your answer
Follow this Question
Related Questions
Error in BUILD with UnityWebRequest but not in Editor 0 Answers
How to make a script wait for a UnityWebRequest to finish for WebGL without a coroutine? 1 Answer
UnityWebRequest, C# request.accept equivalent? 1 Answer
Can't make .Net ClientWebSocket work with WebGL 0 Answers
Failed Running UnityLinker.exe 2 Answers