Luke
Luke

Reputation: 87

Unity3D AR application WebGL build reporting errors

I'm an amateur AR developer working on a project in my spare time. The ideal build for this project would be a WebGL application. However, the WebGL build that I created within Unity does not run. I have tried running the index.html on both Chrome and Firefox, and on a free webhosting site. When I attempt to run the file, I receive this error:

An error occured 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 (signTest1WGL.asm.framework.unityweb:2:27465)
stackTrace (signTest1WGL.asm.framework.unityweb:2:27636)
abort (signTest1WGL.asm.framework.unityweb:4:30633)
_dlopen (signTest1WGL.asm.framework.unityweb:2:184717)
c0k (blob:20:1)
g9k (blob:20:1)
mSk (blob:20:1)
SMg (blob:7:1)
CSg (blob:7:1)
BSg (blob:7:1)
_Nj (blob:4:1)
s0g (blob:7:1)
A3f (blob:6:1)
$7f (blob:6:1)
l5i (blob:4:1)
csl (blob:28:1)
invoke_iiii (signTest1WGL.asm.framework.unityweb:2:353269)
WAk (blob:15:1)
cBk (blob:15:1)
bBk (blob:15:1)
HTk (blob:20:1)
vql (blob:28:1)
invoke_iiiii (signTest1WGL.asm.framework.unityweb:2:336227)
yGh (blob:10:1)
GEh (blob:10:1)
JQe (blob:8:1)
TKf (blob:5:1)
IQe (blob:8:1)
csl (blob:28:1)
invoke_iiii (signTest1WGL.asm.framework.unityweb:2:353269)
Xeg (blob:6:1)
Weg (blob:6:1)
a5f (blob:6:1)
Jdk (blob:15:1)
l5i (blob:4:1)
csl (blob:28:1)
invoke_iiii (signTest1WGL.asm.framework.unityweb:2:353269)
WAk (blob:15:1)
KEk (blob:15:1)
WM (blob:9:1)
p9 (blob:16:1)
frb (blob:11:1)
_qb (blob:11:1)
r$a (blob:13:1)
Iqb (blob:11:1)
JQ (blob:9:1)
xda (blob:16:1)
_9 (blob:16:1)
aaa (blob:16:1)
V9 (blob:16:1)
A8 (blob:16:1)
z8 (blob:16:1)
x8 (blob:16:1)
u8 (blob:16:1)
iZ (blob:16:1)
WY (blob:16:1)
callMain (signTest1WGL.asm.framework.unityweb:4:28998)
doRun (signTest1WGL.asm.framework.unityweb:4:29701)
run (signTest1WGL.asm.framework.unityweb:4:29887)
runCaller (signTest1WGL.asm.framework.unityweb:4:28515)
removeRunDependency (signTest1WGL.asm.framework.unityweb:2:34431)
UnityLoader["73d8c219198d5cb59ea52845978d71e1"]/</unityFileSystemInit</<@blob:https://signtest1.000webhostapp.com/5a52587b-4b95-e748-aec6-c32e11164deb:2:357
doCallback (signTest1WGL.asm.framework.unityweb:2:143411)
done (signTest1WGL.asm.framework.unityweb:2:143549)
done (signTest1WGL.asm.framework.unityweb:2:126612)
storeLocalEntry (signTest1WGL.asm.framework.unityweb:2:125072)
UnityLoader["73d8c219198d5cb59ea52845978d71e1"]/reconcile/</<@blob:https://signtest1.000webhostapp.com/5a52587b-4b95-e748-aec6-c32e11164deb:2:126838
UnityLoader["73d8c219198d5cb59ea52845978d71e1"]/loadRemoteEntry [loadRemoteEntry/req.onsuccess] (signTest1WGL.asm.framework.unityweb:2:125422)

If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

Confusingly, this project runs as expected on both my laptop webcam (Mac) and my iPhone. It is only once I chose to build with the WebGL problem that I encountered these issues.

I'm very new to WebGL and I don't know much about solving this error. How might I go about solving this error and properly running a Unity project with WebGL?

This site is also hosted at https://signtest1.000webhostapp.com/ You can view the error and look at the console there.

Upvotes: 0

Views: 2168

Answers (1)

Luke
Luke

Reputation: 87

I found that my issue in building this Unity project was my use of the Vuforia AR package in Unity. Vuforia only supports native mobile development, and is not at all compatible with WebGL.

I did come across a potential workaround for this issue in the form of argon.js, a JavaScript framework for adding augmented reality in web applications. In theory, the framework allows for Vuforia projects to run in all web browsers. The documentation for argon.js can be found here:

https://www.argonjs.io/

A good understand of JavaScript is helpful.

Upvotes: 2

Related Questions