I am working on a multiplayer game for WebGL platform and I am using SocketIo & node.js server for handling the game.

I am facing issues, as shown in the attached image. I have no idea about what these errors mean. I don't think that the issue is from my coding side, as my multiplayer game runs perfectly in standalone builds, with more than 4 instances of the standalone build running.

It does not even open in my WebGL build. Does WebGL does not support threading? What are these errors all about? Can these issues be solved, or do I have to change my whole project implementation?

The error

  • \$\begingroup\$ I have attempted to give a somewhat helpful answer. While I am not as familiar with java, if you could present the java code involved in your threading, someone else might be able to give a clue as to what is causing the error, exactly. It does seem like an almost guaranteed logic error resulting from your use of threading. Just keep in mind that you want to keep your code samples minimal and complete to present the problem. \$\endgroup\$ – Gnemlock Oct 9 '16 at 10:55
  • \$\begingroup\$ I also forgot to mention that I removed your link, because it does not link to anything but a dead page. \$\endgroup\$ – Gnemlock Oct 9 '16 at 10:57

WebGl does not support threading currently. As for your error, I can't say what it is exactly. It's still tough to debug WebGL builds.


The error is ambiguous, but from your phrasing, I think it is safe to say it is your use of threading.

The error specifically notes "uncaught abort(-1)" error. In my experience, this tells us that something went wrong, but you need to do more digging to find out exactly what. It actually tells you this, in the actual error. Twice.

See your browser's JavaScript console for more info


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

Ultimately, given that you ask "Does WebGL not support threading?", we can assume that you are using threading. WeblGL does not, in fact, support threading. That is not to say this will cause a crash; the Unity manual instructs otherwise:

"Currently, the JavaScript language does neither support multi-threading, nor SIMD. So, any code which benefits from these features will see bigger slowdowns then other code."
- Unity Manual - WebGL performance considerations

That said, you will run into unforeseen behavior, if you insist on implementing threading. Apart from the aforementioned performance cost, you will likely have logical errors arising from the resulting mismanagement of the methods you intended to multi-thread, which can quite easily lead to an abort.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.