Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity Microgame WebGL upload not working (500 Internal Server)

I am trying to go through the Unity Essentials tutorials. The last step for the Microgame tutorial is the publication of the game. I've been trying to upload the Microgame using WebGL in Unity as instructed for the past three days to no avail. As of now, it says there was an internal server error (code 500). Does anyone know what might be happening? enter image description here I found a relevant post on SO where they stated that it was an issue not relating to Unity. However, before the internal 500 error I'm getting now appeared, my Unity Publishing loading bar would freeze at 2% on a different microgame.

Things I've tried: Restarting the computer, reinstalling unity hub and editor, deleting project and restarting, trying a different Microgame, and waiting it out for three days.

like image 279
Alan Shiah Avatar asked Sep 08 '25 08:09

Alan Shiah


2 Answers

You can try changing the compression format, and/or enabling decompression fallback. These configurations can be found in the Player Settings

Edit>Project Settings>Player

There are 3 compression settings for WebGL

gzip This is the default option. Gzip files are bigger than Brotli files, but faster to build, and natively supported by all browsers over both HTTP and HTTPS.

Brotli Brotli compression offers the best compression ratios. Brotli compressed files are smaller than gzip, but take a longer time to compress, which increases your iteration times on release builds. Chrome and Firefox only natively support Brotli compression over HTTPS.

Disabled Disables compression. Use this option if you want to implement your own compression in post-processing scripts . You should also use it if you plan to use static compression on the hosting server.

In addition, enabling decompression fallback may be the correct option.

When you enable decompression fallback, Unity adds a .unityweb extension to the build files. You should consider using Decompression Fallback if you have less experience with server configuration, or if server configuration is unavailable to you.

Note: Using this option results in a larger loader size and a less efficient loading scheme for the build files.

Unity Reference

like image 116
hijinxbassist Avatar answered Sep 11 '25 02:09

hijinxbassist


2023 Solution

None of the other answers will fix the problem. The good news is, even if your Unity Editor tells you that failed the operation with the Error 500 Internal Server %99 of the time it's uploading to the server.😯

So, you should immediately check the Unity website https://play.unity.com under My Games Section (scroll down a little bit on the home page). You might find lots of successful uploads already there!

In 2022 I've faced the same issue, I forgot to share the answer, this year I'm facing the same exact issue again. But in fact, it's just an editor's upload tool's fault perhaps. I'm not sure.

Hope this will help someone else.

like image 30
mgyky Avatar answered Sep 11 '25 01:09

mgyky