FMETP WebGL Unity Build. Emscripten error when FMNetworkManager activated in Heirarchy

Viewed 351

So I have been working on a project that streams a video feed from an Oculus quest to a WebGL build running on a remote server (Digital Ocean)

I have two issues currently...

1.When I build to WebGl and push the update online. It will only run if I disable the FMNetworkManager.

If I run the app locally, it has no issues and I have been able to have video sent from the Quest headset to the receiver app.

Part of the response is as follows:

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 (Viewer.wasm.framework.unityweb:8:15620)
stackTrace (Viewer.wasm.framework.unityweb:8:15791)
onAbort@https://curtin-cooking-control-nr9un.ondigitalocean.app/Build/UnityLoader.js:4:11199
abort (Viewer.wasm.framework.unityweb:8:500966)
_dlopen (Viewer.wasm.framework.unityweb:8:181966)
@blob:https://***/de128118-3923-4c88-8092-7a9945d90746 line 8 > WebAssembly.instantiate:wasm-function[60882]:0x1413efb (blob:***/de128118-3923-4c88-8092-7a9945d90746 line 8 > WebAssembly.instantiate:wasm-function[62313]:0x1453761)
...
...
...WebAssembly.instantiate:wasm-function[63454]:0x148b9a9)
UnityModule [UnityModule/Module.dynCall_v] (Viewer.wasm.framework.unityweb:8:484391)
browserIterationFunc (Viewer.wasm.framework.unityweb:8:186188)
runIter (Viewer.wasm.framework.unityweb:8:189261)
Browser_mainLoop_runner (Viewer.wasm.framework.unityweb:8:187723)

So I understand there is an issue relating to (wasm) Emscripten and have scoured the internet looking for solutions to no avail.

  1. While I have mentioned I have had video streaming from one device to another. I have only had this functioning locally. With a node.js server also running on Digital Ocean. Which appears to be functioning, seeing both devices being registered by the server at runtime. In each app, while I see what appears to be data transferring by seeing Last Sent Time updating, plus FM Web Socket Network_debug also pushes [connected: True] to a text ui. The IsConnected or Found Server checkboxes inside FM Client (script) fail to check as being connected.

FMNetworkManager

I'm by no means an expert in unity programming, webgl, and webserver setup so my understanding of getting this to function has left me looking at many irrelevant solutions while attempting to make little changes with elements that some solutions suggest with others leaving me blank-eyed looking into space wondering, where do I even implement that.

Any guidance would be great, a step-by-step solution would be fantastic.

[Edit - Detailed Error]

UnityLoader.js:1150 wasm streaming compile failed: TypeError: Could not download wasm module
printErr    @   UnityLoader.js:1150
Promise.catch (async)       
doNativeWasm    @   524174d7-d893-4b91-8…0-aa564a23702d:1176
(anonymous) @   524174d7-d893-4b91-8…0-aa564a23702d:1246
(anonymous) @   524174d7-d893-4b91-8…-aa564a23702d:20166
UnityLoader.loadCode.Module @   UnityLoader.js:889
script.onload   @   UnityLoader.js:854
load (async)        
loadCode    @   UnityLoader.js:849
processWasmFrameworkJob @   UnityLoader.js:885
job.callback    @   UnityLoader.js:475
setTimeout (async)      
job.complete    @   UnityLoader.js:490
(anonymous) @   UnityLoader.js:951
decompressor.worker.onmessage   @   UnityLoader.js:89

Thanks in advance

Aaron

1 Answers

You have wrong use in combining FMNetworkUDP and FMWebsocket together. For WebGL build, UDP is not allowed, which causes the error as expected.

Your websocket ip is reachable, because it's reachable via your IP. But please try not to expose your server IP in public forum like stackoverflow, which everyone can connect to your server anytime in future.

You should take away FMNetworkManager completely, while keeping only FMWebsocket components for webgl streaming.

You may test it with their Websocket streaming example scene with webgl build.

Related