Not able to join meeting in recent days

Facing issues when joining meeting in recent days. Getting this error “Zoom: Join meeting task failed, error code: 152” means the user is in another meeting.

func joinMeeting(name: String = "Online Class", number: Int, password: String = "", has_started:Bool) {
    
    guard isAPIAuthenticated, let meetingService = MobileRTC.shared().getMeetingService() else { return }
    // remove existing meeting
    meetingService.leaveMeeting(with: .leave)
    meetingService.delegate = self
    let param = MobileRTCMeetingJoinParam()
    param.userName = name
    param.meetingNumber = "\(number)"
    param.password = password
    if  has_started {
        let returnValue = meetingService.joinMeeting(with: param)
        guard returnValue == .success else {
            print("Zoom: Join meeting task failed, error code: \(returnValue.rawValue)")
            self.makeToastWithMessage(with: "Class is not yet started")
            return
        }
        print("Zoom: Join meeting task completed.")
    }else{
        self.makeToastWithMessage(with: "Class is not yet started")
    }
}

Hey @helloparent,

Thanks for using the dev forum! It is nice to see you again :slight_smile:

It is possible that a race condition exists here. Can you wait to call join meeting until it is confirmed the previous meeting has completed the leave action?

Thanks!
Michael

Could you suggest that how we can access callback function of leave meeting

Hey @helloparent,

I would set a breakpoint in the onMeetingStateChange callback, leave the meeting, observe the callback triggers for that user, then attempt to move the joinMeeting call to there to test if the issue is indeed a race condition.

Thanks!
Michael

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.