-
Notifications
You must be signed in to change notification settings - Fork 142
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
"ConnectException Failed to connect to server" ONLY on iOS with 4G/5G #115
Comments
@rokk4 thank you for the detailed bug report. which version of the server are you running? Do you have a TURN server set up as well? |
@davidzhao thanks for the reply. :) LiveKit-Server Version is 0.15.7. What I find especially strange is, that the React Example App is working perfectly, so I have the feeling that this is not a issue coming from the server, but something in the the native iOS part of the client. |
I am seeing the same when I am connecting via flutter client on 4G as well as wifi on Android. The server says
And yes, the react app works good and also the mobile apps work good too but I am seeing this frequently on mobile connection. It just doesn't connect |
The issue is still there in Server Version 1.2.5 and flutter-client-sdk Version 1.1.7 Now I have seen the following in the logs. Also this looks interesting:
So all of this seems to be point into TLS problems. I have stumbled upon some information that iOS can be strange if no full-chain.pem of LE-Certs is served, i think live-kit-caddy does not serve it this way, or does it? Does somebody have a idea and/or any suggestions how I can debug/investigate this further? Any more logs I could provide or something? @davidzhao |
@vishal-android-freak Did you solve the issue? @cloudwebrtc Do you have any idea what could be going on? |
@rokk4 When you connect to the client under 4G/5G, have you configured the turn/stun server, and what is the local ice candidate? According to the log, it should be that ice is not connected successfully |
@cloudwebrtc The Issue was caused by Lets Encrypt Certs, there seem to be the same problems over at Matrix and Jitisi.
I would recommend to add a hint about LE-Cert issues and the ZeroSSL workaround to the LiveKit docs. @davidzhao This is the Caddy Config to make it work: logging:
logs:
default:
level: INFO
storage:
"module": "file_system"
"root": "/data"
apps:
tls:
certificates:
automate:
- live.my.tld
- live-turn..my.tld
automation:
policies:
- issuers:
- module: zerossl
api_key:
apikey: SUPERSECRETZEROSSLAPIKEY
layer4:
servers:
main:
listen: [":443"]
routes:
- match:
- tls:
sni:
- "live-turn..my.tld
handle:
- handler: tls
- handler: proxy
upstreams:
- dial: ["xxx.xxx.xxx.xxx:5349"]
- match:
- tls:
sni:
- "live.my.tldt"
handle:
- handler: tls
connection_policies:
- alpn: ["http/1.1"]
- handler: proxy
upstreams:
- dial: ["localhost:7880"]
Thank you a lot for your support. |
@rokk4 Thanks for pointing this out. we'll include a note with our generated configs. and perhaps make ZeroSSL an option |
hi @rokk4, I have similar issue like you when call with 4G IOS. I try to use ZeroSSL but some errors below make me confused, can you take a look?
|
Looks normal to me. What happens after the challange? Did you replace my-domain.com or is this the actual output? Because that would say the the domain is not set correctly I guess. |
Thanks for your response!
It seems auto create and new certificate for me, but I have set up for my domain. |
First I want to thank you for the dev expierence with livekit, it is really awesome. This project is going to huge. :)
My issue is, It just won't connect on iOS with celluar, works fine in every other scenario.
Very strange is that, there is a small chance for it to work, but only after a fresh start of the app. But this happend only 2 or 3 times out of 50-60 trails.
At first I thought that it was an issue withe the celluar provider (telekom) doing IPv6 only, but changing to regular dual-stack did not solve the issue, and also everything was fine when the IPv6 only uplink was used by other devices via hotspot.
Versions:
flutter_client 0.5.9
iOS 15.4.1
What did I test:
LiveKit Connection Test is fine on all devices under all circumstances.
React Example App in Safari on the iPhone with 4G/5G connection ---> OK
React Example App in Safari on the iPhone with Wifi ---- OK
Flutter Example App on Android Mi A2 with Wifi but from the 4G/5G iPhone hotspot --> OK
Flutter Example App on Android Mi A2 Wifi --> OK
Flutter Example App on MacOS with Wifi or Ethernet -> OK
Flutter Example App on MacOS with Wifi but from the 4G/5G iPhone hotspot -> OK
Flutter Example App on iPhone with Wifi --> OK
Flutter Example App on iPhone with Wifi but 4G uplink from another Androids phone hotspot --> OK
Flutter Example App on iPhone with 4G/5G --> ConnectException Failed to connect to server :(
Steps to reproduce:
use example app on iphone with 4G/5G
server URL
wss://live. txxhexxraxxpy-lxxixxft.net
(without the xxs because SEO ...)token:
x
I have attached server and flutter logs, for success and failure cases.
flutter_FAIL.txt
flutter_SUCCESS.txt
server_FAIL.txt
server_SUCCESS.txt
The text was updated successfully, but these errors were encountered: