HTML5 game crashes when "Download Image" is called

Hi,

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)

My blueprint code:

Can somebody please help me out with this issue?

Hey guys.

Im having this issue too.

Could please somebody highlight this.

Load Image from disk node also refuses to work in HTML5.

Loading images is crucial for me, so any kind of info will be much appreciated.

Thanks! :smiley:

in the editor it works
my https server I built and I create the image
but in the browser same error

exception thrown: TypeError: Cannot read property ‘trim’ of undefined,TypeError: Cannot read property ‘trim’ of undefined
at _UE_MakeHTTPDataRequest (blob:https://127.0.0.1/dd593870-9f9a-4065-a2cd-967a9c1c46cb:1:331669)

Same problem in Html5 with “Download image”. Any solution?

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.

I’m having the same issue with html5

now it’s working in 4.21 version