Cannot build WebGL

I’ve been searching around for how to fix this.

I can build a Linux platform solution, but WebGL build always fails.

I recently did a new install, but I’m using Unity 2019.4.18f1. I tried to create a new game file and build it, but that failed too.

Went back and installed all the Windows support stuff…failed.

Installed the Android support stuff…failed.

I’m trying to install the Mac stuff, but now Unity is locking up and being a…I’m sure the Germans have a word for it…they have a word for everything.

I might try building my whole game all over again in the newer version. I wasn’t having build issues before the crash last month…grumble grumble…

I have 2020.3.0f1 (never used) and 2019.4.18.f1LTS (which is the one that is failing). I just updated them with all of the remaining modules for Windows, Android, iOS, etc…I’ll mess with them tomorrow after I get some rest.

1 Like

Hi Jay,

Here are a few suggestions:

  1. Save your build on your harddrive but not inside your project folder, on your Desktop or in a cloud.
  2. Use English characters (A-Z, a-z, 0-9) only for your file and folder names.
  3. Remove all scenes from the Build Settings list and readd them.
  4. Make sure that neither your firewall nor your antivirus program block Unity.
  5. Run Unity with administrator rights.
  6. Update Unity to a newer stable version.

Did any of these help?


See also:

Thank you Nina,

I will start trying these solutions tonight after I get off work. So many tech issues these past several weeks…I feel like I’m about to level up!

Now in progress…

-Moved folder 2_Text_101 from Seagate (ExtHDD) into my laptop at home -> Unity.

-Powered off and disconnected the Seagate.

-Renamed folder to ‘Text101’ with no spaces or other characters.

-Open Unity, find Text101, Add, Open…success.

-Build and Run settings: Delete scene in build…add open scene…so far so good.

-No firewall nor antivirus present.

-I don’t know how to run Unity with Admin rights, but at this point I’m going to try a test build because we’re at that point…

…side note: here is another thing I noticed…I was trying to save in a folder that I had named WTG_Test_Builds so I’m trying a new folder called WTGTest instead.

I think I was also trying to save as something like WTG_WebGL so I’m going to try WTGWebGL instead as a name…testing…

Gonna try 2020.3.0f1 I guess…

…2020.3.0f1 has a nice splash screen…

…Opened in 2020.3.of1, went into Build and Run and deleted all the scenes. Saved and closed Unity. Re-opened Unity and opened Build Settings…Add Open Scene…Build and run…Cross fingers…

…Different errors.

Going to try to change the name of this 2_Text_101.sln folder and see if that matters…

Didn’t seem to do anything different so I changed it back.

Gonna try opening a brand new test file on 2020.3.0f1…

…new test file failed…It always fails during this IL2CPP Native Build thing.

I’m going to bed. I think I have some reading to do tomorrow:

Good job so far. One of the latest error messages says “no such file or directory”.

Since you updated, test your game. There must not be any error messages in Unity, neither when you start the editor nor when you are running your game.

Your last screenshot of the file explorer (or whatever it is called on your operating system) looks as if the build folders were inside the project folder. If I interpreted that correctly, save the build somewhere else. The project folder is managed by Unity, and Unity deletes everything that is not supposed to be there.

Delete the .sln files. They belong to Visual Studio. When you open a script by double clicking on it in Unity and VS gets launched, the .sln file will get recreated.

You could also try to delete the Library folder while Unity is not running. When you start Unity, it gets recreated as well. If you see an empty scene, open your own scene that was saved in your Assets folder.

Okay, so I was, indeed, making my export folder inside my working folder. I corrected that by making a Unity Exports folder (shown). I deleted the things you said to delete (shown). Deleted the Library folder with Unity closed. Re-opened, delete scenes from Build and Add again…Build and Run…

…it always hangs up right here:

Native binary

I deleted my Unity folder and did a reinstall…

Digging in around here and I don’t think anything looks out of the ordinary but I’m not sure…

I gotta go get ready for work.

Just prepped to reload my OS. I just reloaded a few weeks ago, so I’m not really going to lose anything but time. Back in a few…

Your screenshots looked fine so far. If you don’t get any errors anymore but Unity gets stuck during the building process, wait a bit longer and do not click around anywhere. Building might take a couple of minutes.

It might also be that this part of Unity is broken again.

You could also try to follow this instruction. It says something about a Toolchain package which must be installed on Linux.

It happens the same way every time. It gets hung up on Building Native IL2CPP thing and crashes, throws 3-5 exceptions, depending on where the files are stored. I’m currently exporting to a separate file and I think that has taken care of 1 exception, but I’m still throwing the other three.

I looked at the instruction you sent. I’m actually able to build standalone Linux, but I looked into this anyway:

I had this:

…and this is what I did:

Still failed, but I’m under the standalone tab. I need to look under the WebGL tab.

These are the WebGL Configuration Settings:

…and these are the WebGL Publishing settings. I don’t think anything is out of the ordinary.

I also tried ticking that WebAssembly Streaming box at the bottom there, but it failed too so I turned it back off.

I’m still ready to reload my OS, but I just didn’t want to do it tonight after work. It’s late. I’m going to go to bed and pick up in the morning. Good night.

One more thing you could try: In your last screenshot, there is an option called “Compression Format”. Change it to “None”. Gzip is known for causing problems for some students.

If nothing helps, I would suggest to report a bug to Unity via Help > Report a bug.

The choices were Brotli (???), GZip, and Disabled so I chose Disabled. No luck.

I think I have an idea of what may be going on.

After I reloaded my OS, I used the Pop!Shop to load most of the software I use most, like Ardour, Android Studio, SoundConverter, etc…and they now have Unity in there, too.

Pop!Shop Unity (I know, sounds ghetto, right?) wasn’t working very well so I went to Unity Official and got the Linux files like I had done before. I think there might be some kind of a conflict at the OS level between the two different Unity references or something…like one screwed it up for the others maybe. Just a guess.

Gonna try one more new Unity download and then make a boot stick. The rest of the preparations for the OS reload have been done already and I haven’t been able to get any real work done for several days for chasing this darn squirrel aroun’.

That said, I appreciate all of the help you’ve offered. I feel like there’s more that I could try, but I really have had a lot of full days lately and I’m so burnt by the end of the day (the time I get to this) that it is difficult to think clearly and make sense of UnityManualIL2CPPWebGLSpeak. I just wanna watch Ben and Rick, write and doodle in my notebooks with my fancy pens, and poke at my keyboard. KnowWhatIMean?

WTGBook

Okay, I’m done venting. I got more work to do. Thanks again!!

If the only problem you have is that you cannot build your games, maybe you could proceed with the course and refresh your system at a later juncture or create another partition on your harddrive with a different Linux distribution (Ubuntu or something like that).

Also please feel free to ask our helpful community of students over on our Discord chat server. Maybe somebody had the same problem as you and knows a solution.

And if you cannot build your games on your device(s) but your projects are otherwise working, you could ask somebody else if they could build your games for you until you figured out what problem Linux or Unity might have.

1 Like

I appreciate the suggestions, I really do. There are a bunch of reasons why I need to be fairly OCD about this.

  • I’m really trying hard to prepare a WebGL export so a friend in Chicago can play it and help me write the story. I really want to complete this and release it on my itch.io page, but I need to be able to get my friend to play it and he lives in another state.

  • I’m definitely not ready to experience the horrors of splitting partitions with different distributions and such. I used to dabble in a lot of that stuff a couple decades ago, but I just need my stuff working right now and I can’t afford to engineer problems into my system right now. I’m not that good at this stuff anymore and I’m not trying to get A+ certified…which is what I’m afraid I’d need if I started messing in that kind of stuff again.

  • I’m not very good with Discord. I look at the GameDev Discord on my phone once in a while, but I really don’t get it. It looks like a great announcement system, but following a conversation there is difficult for me. It looks like a bunch of rooms where everyone is talking at the same time and it is hard to follow.

  • I don’t really know anyone else who does this kind of thing. It’d be asking a stranger to do something that I need to fix myself, and I feel guilty about stuff like that.

  • I have a mess of other things to do, too, like set up my LinkedIn, get a new headshot, work on my resume…I just need to solve this and be done with it.

  • It’s 6 am and I can’t sleep. I don’t have to work until 2 PM, so I can probably get this done and take a nap before work. The preparations have already been made.

This is stupid. It feels like a suicide note. It’s the pain of going back to all those websites and fiddling with all those passwords…that’s what I’m relating to right now. I just don’t want to do it, to be honest.

Okay, gonna go do this now.

Do you know how difficult it was back in the 90s (I don’t remember the 80s well) when not everybody had access to the internet to look stuff up or to ask for advice? We had to figure most things out ourselves if information was not available in a book, and books often were full of bugs and errors, especially translated books.

Nowadays, programming has become increadibly accessible thanks to the internet. “Everybody” is now able (and allowed) to ask for help to improve their skills further, and, it is expected that you seek help if you need help. I do not know any skilled(!) professional programmer looking down on people asking for advice. They, too, are still learning and asking for advice because the whole field is a neverending story.

Take a break. Sometimes, we miss the obvious things just because we are overtired.

Make a backup. That’s always a good idea, especially if you fear that you might break your system.

By the way, if the issue persists, you could report a bug to Unity via Help > Report a bug. The Unity team usually responds surprisingly fast and is fairly helpful. It might be that you discovered a bug, and they are always glad if they learn about bugs, so they can fix them.

Completely fresh install…had to figure out the license thing…Unity thought my computer was different, so I had to do a new personal license…got that all figured out.

Still failing. I tried a new game, I tried Argon (AKA Space B******), and Text 101. Nothing.

This is so far out of the scope of this forum. I’ll have to contact Unity because I don’t know how else I’m going to figure this out.

I’ll do it tomorrow…I’m cooked.

Virgo: Prepare for 8 weeks of technological Hell.

It’s gotta be something in here…

…or here…

…or maybe here…

I mean, I know these are telling me what the problem is, but I don’t know how to read them very well yet.

The output in your console was very helpful. I searched “Unity Linux x server took” online and found this bug report:

The bug seems to have been fixed in Unity 2021.2.0a6. Maybe you could install that version.

I would suggest to make a backup of your project first and duplicate the project folder for the build version before you import your build project into an alpha version of Unity. Alpha versions are usually fairly buggy but if building your game works, you could import a duplicated project. Just don’t work with the alpha version actively.

1 Like

Hi there, i am also working on Linux. The WebGL did give me a lot of problems! I had similar issues before, and i am VERY HAPPY that you helped finding the BUG which prevented the WebGL to render. Your reports have helped many others.

This IL2CPP does like giving a lot of errors while compiling, i have seen a lot of posts about that.

Cheers, DGR.

1 Like

Thank you for the kind words.

I don’t know what I did, because I still cannot render WebGL. I’m not fixed yet…and I haven’t been trying.

I found a local job posting for a React Developer so I’ve been studying JavaScript and React instead. I live in a small town and it’s the only job of its kind here, so I need to set a goal for that to get me out of the factory. I’m so tired of being a plant electrician. I just want to become a professional programmer this year. I’ve been studying really hard.

I didn’t ‘give up’ on this or GameDev, but I can’t fix it and I needed to change gears. I’m so burnt on this issue.

Thanks,I guess, if I did something other than to frustrate myself. I’m still pretty clueless and really burnt. Sorry man. I’m kinda sad about it, but I gotta keep moving. I don’t know what to do with Unity right now.

Thank you for the kind words.

Privacy & Terms