"Uncaught TypeError: Cannot read property ‘id’ of null in"

I’m getting the issue on webgl run "Uncaught TypeError: Cannot read property ‘id’ of null in "
i don’t know why am getting this plz solve this issue

Help me rob am getting this issue on running webgl html page "Uncaught TypeError: Cannot read property ‘id’ of null "
plz help me to solve this

Hello Sheeza,

If you want help you are going to need to give a bit more information than that. Your error could be being caused by potentially anything.

Have you tried debugging yourself?

i will give you zip folder of my project will you fix it out ?? plz m facing this issue and i dont know how to solve it

Hi Sheeza,

If you uploading your project files I will take a quick look for you later this evening.

The forum will allow uploads of up to 10MB, if your project files (zipped) are larger than that you would need to use a service such as Google Drive or Dropbox, and then share the URL.

https://drive.google.com/open?id=1AO2yyzTTRArQeDINFhACLWf7Fd2uzolY

here is the link you can check here. I made the project with webgl you can delete the Folder WebGL and build it again and when it will take you to Html page and on clicking LAN CLient you will get this popup “Uncaught TypeError: Cannot read property ‘id’ of null”

Hi Sheeza,

I see this game is a mulitplayer version of Tic Tac Toe, not Number Wizard which is where you originally posted your topic.

Which of the GameDev.tv courses are you currently working through?

i posted at number wizard because my issue resembles to that

I’ve moved the topic as it really doesn’t.

Which course(s) are you taking?

i build this game myself by taking different tutorials it runs well on pc/windows/linux build but not run well on webgl .
I don’t know why

the main problem is that webgl want to run the server in unity editor but how i will continue to run server when i will upload my game on domain(server)

It isn’t running well on my PC, one build, launched twice, run one as a host, one as a lan client - they never connect.

Whilst unlikely to be an issue at the moment, you have 11 warnings about using deprecated API calls also.

Regarding running it on a server, you should be able to open two instances of the game and have one of them act as the server host (and be playable) and have another connect as a client - two people could then play the game. You wouldn’t be using “localhost” as the address though, you’d use the IP address of the server/computer running the game.

When I run your game within Unity, and click Lan Host an exception error is thrown because there is no client, which you are trying to access on line 49 of GameController.cs;

if (matchController.clientPlayer.isLocalPlayer)

what should i do then :cry:

Is this entire project from a tutorial, e.g. you’ve effectively just copied what you’ve been shown?

i just copied . you can check that when it is build in windows/linux/pc it works well but i want it in webgl
can you do it Rob??

It doesnt work in Windows, as I’ve already stated.

Can I do what?

can you make it able to work on webgl ??

Given some time to digest the current approach, update the API references to obsolete code, resolve current errors and thoroughly test both locally and remotely I’m sure I could, yes.

I know you can :star_struck:

and it is running on windows build i tried it myself and create two builds and they get connected with each other on enabling matchmaker . Am damn sure it is working i did this. I played the game through windows build

Privacy & Terms