WebGL Error: TypeError - Invalid Arguments

Hi, I’m trying to build and run our game in WebGL. The build completes, but upon opening the html file, I get the following error:

I’m not sure where to go from here. Please advise, any help would be appreciated. I’ll be watching this thread all day if you need any additional info.

Which version of Unity ?
Does it occur on a specific browser?
What’s in your project ?

Man, you are quick!

Unity Version 5.2.2f1
Testing it currently in Firefox, running in Windows 7 64 bit, also tested in Windows 8.1 64 bit.
Tested in chrome using ‘chrome.exe --allow-file-access-from-files’, but the tab just crashes after a while (memory?).

Project:
Here’s a link to play test the project if you want to see. (web player version)
Its a 2D MMORPG. It uses UNet, and talks to a MySQL database on the server side. I’ve used a lot of compiler directives to remove any MySQL code from building for webgl, along with marking plugins correctly.
I could describe the details of the project for pages, but I’m not sure what specifically you’re looking for.

I am not sure it’s a memory issue, however, can you try Chrome 64-bit and take a look at the memory consumption in the Task Manager ?

Here you go, I’ve recorded opening it twice in chrome (64 bit), and you can see the memory go up, crash, and dump.

Hey, was there ever an update on this? I’m still looking for a solution myself, but I’m not sure where to look next.

Perhaps we could ask Google to take a look at it. Any chance you could provide a link ?

I’m sorry, but I don’t understand what you’re asking. Are you asking me to google this? Because I already have and still am.

Are you not allowed to open imgur links? Do you need me to re-upload the image somewhere?

Please explain and I’ll do my best. Thanks!

Sorry if that was not clear. The image you uploaded is fine, I can see that memory consumption increases then Chrome crashes. Honestly it’s difficult to diagnose what’s the source of the problem.
What I meant is that we could ask Google engineers to take a look at your build to see if they can find the problem. Or, you could submit a repro project and we can investigate.

I don’t think the error has to do with chrome specifically. I think its something to do with either my project, or my build settings.

I’d be happy to share the project with you to help me figure out what’s going wrong. With web-player leaving the scene soon, I’m worried that I won’t have a WebGL build in the near future.

How do I go about sending you the repo? Can I add you to the github project, or whats the usual way?

If your project is not huge, then feel free to send it using the bug reporter. Otherwise, we will agree on how to get access to the project once we get the bug report (please post the bug# here).

Is 5.4GB huge?

yes

do you get the same error in non-development mode ?

Case 744329

Yes, I do get the same error in non-development mode. I’ll be checking here and in the bug-report page for any more messages or replies from you, so that I can grant you access to the project as soon as possible.

Also, I know you work for Unity, but regardless, thanks for doing the work you do, and for helping me out.

The problem is the size of your uncompressed .data file (~1.3gb), which the browser fails to find memory for. That’s because you have lots of 4096x4096 uncompressed textures in your Resources folder.

I suggest you:

  • resize and/or compress those textures
  • use asset bundles so you initially download only the ones you need to start the game

Hope that helps.