client-sdk-react-native icon indicating copy to clipboard operation
client-sdk-react-native copied to clipboard

iOS crash on camera switch

Open nucleartux opened this issue 9 months ago • 10 comments

Describe the bug

iOS app completly crashes on camera switch (room.switchActiveDevice("videoinput", newDevice.deviceId))

To Reproduce

Steps to reproduce the behavior:

  1. Clone https://github.com/livekit/client-sdk-react-native
  2. Install example app
  3. Click camera switch button
  4. 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

nucleartux avatar Mar 05 '25 17:03 nucleartux

+1

mosamlife avatar Mar 12 '25 12:03 mosamlife

+1

jayk1106 avatar Mar 12 '25 12:03 jayk1106

+1

ritik-cohort avatar Mar 12 '25 12:03 ritik-cohort

Hello @nucleartux did you resolve the issue or is it still happening?

mosamlife avatar Mar 17 '25 06:03 mosamlife

@mosamlife I haven't found any solution

nucleartux avatar Mar 17 '25 08:03 nucleartux

+1

Mihai-github avatar Mar 18 '25 13:03 Mihai-github

Can you provide the specific versions and logs?

davidliu avatar Mar 21 '25 11:03 davidliu

Logs are provided in the issue, the version is equal to the version in the repository, and I haven't touched anything.

nucleartux avatar Mar 21 '25 11:03 nucleartux

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.

davidliu avatar Mar 21 '25 12:03 davidliu

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

nucleartux avatar Mar 21 '25 13:03 nucleartux

Fixed in 2.7.6.

davidliu avatar Jun 25 '25 10:06 davidliu

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

gavrilikhin-d avatar Jul 09 '25 11:07 gavrilikhin-d