Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment issues with ngrok (or other tunneling) #1144

Open
sridharraman opened this issue Apr 11, 2023 · 0 comments
Open

Deployment issues with ngrok (or other tunneling) #1144

sridharraman opened this issue Apr 11, 2023 · 0 comments

Comments

@sridharraman
Copy link

Hi, I am building a multi-player game using vue.js as the front-end. I have been able to get the client and server running smoothly in my local machine. I wanted to know what would be the best way to demonstrate the capabilities of the game to my internal team before deployment.

This is what I tried. I used ngrok to tunnel to the port that the client is running in, and left the server running at localhost:8000. This works fine, but only in my local machine. For outsiders, localhost:8000 is obviously not reachable.

So I tried to use localtunnel to the port that the server was running in, but this is the error I get when I go to the client page:

https://clever-steaks-occur-xxxxxxx.loca.lt/socket.io/?EIO=4&transport=polling&t=OTn9tLk
[HTTP/2 511 Network Authentication Required 2714ms]

I wasn't sure what network authentication this was about. Any pointers?

To give more information, if URL_1 is the link that ngrok gives me, and URL_2 is the link that localtunnel gives me, the error when I go to URL_1 is the own shown above: <URL_2>/socket.io, etc.

I am wondering if I have made a mistake somewhere. In the Server code, under origins, I have provided URL_1 that can access the game server. Is that correct? Should the url in this section be the url where the client is running?

Similarly, in the front-end, when I create the Client, I have given this as the value for the multiplayer parameter: SocketIO({ server: '<URL_2>' }). That is this is the url where the server is running. Is this correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant