plain-hamburger-12701
09/26/2025, 6:46 AMcould not establish pc connection but same endpoint connection from normal browser on the same latptop is working finetall-airline-16756
09/26/2025, 6:46 AMtall-airline-16756
09/26/2025, 6:47 AMandroid/app/build.gradle file:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
• Fix WebRTC Runtime Issue: Kindly include this line in your android/gradle.properties file:
android.enableDexingArtifactTransform.desugaring=false
• Android 9 Crash Fix: For this, update your android/app/build.gradle like so:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_11
}
• Update Gradle Version: Make sure your android/build.gradle is using Gradle plugin version 7.3.1 and the Gradle wrapper version is 7.4+.
• Permissions: Also, double-check that your AndroidManifest.xml has the necessary permissions for camera, microphone, and internet access.
Following these steps usually does the trick to fix the WebRTC connection problems on the emulator. If you run into any hiccups or have more questions, feel free to reach out—I’m here to help!
Sources: android/src/main/java/com/oney/WebRTCModule/WebRTCModule.javaplain-hamburger-12701
09/26/2025, 8:33 AMtall-airline-16756
09/26/2025, 8:33 AM*.turn.livekit.cloud on TCP port 443.
• Force TURN Usage: To help with connectivity, set the ICE transport policy to relay-only in your client configuration like this:
connectOpts.rtcConfig = { iceTransportPolicy: 'relay' }
• Whitelist Required Domains and Ports: It’s important that the emulator’s host network allows access to the following:
• *.livekit.cloud – TCP 443 (signaling)
• *.turn.livekit.cloud – TCP 443 (TURN/TLS)
• *.host.livekit.cloud – UDP 3478 (TURN/UDP)
• UDP 50000–60000 (optional, for direct media)
• Test Connectivity: You can use LiveKit's connection test utility to check WebSocket, WebRTC, and TURN access to make sure everything is working smoothly.
• VPN-Specific Adjustments: If your VPN happens to block UDP traffic, try configuring TURN over TCP/TLS as the default transport, or temporarily disable the VPN to see if that improves connectivity.
Following these steps should help clear up the double NAT issue and get your WebRTC connection working properly. If you run into any trouble or have questions, please don’t hesitate to reach out—I’m here to help!
Sources: Documentation/ImprovingCallReliability.md | Firewall Tips | Diagnosing Connection Errors with Connection Test Utility | Configuring firewalls | LiveKit Docs