livekit-react icon indicating copy to clipboard operation
livekit-react copied to clipboard

Could not connect peer connection after timeout

Open oomaer opened this issue 2 years ago • 1 comments

Whenever I try to connect with LiveKitRoom component, it displays could not establish peer connection after timeout.

oomaer avatar Oct 16 '22 05:10 oomaer

works on my local machine. This error only appears when I try to connect from any other device on the same network.

oomaer avatar Oct 16 '22 09:10 oomaer

hi @oomaer can you run https://livekit.io/connection-test and post the results?

lukasIO avatar Oct 17 '22 08:10 lukasIO

@lukasIO image

oomaer avatar Oct 22 '22 03:10 oomaer

It's best to follow the messages that you get here. Try to host your server on a domain with a tls certificate as the first step and connect to it via wss://mylivekiturl. And then see what else you might need to configure (depending on what the connection tester tells you). Also check out the deploy docs https://docs.livekit.io/deploy

lukasIO avatar Oct 26 '22 11:10 lukasIO

I have deployed it on a server and it works that way, no problem in that. I wanted to work it out on my local network somehow.

oomaer avatar Oct 27 '22 01:10 oomaer

ah, that makes sense. have you tried connecting to localhost from the machine that hosts the server? If you are planning to deploy it in a local network you will still need to use a TLS certificate, but you can probably get away with a self signed one if it's only locally deployed

lukasIO avatar Oct 27 '22 08:10 lukasIO

It works on same machine that hosts the server. I want to make it work on my android emulator on that machine or on my mobile device which is connected to the same network.

oomaer avatar Oct 28 '22 04:10 oomaer