Closed FarazPatankar closed 3 years ago
We've had this issue pop up on Sentry a few times now. Here's what we see on our end:
{ code: INVALID_OPERATION, data: [undefined], message: AgoraRTCError INVALID_OPERATION: [client-b0efd] Client already in connecting/connected state, name: AgoraRTCException }
Here's the code we've written for publishing the streams:
const tracks = await createLocalTracks() await client.join(appId, String(channel), token, uid) await client.enableDualStream() await client.setStreamFallbackOption(remoteUserVideoUid, 2) await client.publish(tracks)
Could someone shed some light on why this happens and how we can avoid it? Do we simply check if the client is already trying to connect and not call join in that case?
join
Any help would be greatly appreciated!
@HAHAHA44 @disoul Could you please respond to this? It's showing up very often for us.
You call the join multiple times. It should be called once before leave.
Describe the bug
We've had this issue pop up on Sentry a few times now. Here's what we see on our end:
Here's the code we've written for publishing the streams:
Could someone shed some light on why this happens and how we can avoid it? Do we simply check if the client is already trying to connect and not call
join
in that case?Any help would be greatly appreciated!