Open Arm63 opened 1 year ago
Looks like there's a race condition here with the RTCEngine processing a leave message while Room.disconnect() is called. This might take some time to fix.
In the meantime, I think reversing the order might be a workaround (disconnecting the room object before deleting the room from the server).
Hey, any news on that @davidliu ?
Hey @benoitletondor, no news at the moment, I'll take another look at fixing this soon though.
Is it fixed in latest version? @davidliu
have same bug, it happens when I try to execute room.disconnect immediately after I'v got Room.State.CONNECTED
Describe the bug
On version, 1.1.4 try to end the call with the calling room.disconnect(), the crash is happens
Create room in ViewModel
End a call
When I call stopLiveKitConference our server deletes the room and sends me a response of server call, after that I call the room.disconnect() and a crash happens. But when I call delay like 2000 before of room.dissconnect(), and all works normally without the crash.
Expected behavior Call must end
Device Info:
LiveKit SDK version: [1.1.4]
kotlin.UninitializedPropertyAccessException: publisher has not been initialized yet. at io.livekit.android.room.RTCEngine.getPublisher$livekit_android_sdk_release(RTCEngine.kt:98) at io.livekit.android.room.participant.LocalParticipant.unpublishTrack(LocalParticipant.kt:413) at io.livekit.android.room.participant.LocalParticipant.unpublishTrack$default(LocalParticipant.kt:402) at io.livekit.android.room.participant.LocalParticipant.cleanup(LocalParticipant.kt:566) at io.livekit.android.room.Room.cleanupRoom(Room.kt:446) at io.livekit.android.room.Room.handleDisconnect(Room.kt:465) at io.livekit.android.room.Room.disconnect(Room.kt:248) at -------------LiveKitCallViewModel.disconnect(LiveKitCallViewModel.kt:321)