client-sdk-react-native
client-sdk-react-native copied to clipboard
iOS crash on camera switch
Describe the bug
iOS app completly crashes on camera switch (room.switchActiveDevice("videoinput", newDevice.deviceId))
To Reproduce
Steps to reproduce the behavior:
- Clone https://github.com/livekit/client-sdk-react-native
- Install example app
- Click camera switch button
- See crash
Device Info:
- Device: iPhone 14 Pro
- OS: iOS 18.3.1
Dependencies Info (please reference your package-lock.json or yarn.lock file, not just your package.json):
- @livekit/react-native: latest
- livekit-client: latest
- react-native-webrtc: latest
Additional context
LivekitReactNativeExample-2025-03-05-180207.ips.zip
Probably related issue https://github.com/livekit/react-native-webrtc/issues/22
+1
+1
+1
Hello @nucleartux did you resolve the issue or is it still happening?
@mosamlife I haven't found any solution
+1
Can you provide the specific versions and logs?
Logs are provided in the issue, the version is equal to the version in the repository, and I haven't touched anything.
It's for verification purposes, sanity check, and note keeping if a related issue comes up in the future. Please provide the specific versions from your lock file.
In my app I use following versions: @livekit/react-native: 2.6.2 livekit-client: 2.9.5 @livekit/react-native-webrtc: 125.0.9
In example app I see different versions: @livekit/react-native: 🤷 livekit-client: 2.9.8 @livekit/react-native-webrtc: 125.0.8
Bug occurs in both of these apps
Fixed in 2.7.6.
WARNING: This was "fixed" by completely removing the ability to switch camera through applyConstraints (and _switchCamera which uses this internally).
This is a breaking change! And documentation keeps incorrectly suggesting to use applyConstraints.
The only working solution now is to rerequest stream with new constraints