cold-hydrogen-40655
10/16/2025, 1:46 PMtall-airline-16756
10/16/2025, 1:46 PMtall-airline-16756
10/16/2025, 1:47 PMAudioSessionGetProperty (kMXSessionProperty_HasEchoCancelledInput) failed with error: -50 is related to the iOS audio session configuration. It usually points to a parameter issue when checking echo cancellation properties. The good news is, this error often doesn’t affect the core functionality. To help you out, here are some steps you can try:
1. Make sure your SDK is set up properly in your iOS AppDelegate. For example, in Objective-C:
#import "LivekitReactNative.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[LivekitReactNative setup];
// ... other initialization
}
2. Try testing the audio functionality in real scenarios to see if the error actually impacts performance.
3. Consider customizing the audio session configuration using setAppleAudioConfiguration() before connecting to a room:
import { AudioSession } from '@livekit/react-native';
await AudioSession.setAppleAudioConfiguration({
audioCategory: 'playAndRecord',
audioCategoryOptions: [
'allowBluetooth',
'allowBluetoothA2DP',
'allowAirPlay',
'defaultToSpeaker'
],
audioMode: 'videoChat'
});
4. Double-check that you’re using the latest versions of @livekit/react-native and @livekit/react-native-webrtc.
5. It might also help to debug the audio session state by checking available outputs and monitoring any state changes:
const outputs = await AudioSession.getAudioOutputs();
console.log('Available audio outputs:', outputs);
If your audio is working fine despite this message, you can usually treat this error as a harmless warning. Please feel free to reach out if you have any more questions or need further help—I’m here for you!
Sources: example/ios/LivekitReactNativeExample/AppDelegate.mm | Noise & echo cancellation | LiveKit Docscold-hydrogen-40655
10/16/2025, 2:32 PMtall-airline-16756
10/16/2025, 2:33 PMregisterGlobals() in your app's entry point (like index.js)?
• Did you make sure to implement the native setup() calls in AppDelegate for iOS and MainApplication for Android?
• Are you using AudioSession.startAudioSession() before connecting to the room?
• Would you be able to share the full error message from the promise rejection?
Once we have these details, I’ll be in a much better position to help you find the right fix. Looking forward to your reply!
Sources: src/index.tsxcold-hydrogen-40655
10/16/2025, 5:31 PMtall-airline-16756
10/16/2025, 5:32 PMdefault and force_speaker show that your audio session is active and that routing options are ready to go. That’s a great start! However, the blank screen you’re seeing might still be connected to video rendering or how the connection is set up. To help us get to the bottom of this together, could you please check a few things for me?
• Are you passing the correct serverUrl and token to the LiveKitRoom component?
• Have you wrapped your components inside LiveKitRoom with the necessary props like connect=true, audio=true, and video=true?
• Are you calling AudioSession.startAudioSession() before connecting to the room?
• Would you be able to share the full error message from the "Possible unhandled promise rejection" notification?
With these details, we’ll have a clearer picture of whether the issue is related to media permissions, connection setup, or rendering. I’m here to help you through this, so feel free to share whatever you find!cold-hydrogen-40655
10/16/2025, 5:39 PMtall-airline-16756
10/16/2025, 5:40 PMonConnected callback not being triggered might be due to a connection hiccup. Let’s walk through a few things together to help get this sorted:
• Make sure registerGlobals() is called right at the start of your app, such as in index.js.
• Before connecting to the room, please call AudioSession.startAudioSession().
• Take a look at the onError callback for any error messages. Sometimes issues can come from invalid tokens, network troubles, or missing permissions.
• Double-check that the native setup is all set up properly:
• On Android: Ensure you’ve called LiveKitReactNative.setup(this) inside MainApplication.
• On iOS: Make sure [LivekitReactNative setup] is called in AppDelegate.
If you’ve already gone through these steps, could you please share what you’re seeing in the onError callback or any other logs? That info will really help us get to the bottom of this together.
Sources: README.md | packages/react/src/hooks/useLiveKitRoom.tscold-hydrogen-40655
10/16/2025, 5:45 PMtall-airline-16756
10/16/2025, 5:45 PMAudioSession.startAudioSession() is called, you can gently control the connection flow by setting connect to false at first, and then connecting programmatically after starting the audio session. Here’s a friendly way to do it:
1. First, set connect=false in your LiveKitRoom component:
<LiveKitRoom
serverUrl="{serverUrl}"
token="{token}"
connect={false}
onConnected={() => console.log("Connected to LiveKit")}
onError={(e) => console.error("LiveKit Error:", e)}
audio={true}
video={false}
/>
1. Then, use a useEffect or similar logic to start the audio session and connect right after:
import { AudioSession } from '@livekit/react-native';
import { useRef, useEffect } from 'react';
const MyComponent = () => {
const roomRef = useRef(null);
useEffect(() => {
const setupAudioAndConnect = async () => {
try {
await AudioSession.startAudioSession();
console.log("Audio session started");
roomRef.current?.connect();
} catch (error) {
console.error("Error starting audio session:", error);
}
};
setupAudioAndConnect();
}, []);
return (
<LiveKitRoom
ref={roomRef}
serverUrl="{serverUrl}"
token="{token}"
connect={false}
onConnected={() => console.log("Connected to LiveKit")}
onError={(e) => console.error("LiveKit Error:", e)}
audio={true}
video={false}
/>
);
};
This way, you’re ensuring the audio session is all set up before the room actually connects. If you’d like me to walk you through any part of this or if something isn’t clear, just let me know—I’m here to help!cold-hydrogen-40655
10/16/2025, 5:55 PMtall-airline-16756
10/16/2025, 5:55 PMref property isn’t directly supported on the LiveKitRoom component. But no worries — you can use the useLiveKitRoom hook to manage the room instance programmatically. Here’s a friendly way to update your code:
1. First, use the useLiveKitRoom hook to access the room instance:
import { useLiveKitRoom, AudioSession } from '@livekit/react-native';
import { useEffect } from 'react';
const MyComponent = () => {
const { room, connect } = useLiveKitRoom({
serverUrl: "{serverUrl}",
token: "{token}",
connect: false, // Start with connect set to false
});
useEffect(() => {
const setupAudioAndConnect = async () => {
try {
await AudioSession.startAudioSession();
console.log("Audio session started");
connect(); // Programmatically connect to the room
} catch (error) {
console.error("Error starting audio session:", error);
}
};
setupAudioAndConnect();
}, [connect]);
return (
<LiveKitRoom
room={room}
onConnected={() => console.log("Connected to LiveKit")}
onError={(e) => console.error("LiveKit Error:", e)}
audio={true}
video={false}
/>
);
};
This way, you’ll be managing the room instance smoothly and connecting right after starting the audio session. If you have any questions or need a hand with anything else, just let me know — I’m here to help!cold-hydrogen-40655
10/16/2025, 6:37 PMtall-airline-16756
10/16/2025, 6:38 PMnw_connection_copy_connected_local_endpoint_block_invoke Connection has no local endpoint, which usually points to a network connectivity challenge, often involving WebRTC or ICE (Interactive Connectivity Establishment) negotiation. Let’s work through some steps together to get this sorted out:
1. First, please make sure that registerGlobals() is being called right at your app's entry point, like in index.js.
2. Next, double-check that your network supports WebRTC connections. It can be helpful to try switching between different networks, such as WiFi and cellular, to see if a firewall or VPN might be causing any restrictions.
3. Take a look at your ICE server configuration as well. Confirm that your LiveKit server is set up correctly with the necessary STUN/TURN servers.
4. Running some connection diagnostics can really shed light on the issue. Tools like checkWebRTC(), checkTURN(), and checkWebsocket() are great for spotting network-level hiccups.
5. Also, double-check your SDK setup in the native files:
• For Android: Make sure you call LiveKitReactNative.setup(this) inside MainApplication.
• For iOS: Ensure [LivekitReactNative setup] is called in AppDelegate.
If you’re still running into trouble after these checks, could you let me know if you’re on a corporate network or using a VPN? Also, any extra logs or error messages you can share would be super helpful to pinpoint what’s going on. I’m here to help you get this resolved!
Sources: README.md | Documentation/CallGuide.mdcold-hydrogen-40655
10/16/2025, 6:40 PMcheckWebRTC(), checkTURN(), and checkWebsocket() are great for spotting network-level hiccups.tall-airline-16756
10/16/2025, 6:41 PMcold-hydrogen-40655
10/16/2025, 7:09 PMcold-hydrogen-40655
10/16/2025, 7:22 PM