suriyun-production / mmorpg-kit-docs

This is document for MMORPG KIT project (https://www.assetstore.unity3d.com/#!/content/110188?aid=1100lGeN)
https://suriyun-production.github.io/mmorpg-kit-docs
49 stars 11 forks source link

*WebGL issue* WebGL works in editor but not in browser.. #2113

Open Defylogics opened 1 year ago

Defylogics commented 1 year ago

I've been trying to get WebGL setup but the documents dont go beyond anything except for saying to enable websocket.Ive been struggling for 15 months on and off over 200+ MMORPGKIT unity builds ive done and still yet to figure out the problem with websockets and webGL with MMORPGKIT it wont let me connect to my unity WebGL build i followed the digital ocean droplet server instructions.What are the proper configuration steps for getting it to work i even purchased a SSL certificate and website and digital ocean droplet server to host it on.. Please help me

Fix The webGL works in editor but not through the browser i pointed my servers ip address to my domain in the dns settings setting a new record. Im not sure what to do next..Your asset is genius but i do need help with this one any help would be greatly appreciated.

reidsneo commented 1 year ago

"The webGL works in editor but not through the browser"

Can you post any of screenshot error? What webserver did you use? Apache or Nginx?

In my case the port was need to be open only 2 Port

  1. is for websocket
  2. 1 other for the http/https 80 or 443

Perhaps another issue with your asset loading since Apache or Nginx need to be configured to be abble use web assembly header don't know since there is no error or screenshot

Defylogics commented 1 year ago

There werent any errors but now i cannot connect I have the whole project setup except i dont know how to point my website's WWW to my gameserver for my website. Im using a www.ionos.com domain and website hosting plan. Ill post some screenshots my website is using a linux package the technical support team said for ionos.

My game server is through DigitalOcean server droplet package. My configuration settings are in the pictures and videos below along with the error messages.

As far as the screenshots go im not sure what im supposed to be posting but my game project is all setup just cannot connect to the game server ive opened my ports 80 and 443 for http/https to be connected to it trys to connect to the websocket connection but throws a unable to connect and closes the connection.

Defylogics commented 1 year ago

configurationsettingsformmorpg

Defylogics commented 1 year ago

The connection simply says unable to connect.

https://github.com/suriyun-production/mmorpg-kit-docs/assets/90359150/aec8fb4d-68d2-4c4c-9a65-e6cd44a27653

I believe i have a linux apache web server running but im not sure can you please enlighten me on how to see weather its Apache or Nginx ive tried a couple different ways but i couldnt figure out where it states the web server..

Defylogics commented 1 year ago

unityeditor screenshot of inspector webGL

Defylogics commented 1 year ago

Now my game wont work in the editor :/

Defylogics commented 1 year ago

configurationsettingsformmorpg

Defylogics commented 1 year ago

Any help would be greatly appreciated!

Thankyou

reidsneo commented 1 year ago

The Author still in away, will be back in first week of June

BTW I check the domain it was not online is it already well configured? from the configuration you sent you need to open port 7000

What I recommend is :

  1. Use public IP host first instead of using domain
  2. Disable secure websocket
  3. Open port 7000 in and outbound in firewall

check is your port available publicy, by putting public ip and port here https://www.yougetsignal.com/tools/open-ports/

is all green the client should be able communicated to server After test above work, later you can proceed with domain setup even secure version of websocket you have to deal with SSL I recommend to disable it first for testing purpose

Defylogics commented 1 year ago

My domain isnt configured i do not know how to point my game server to my domain.

Defylogics commented 1 year ago

Im in The DNS settings for my domain at www.artificializes.com i added a "A" record and added @ symbol then pointed to my game servers ip address then i added another "A" record and added www then pointed it to my game servers ip-address again.

Defylogics commented 1 year ago

it will not allow me to open a port on my game server through digital ocean droplet console.

Defylogics commented 1 year ago

Below are my firewall configurations for my digital ocean server droplet i typed sudo ufw allow 7000/tcp it appears to be allowed but not open im not sure whats going on...

myportsandfirewallstatus

Defylogics commented 1 year ago

Errorcurl in droplet console

Defylogics commented 1 year ago

Curl Error 7: Failed to connect to localhost portt 9801 : Connection refused when starting the server

Defylogics commented 1 year ago

This is what customer service tech support at digital ocean said.

I reviewed the screenshot and see that you are receiving "connection refused". The reason is as said in my previous response this is not due to any firewall restrictions, you will be able to connect to a port if there is an application/ service bound to that port. Please check with your application administration team to verify if the applications are running on the ports to which you are trying to connect.

Defylogics commented 1 year ago

Apparently my ports are open but theirs no application running on those ports..

insthync commented 1 year ago

I will available to answer you tomorrow

Defylogics commented 1 year ago

Thankyou i understand your time and everyone elses is priceless so i would like to donate 10$ for helping me if i can when possible

Defylogics commented 1 year ago

Port's 7000,443,and 80 remain unopened for some reason even if i add it as a tcp connection in the firewall inbound and outbound for all those ports.

Defylogics commented 1 year ago

Im on and available when you are @insthync

Defylogics commented 1 year ago

Hey are you available @insthync

insthync commented 1 year ago

Are you requested for the video isn't it?

Defylogics commented 1 year ago

yes please if you dont mind ill donate 10$ @insthync

insthync commented 1 year ago

If you will donate, you will do it immediately, request someone to do something for you should not be called "donate", it is hiring.

Defylogics commented 1 year ago

I dont have access to my money at the moment...

Defylogics commented 1 year ago

I thought this git url was for help and all i said was i offered to donate for you helping me ...

Defylogics commented 1 year ago

in a few hours ill have access to it...

insthync commented 1 year ago

You don't have to do anything if you can't, I didn't request the donation, and I didn't say I won't show you how I make it work.

Defylogics commented 1 year ago

Oh Thanks man i really appreciate that I promise you as a asset owner of your genius asset ill pay it forward.