I was trying to use the “Download Image” Blueprint node to load a texture dynamically, and it works well in editor and in a Windows package. However, when I package and run an HTML5 build, it immediately crashes with the message “Uncaught TypeError: Cannot read property ‘trim’ of undefined”. Full stack trace from the browser console -
[FONT=courier new]TP.html:496 exception thrown: TypeError: Cannot read property ‘trim’ of undefined,TypeError: Cannot read property ‘trim’ of undefined
at _UE_MakeHTTPDataRequest (blob:http://localhost:8000/221b3adb-39e4-…a2220:1:350726)
at __ZN17FHTML5HttpRequest12StartRequestEv (wasm-function[82821]:628)
at __ZN17FHTML5HttpRequest14ProcessRequestEv (wasm-function[82802]:91)
at __ZN23UAsyncTaskDownloadImage5StartE7FString (wasm-function[97505]:350)
at __ZN23UAsyncTaskDownloadImage13DownloadImageE7FString (wasm-function[97503]:51)
at __ZN23UAsyncTaskDownloadImage17execDownloadImageEP7UObjectR6FFramePv (wasm-function[99236]:143)
at __ZN9UFunction6InvokeEP7UObjectR6FFramePv (wasm-function[20742]:104)
at __ZN7UObject12CallFunctionER6FFramePvP9UFunction (wasm-function[23915]:2102)
at __ZN7UObject17execFinalFunctionEPS_R6FFramePv (wasm-function[23914]:13)
at __ZN6FFrame4StepEP7UObjectPv (wasm-function[23780]:60)
When i was compile the project for Html5 (Windows and Android works) and I make a GET request with httpRequest I get this error = “Can not read property ‘trim’ of undefined”. I am on Localhost and on my server I have it configured for Access-Control-Allow-Origin (CORS). What may be happening? Can httprequest requests be made in HTML5? It also happens for the “Download Image” node (which also makes an httprequest).
I’m having this issue as well. Not “Download Image”, but a http web request just pulling json.
Does anyone have an example of Unreal accessing root files in html 5? I’m thinking a possible workaround would be to have a separate program make the request, push it into the root file, and have unreal just grab it from there.