WebGL build, error message

When I try to play my game online. this message is what appears.

what does this mean?

When you finish building it, does something appears in the console?

1 Like

Just chiming in, as I walked another student through trying to debug via WebGL recently, I think I may create a specific topic for it in due course, if it proves useful.

If you don’t see any errors/issues within the Unity console you can try the following, it may provide some additional information which will either help you directly or, you can screenshot into a reply here.

If you browse to your game using Chrome, and then launch the developer tools;

There are several useful shortcuts for opening the DevTools:

Use Ctrl+Shift+I (or Cmd+Opt+I on Mac) to open the DevTools.
Use Ctrl+Shift+J (or Cmd+Opt+J on Mac) to open the DevTools and bring focus to the Console.

You should be able to view the console, this won’t be overly helpful initially unless you change some of your build settings and republish;

Note: Screenshots taken from Unity 2017.3.0f3 so may vary slightly, depending on your version

With these options changed you should be able to get something considerably more meaningful in the console.

The Development Build won’t be minified so will contain human-readable method names.

2 Likes

That’s an awesome thing to know, thanks for sharing it Rob! :smiley:

1 Like

You’re welcome, I have had to do a bit of digging to help a few people out with these errors and the above can be really useful - just getting a method name out of it is a real bonus!

By not striping the engine code and not minimising you do increase the size of the build, as such, it may take longer to publish and load when browsed to initially. For Number Wizard I doubt this would be a big issue.

Let’s see what Dominic comes back with after trying the above, I don’t want to interject and get in your way of helping etc. So just give me a yell if I’m required, if not, I’ll butt out :slight_smile:

Enjoy playing hunt the NullReferenceException :slight_smile:

1 Like

In my way of helping? of course not xD The important thing is that the problem get solved :slight_smile:
This is such an valuable information, I’m sure I will make use of it in the future too!

1 Like

I’ll create a separate topic later than, and add some links for additional info too, I’ll ping ya the link :slight_smile:

1 Like

That would be nice :smiley: and it will be just in time for the GGJ which I will probably build an WebGL game

Here ya go Johnny;

@Dominic_Addonizio, if you follow the instructions in this topic, could you post a link to the development build version before fixing the issue with Johnny for me, I would really like to grab another screenshot for the topic I’ve just written, one which will show the code not obfuscated.

Thanks in advance :slight_smile:

1 Like

Awesome, thanks Rob

1 Like

I am not too sure what you’re asking me to do. But I will try and rebuilding the game and messing with those settings are you illustrated.

1 Like

Hi Dominic,

All I was after was the URL to your re-published game, e.g. after making the changes in the build settings listed above, then republishing your game so that Johhny and/or I can help you fix the error.

What I would be able to do is then take another screenshot of the browser’s console which I can use in the topic I wrote earlier to help other students when it comes to debugging WebGL games.

Obviously, I need a link to the game whilst it is still erroring, but as a development build, so that what we will see in the browser’s console is a list of methods which are being called, rather than the obfuscated method names.

I note that the topic now states Solved, does that mean you have identified the problem and resolved it?

1 Like

I thought that the instructions that you gave me would of fixed it so I changed it are you not positive that it will be fixed?

also I could not find these setting when I went to rebuild the game.
image

currently I am trying to repost my new build on share my game.com but its still processing…its taking a lot longer than last time which is concerning.

1 Like

When you build the webgl, just after it there usually are some information in the console, can you print it and send so we can see?

1 Like

What I posted wasn’t to fix the issue, but instead to provide a detailed error message so that you/we could better understand the actual problem is - and then fix it :slight_smile:

A development build will be larger than a non-development build and as such will take a little longer to both upload and process at the other end.

also I could not find these setting when I went to rebuild the game.

Which version of Unity are you using? These settings will appear in the Inspector when you click the Player Settings…, button (they may vary depending on Unity version)

I am using unity 2017

humm… it does return some warnings about the use of obsolete methods (Application.LoadLevel in this case), would you mind changing this method for SceneManager.LoadScene in those 4 lines? You should include the using UnityEngine.SceneManagement in the namespaces for this to work.

Although it would be nice to have the screenshot of the browser’s console as Rob suggested before you fix it, it may help more people with similar problems eventually

Is this what you are looking for?

Edit: its not, sorry >.<

Privacy & Terms