AgoraIO-Community/AgoraWebSDK-NG

can not receive user-published event but see log [remote user xxx published video/audio]

Opened this issue · 9 comments

Describe the bug

user-published events are not triggered sometimes, enabled log upload

SDK Logs

16:08:44:878 Agora-SDK [DEBUG]: [lock-safari-1] is created.
AgoraRTC_N-production.js?e671:383 16:08:44:883 Agora-SDK [DEBUG]: [lock-config-distribute-2] is created.
AgoraRTC_N-production.js?e671:384 16:08:44:890 Agora-SDK [INFO]: browser compatibility {"getDisplayMedia":true,"getStreamFromExtension":true,"supportUnifiedPlan":true,"supportMinBitrate":true,"supportSetRtpSenderParameters":true,"supportDualStream":true,"webAudioMediaStreamDest":true,"supportReplaceTrack":true,"supportWebGL":true,"webAudioWithAEC":false,"supportRequestFrame":true,"supportShareAudio":true,"supportDualStreamEncoding":false} {"name":"Chrome","version":"89","os":"Mac OS X"}
AgoraRTC_N-production.js?e671:384 16:08:45:119 Agora-SDK [INFO]: start create camera video track(track-ca70b4b3) and microphone audio track(track-79e1dec3) with config, audio: {"encoderConfig":"high_quality","AEC":true,"AGC":true,"ANS":true,"microphoneId":"default"}, video: {"encoderConfig":"720p","cameraId":"1f09739a5cf8eb37357eca53a710f3203d7b3ae087278d24cca30660f60e839d"}
AgoraRTC_N-production.js?e671:383 16:08:45:120 Agora-SDK [DEBUG]: [track-79e1dec3-track-ca70b4b3] GetUserMedia {"video":{"deviceId":{"exact":"1f09739a5cf8eb37357eca53a710f3203d7b3ae087278d24cca30660f60e839d"},"width":1280,"height":720,"frameRate":15},"audio":{"autoGainControl":true,"googAutoGainControl":true,"googAutoGainControl2":true,"echoCancellation":true,"noiseSuppression":true,"googNoiseSuppression":true,"channelCount":1,"sampleRate":48000,"deviceId":{"exact":"default"}}}
AgoraRTC_N-production.js?e671:383 16:08:45:226 Agora-SDK [DEBUG]: [lock-track-79e1dec3-3] is created.
AgoraRTC_N-production.js?e671:384 16:08:45:226 Agora-SDK [INFO]: create audio context
AgoraRTC_N-production.js?e671:383 16:08:45:228 Agora-SDK [DEBUG]: [lock-track-ca70b4b3-4] is created.
AgoraRTC_N-production.js?e671:384 16:08:45:230 Agora-SDK [INFO]: create camera video track(track-ca70b4b3) and microphone audio track(track-79e1dec3) success
AgoraRTC_N-production.js?e671:383 16:08:45:251 Agora-SDK [DEBUG]: [lock-client-leave-5] is created.
AgoraRTC_N-production.js?e671:383 16:08:45:251 Agora-SDK [DEBUG]: [lock-client-publish-6] is created.
AgoraRTC_N-production.js?e671:384 16:08:45:252 Agora-SDK [INFO]: [client-710c3] Initializing AgoraRTC client v4.4.0 build: v4.4.0-0-g48538343(4/2/2021, 5:44:00 PM), mode: rtc, codec: vp8
AgoraRTC_N-production.js?e671:384 16:08:45:257 Agora-SDK [INFO]: [client-710c3] start join channel 5f995107accf20001a27ccc5
AgoraRTC_N-production.js?e671:384 16:08:45:258 Agora-SDK [INFO]: [client-710c3] connection state change: DISCONNECTED -> CONNECTING
AgoraRTC_N-production.js?e671:383 16:08:45:258 Agora-SDK [DEBUG]: [client-710c3] new Session 4A113BE2DBD2EB9776504D4F1FB26604
AgoraRTC_N-production.js?e671:383 16:08:45:465 Agora-SDK [DEBUG]: getUserAccount Success 59892ee6fedc28db4ebe28fa => 1000000001
AgoraRTC_N-production.js?e671:383 16:08:45:466 Agora-SDK [DEBUG]: [lock-config-distribute-2] is locked, current queue 1.
AgoraRTC_N-production.js?e671:383 16:08:45:467 Agora-SDK [DEBUG]: [client-710c3] Connect to choose_server: https://webrtc2-ap-web-1.agora.io/api/v1
AgoraRTC_N-production.js?e671:383 16:08:45:467 Agora-SDK [DEBUG]: [client-710c3] Connect to choose_server: https://webrtc2-2.ap.sd-rtn.com/api/v1
AgoraRTC_N-production.js?e671:383 16:08:45:653 Agora-SDK [DEBUG]: [config-distribute] get config distribute {}
AgoraRTC_N-production.js?e671:383 16:08:45:654 Agora-SDK [DEBUG]: [lock-config-distribute-2] is not locked, current queue 0.
AgoraRTC_N-production.js?e671:383 16:08:45:687 Agora-SDK [DEBUG]: [gateway-client-710c3] start connect, url: wss://118-212-135-224.edge.sd-rtn.com:4705
AgoraRTC_N-production.js?e671:383 16:08:45:867 Agora-SDK [DEBUG]: [gateway-client-710c3] websocket opened: wss://118-212-135-224.edge.sd-rtn.com:4705
AgoraRTC_N-production.js?e671:384 16:08:45:931 Agora-SDK [INFO]: [client-710c3] connection state change: CONNECTING -> CONNECTED
AgoraRTC_N-production.js?e671:383 16:08:45:933 Agora-SDK [DEBUG]: [client-710c3] Connected to gateway server
AgoraRTC_N-production.js?e671:384 16:08:45:933 Agora-SDK [INFO]: [client-710c3] Joining channel success: 5f995107accf20001a27ccc5
AgoraRTC_N-production.js?e671:384 16:08:45:934 Agora-SDK [INFO]: [client-710c3] Publishing tracks, id track-79e1dec3 ,track-ca70b4b3 
AgoraRTC_N-production.js?e671:383 16:08:45:935 Agora-SDK [DEBUG]: [lock-client-publish-6] is locked, current queue 1.
AgoraRTC_N-production.js?e671:383 16:08:45:935 Agora-SDK [DEBUG]: [client-710c3] publish high stream
AgoraRTC_N-production.js?e671:383 16:08:45:938 Agora-SDK [DEBUG]: [client-710c3-pub-1] add audio track to pc
AgoraRTC_N-production.js?e671:383 16:08:45:939 Agora-SDK [DEBUG]: [client-710c3-pub-1] add video track to pc
AgoraRTC_N-production.js?e671:383 16:08:45:940 Agora-SDK [DEBUG]: [client-710c3-pub-1] set pc rtp sender {maxBitrate: 1130000} balanced
AgoraRTC_N-production.js?e671:383 16:08:45:948 Agora-SDK [DEBUG]: spatial layers:  1
AgoraRTC_N-production.js?e671:383 16:08:45:953 Agora-SDK [DEBUG]: set audio sender network quality: high
AgoraRTC_N-production.js?e671:383 16:08:45:953 Agora-SDK [DEBUG]: set video sender network quality: high
AgoraRTC_N-production.js?e671:383 16:08:45:954 Agora-SDK [DEBUG]: [client-710c3-pub-1] create and set offer success
AgoraRTC_N-production.js?e671:383 16:08:45:958 Agora-SDK [DEBUG]: [pc-1] ice candidate error stun:118-212-135-224.edge.sd-rtn.com:4735, code: 701, STUN host lookup received error.
AgoraRTC_N-production.js?e671:383 16:08:45:958 Agora-SDK [DEBUG]: [pc-1] ice candidate error stun:webcs.agora.io:3478, code: 701, STUN host lookup received error.
AgoraRTC_N-production.js?e671:383 16:08:45:959 Agora-SDK [DEBUG]: [pc-1] ice candidate error stun:118-212-135-224.edge.sd-rtn.com:4735, code: 701, STUN host lookup received error.
AgoraRTC_N-production.js?e671:383 16:08:45:959 Agora-SDK [DEBUG]: [pc-1] ice candidate error stun:webcs.agora.io:3478, code: 701, STUN host lookup received error.
2AgoraRTC_N-production.js?e671:383 16:08:46:4 Agora-SDK [DEBUG]: [pc-1] ice candidate error turn:118-212-135-224.edge.sd-rtn.com:4735?transport=udp, code: 701, TURN host lookup received error.
AgoraRTC_N-production.js?e671:384 16:08:46:25 Agora-SDK [INFO]: [client-710c3-pub-1] ice-state: pub p2p checking
AgoraRTC_N-production.js?e671:383 16:08:46:27 Agora-SDK [DEBUG]: [client-710c3-pub-1] set answer success
AgoraRTC_N-production.js?e671:384 16:08:46:28 Agora-SDK [INFO]: [client-710c3-pub-1] connection-state: pub p2p connecting
AgoraRTC_N-production.js?e671:383 16:08:46:45 Agora-SDK [DEBUG]: [client-710c3] user online 5f8e5206c9f1ff001a39e329
AgoraRTC_N-production.js?e671:383 16:08:46:46 Agora-SDK [DEBUG]: [client-710c3] stream added with uid 5f8e5206c9f1ff001a39e329, type audio
AgoraRTC_N-production.js?e671:384 16:08:46:46 Agora-SDK [INFO]: [client-710c3] remote user 5f8e5206c9f1ff001a39e329 published audio
AgoraRTC_N-production.js?e671:383 16:08:46:48 Agora-SDK [DEBUG]: [client-710c3] stream added with uid 5f8e5206c9f1ff001a39e329, type video
AgoraRTC_N-production.js?e671:384 16:08:46:49 Agora-SDK [INFO]: [client-710c3] remote user 5f8e5206c9f1ff001a39e329 published video
AgoraRTC_N-production.js?e671:383 16:08:46:66 Agora-SDK [DEBUG]: [pc-1] ice candidate error turn:118-212-135-224.edge.sd-rtn.com:4735?transport=tcp, code: 701, TURN host lookup received error.
AgoraRTC_N-production.js?e671:384 16:08:46:67 Agora-SDK [INFO]: [client-710c3-pub-1] ice-state: pub p2p connected
AgoraRTC_N-production.js?e671:383 16:08:46:67 Agora-SDK [DEBUG]: [lock-client-publish-6] is not locked, current queue 0.
AgoraRTC_N-production.js?e671:384 16:08:46:67 Agora-SDK [INFO]: [client-710c3] Publish success, id track-79e1dec3 ,track-ca70b4b3 
AgoraRTC_N-production.js?e671:383 16:08:46:129 Agora-SDK [DEBUG]: [track-track-ca70b4b3] start video playback {"fit":"cover"}
AgoraRTC_N-production.js?e671:383 16:08:46:130 Agora-SDK [DEBUG]: [track-ca70b4b3] video-element-status change none => init
AgoraRTC_N-production.js?e671:383 16:08:46:165 Agora-SDK [DEBUG]: [pc-1] local candidate count 9
AgoraRTC_N-production.js?e671:383 16:08:46:172 Agora-SDK [DEBUG]: [track-ca70b4b3] video-element-status change init => playing
AgoraRTC_N-production.js?e671:383 16:08:46:174 Agora-SDK [DEBUG]: [track-ca70b4b3] video-element-status change playing => waiting
AgoraRTC_N-production.js?e671:384 16:08:46:178 Agora-SDK [INFO]: [client-710c3-pub-1] connection-state: pub p2p connected
AgoraRTC_N-production.js?e671:384 16:08:46:186 Agora-SDK [INFO]: [client-710c3] on publish stream, {"proxy":false,"uid":"59892ee6fedc28db4ebe28fa"}
AgoraRTC_N-production.js?e671:383 16:08:46:274 Agora-SDK [DEBUG]: [client-710c3] user online 5a352cfc107fcba5a265351f
AgoraRTC_N-production.js?e671:383 16:08:46:348 Agora-SDK [DEBUG]: [client-710c3] stream added with uid 5a352cfc107fcba5a265351f, type video
AgoraRTC_N-production.js?e671:384 16:08:46:349 Agora-SDK [INFO]: [client-710c3] remote user 5a352cfc107fcba5a265351f published video
AgoraRTC_N-production.js?e671:383 16:08:46:350 Agora-SDK [DEBUG]: [lock-sub-5a352cfc107fcba5a265351f-7] is created.
AgoraRTC_N-production.js?e671:384 16:08:46:351 Agora-SDK [INFO]: [client-710c3] subscribe user 5a352cfc107fcba5a265351f, mediaType: video
AgoraRTC_N-production.js?e671:383 16:08:46:351 Agora-SDK [DEBUG]: [lock-sub-5a352cfc107fcba5a265351f-7] is locked, current queue 1.
AgoraRTC_N-production.js?e671:383 16:08:46:359 Agora-SDK [DEBUG]: [client-710c3] stream added with uid 5a352cfc107fcba5a265351f, type audio
AgoraRTC_N-production.js?e671:384 16:08:46:360 Agora-SDK [INFO]: [client-710c3] remote user 5a352cfc107fcba5a265351f published audio
AgoraRTC_N-production.js?e671:384 16:08:46:361 Agora-SDK [INFO]: [client-710c3] subscribe user 5a352cfc107fcba5a265351f, mediaType: audio
AgoraRTC_N-production.js?e671:383 16:08:46:361 Agora-SDK [DEBUG]: [lock-sub-5a352cfc107fcba5a265351f-7] is locked, current queue 2.
AgoraRTC_N-production.js?e671:383 16:08:46:370 Agora-SDK [DEBUG]: [client-710c3-sub-2] create and set offer success
AgoraRTC_N-production.js?e671:383 16:08:46:373 Agora-SDK [DEBUG]: [pc-2] ice candidate error stun:118-212-135-224.edge.sd-rtn.com:4735, code: 701, STUN host lookup received error.
AgoraRTC_N-production.js?e671:383 16:08:46:373 Agora-SDK [DEBUG]: [pc-2] ice candidate error stun:webcs.agora.io:3478, code: 701, STUN host lookup received error.
AgoraRTC_N-production.js?e671:383 16:08:46:373 Agora-SDK [DEBUG]: [pc-2] ice candidate error stun:118-212-135-224.edge.sd-rtn.com:4735, code: 701, STUN host lookup received error.
AgoraRTC_N-production.js?e671:383 16:08:46:373 Agora-SDK [DEBUG]: [pc-2] ice candidate error stun:webcs.agora.io:3478, code: 701, STUN host lookup received error.
AgoraRTC_N-production.js?e671:383 16:08:46:423 Agora-SDK [DEBUG]: [pc-2] ice candidate error turn:118-212-135-224.edge.sd-rtn.com:4735?transport=udp, code: 701, TURN host lookup received error.
AgoraRTC_N-production.js?e671:383 16:08:46:424 Agora-SDK [DEBUG]: [pc-2] ice candidate error turn:118-212-135-224.edge.sd-rtn.com:4735?transport=udp, code: 701, TURN host lookup received error.
AgoraRTC_N-production.js?e671:384 16:08:46:441 Agora-SDK [INFO]: [client-710c3-sub-2] ice-state: sub p2p checking
AgoraRTC_N-production.js?e671:383 16:08:46:443 Agora-SDK [DEBUG]: [client-710c3-sub-2] unused ontrack event audio
AgoraRTC_N-production.js?e671:383 16:08:46:444 Agora-SDK [DEBUG]: [client-710c3-sub-2] subscribe ontrack: video MediaStream {id: "PJUzvbdDVP", active: true, onaddtrack: null, onremovetrack: null, onactive: null, …} MediaStreamTrack {kind: "video", id: "31d69dd8-afff-402a-a9c0-b7a9aead4924", label: "31d69dd8-afff-402a-a9c0-b7a9aead4924", enabled: true, muted: true, …}
AgoraRTC_N-production.js?e671:383 16:08:46:444 Agora-SDK [DEBUG]: [client-710c3-sub-2] get all subscribed tracks
AgoraRTC_N-production.js?e671:383 16:08:46:444 Agora-SDK [DEBUG]: [client-710c3-sub-2] set answer success
AgoraRTC_N-production.js?e671:384 16:08:46:448 Agora-SDK [INFO]: [client-710c3-sub-2] connection-state: sub p2p connecting
AgoraRTC_N-production.js?e671:383 16:08:46:485 Agora-SDK [DEBUG]: [pc-2] ice candidate error turn:118-212-135-224.edge.sd-rtn.com:4735?transport=tcp, code: 701, TURN host lookup received error.
AgoraRTC_N-production.js?e671:384 16:08:46:485 Agora-SDK [INFO]: [client-710c3-sub-2] ice-state: sub p2p connected
AgoraRTC_N-production.js?e671:384 16:08:46:487 Agora-SDK [INFO]: [client-710c3-sub-2] create remote video track: track-7fe4ae9f
AgoraRTC_N-production.js?e671:383 16:08:46:489 Agora-SDK [DEBUG]: [lock-sub-5a352cfc107fcba5a265351f-7] is not locked, current queue 1.
AgoraRTC_N-production.js?e671:384 16:08:46:490 Agora-SDK [INFO]: [client-710c3] subscribe success user 5a352cfc107fcba5a265351f, mediaType: video
AgoraRTC_N-production.js?e671:383 16:08:46:522 Agora-SDK [DEBUG]: [client-710c3-sub-2] update subscribe options [a: false, v: true] -> [a: true, v: true]
AgoraRTC_N-production.js?e671:383 16:08:46:522 Agora-SDK [DEBUG]: [client-710c3-sub-2] emit pc ontrack after subscribe audio MediaStreamTrack {kind: "audio", id: "a3d8610c-8fc8-484d-accf-1a263b48d1fd", label: "a3d8610c-8fc8-484d-accf-1a263b48d1fd", enabled: true, muted: false, …}
AgoraRTC_N-production.js?e671:384 16:08:46:524 Agora-SDK [INFO]: [client-710c3-sub-2] create remote audio track: track-7ab4e337
AgoraRTC_N-production.js?e671:383 16:08:46:525 Agora-SDK [DEBUG]: [client-710c3] send subscribe change, audio: true, video: true
AgoraRTC_N-production.js?e671:383 16:08:46:531 Agora-SDK [DEBUG]: [pc-2] local candidate count 10
AgoraRTC_N-production.js?e671:383 16:08:46:535 Agora-SDK [DEBUG]: [track-track-7fe4ae9f] start video playback {"fit":"cover"}
AgoraRTC_N-production.js?e671:383 16:08:46:536 Agora-SDK [DEBUG]: [track-7fe4ae9f] video-element-status change none => init
AgoraRTC_N-production.js?e671:383 16:08:46:554 Agora-SDK [DEBUG]: [track-7fe4ae9f] video-element-status change init => playing
AgoraRTC_N-production.js?e671:383 16:08:46:556 Agora-SDK [DEBUG]: [track-7fe4ae9f] video-element-status change playing => waiting
AgoraRTC_N-production.js?e671:384 16:08:46:563 Agora-SDK [INFO]: [client-710c3-sub-2] connection-state: sub p2p connected
AgoraRTC_N-production.js?e671:383 16:08:46:588 Agora-SDK [DEBUG]: [lock-sub-5a352cfc107fcba5a265351f-7] is not locked, current queue 0.
AgoraRTC_N-production.js?e671:384 16:08:46:588 Agora-SDK [INFO]: [client-710c3] subscribe success user 5a352cfc107fcba5a265351f, mediaType: audio
AgoraRTC_N-production.js?e671:383 16:08:46:612 Agora-SDK [DEBUG]: [track-7ab4e337] start audio playback
AgoraRTC_N-production.js?e671:383 16:08:46:612 Agora-SDK [DEBUG]: [track-track-7ab4e337] use audio element to play
AgoraRTC_N-production.js?e671:384 16:08:46:843 Agora-SDK [INFO]: [track-track-79e1dec3] check audio track active completed. {"duration":200,"deviceLabel":"Default - MacBook Pro Microphone (Built-in)","maxVolumeLevel":0.03177126869559288,"result":true}
AgoraRTC_N-production.js?e671:383 16:08:46:988 Agora-SDK [DEBUG]: [track-ca70b4b3] video-element-status change waiting => canplay
AgoraRTC_N-production.js?e671:383 16:08:46:990 Agora-SDK [DEBUG]: [track-ca70b4b3] video-element-status change canplay => playing
AgoraRTC_N-production.js?e671:383 16:08:47:34 Agora-SDK [DEBUG]: [track-7fe4ae9f] video-element-status change waiting => canplay
AgoraRTC_N-production.js?e671:383 16:08:47:35 Agora-SDK [DEBUG]: [track-7fe4ae9f] video-element-status change canplay => playing
AgoraRTC_N-production.js?e671:384 16:08:47:45 Agora-SDK [INFO]: [track-track-7ab4e337] check audio track active completed. {"duration":203,"deviceLabel":"remote_track","maxVolumeLevel":0.01812799461185932,"result":true}
AgoraRTC_N-production.js?e671:383 16:08:47:53 Agora-SDK [DEBUG]: [track-7fe4ae9f] current video dimensions: 1280 720
AgoraRTC_N-production.js?e671:383 16:08:47:172 Agora-SDK [DEBUG]: [track-ca70b4b3] current video dimensions: 1280 720

Channel: 5f995107accf20001a27ccc5

UID: 5f8e5206c9f1ff001a39e329

Platform and Browser: MacOS chrome & firefox

SDK Version: agora-rtc-sdk-ng-4.4.0

To Reproduce

there is a 3 people room. user 59892ee6fedc28db4ebe28fa entered this room at last.
but can not get user 5f8e5206c9f1ff001a39e329 video and audio track information.
could reproduce this issue when user 59892ee6fedc28db4ebe28fa refresh browser multiple times

Additional context

log for this user

16:08:46:45 Agora-SDK [DEBUG]: [client-710c3] user online 5f8e5206c9f1ff001a39e329
AgoraRTC_N-production.js?e671:383 16:08:46:46 Agora-SDK [DEBUG]: [client-710c3] stream added with uid 5f8e5206c9f1ff001a39e329, type audio
AgoraRTC_N-production.js?e671:384 16:08:46:46 Agora-SDK [INFO]: [client-710c3] remote user 5f8e5206c9f1ff001a39e329 published audio
AgoraRTC_N-production.js?e671:383 16:08:46:48 Agora-SDK [DEBUG]: [client-710c3] stream added with uid 5f8e5206c9f1ff001a39e329, type video
AgoraRTC_N-production.js?e671:384 16:08:46:49 Agora-SDK [INFO]: [client-710c3] remote user 5f8e5206c9f1ff001a39e329 published video
Participant.tsx?104b:66 Participant 5f8e5206c9f1ff001a39e329 videoTrack: undefined audioTrack: undefined

looks like the 3rd people didn't subscribe 5f8e5206c9f1ff001a39e329's stream?

@plutoless using the same logic to join room and event subscription.
not sure why it happened.

here is the rooom connect & event subscription logic

const connect = async (token: string, roomId: string, userId: string) => {
    let localTracks: {localAudioTrack?: ILocalAudioTrack; localVideoTrack?: ILocalVideoTrack } = {}      
    localTracks = await acquireLocalTracks()
    try {
      const newRoom = await AgoraRTC.createClient({
        mode: 'rtc', codec: 'vp8',
      })
      if (newRoom) {
        setRoom(newRoom)

        // Join a room
        await newRoom.join(getConfig().agoraAppId, roomId, token, userId)

        const participantJoined = async (participant: RemoteParticipant) => {
          if (!R.isEmpty(newRoom.remoteUsers)) {
            setParticipants(newRoom.remoteUsers)
          }
        }

        const participantLeft = (participant: RemoteParticipant) => {
          setParticipants(newRoom.remoteUsers)
        }

        const participantPublished = async (participant: RemoteParticipant, mediaType: 'audio' | 'video') => {
          // Subscribe to a remote user
          try {
            await newRoom.subscribe(participant, mediaType)
          } catch (error) {
          }
          if (!R.isEmpty(newRoom.remoteUsers)) {
            setParticipants(newRoom.remoteUsers)
          }
        }

        const participantUnpublished = (participant: RemoteParticipant, mediaType: string) => {
          setParticipants(newRoom.remoteUsers)
        }

        newRoom.on('user-joined', participantJoined)
        newRoom.on('user-left', participantLeft)

        // subscribe a remote user
        newRoom.on('user-published', participantPublished)
        newRoom.on('user-unpublished', participantUnpublished)
     }
}

is there anyone help me check the log uploaded? @plutoless

could you pls add some more logs before you call subscribe and after you call subscribe, + where you caught the error?

@plutoless I did not occurred any errors.
I just did not receive user-published event sometimes.

enabled log upload. you can check the log in your server I think.
or any other way I can check it myself?

if you can put console log in a txt file and upload here i can directly take a look

@plutoless I have pasted my console log in this issue.

@auguszou i mean the new logs after you add log print before/after subscribe call

I could not reproduce it any more after changed the logic.

old logic

1. create client
2. join room
3. create local tracks and publish them
4. subscribe event

new logic

1. create client
2. subscribe event
3. join room
4. create local tracks and publish them

is it related to this?

or please update this doc

image