Could not join or start meeting with MobileRTCMeetError: MobileRTCMeetError the meeting does not

Hi everyone,

I have zoom integration in my iOS app.

I am using SwiftUI.

App user receives meeting number and password from API and initiate zoom call by button click.

Here is the code I have

struct StartZoomVC: UIViewControllerRepresentable {
    
    @Binding var meetingNumber: String
    @Binding var passCode: String
    let newVC = UIViewController()
    
    private let delegate: MobileRTCMeetingServiceDelegate
    //private let authDelegate: MobileRTCAuthDelegate
    
    init(delegate: MobileRTCMeetingServiceDelegate, zoomMeetingNumber: Binding<String>, zoomPasscode: Binding<String>) {
        self._meetingNumber = zoomMeetingNumber
        self._passCode = zoomPasscode
        self.delegate = delegate
    }
    
    func makeUIViewController(context: Context) -> UIViewController {
        newVC.view.tag = 83838383
        newVC.view.backgroundColor = .white
        return newVC
    }
    
    func updateUIViewController(_ taskViewController: UIViewController, context: Context) {
        askPermissionsForCameraFeed()
        print("check video permissions")
      
    }
    
    func askPermissionsForCameraFeed() {
        AVCaptureDevice.requestAccess(for: AVMediaType.video) { response in
            if response {
                //access granted
                getMainWindowToShareWithAppDelegate()
            } else {
                print("wtf")
            }
        }
    }
    
    func getMainWindowToShareWithAppDelegate(){
        
 
        DispatchQueue.main.async {
            let scene = UIApplication.shared.connectedScenes.first
            let windowSceneDelegate = scene?.delegate as? UIWindowSceneDelegate
            let window = (windowSceneDelegate?.window)!
            UIApplication.shared.delegate = AppDelegate.Shared
            let delegate = UIApplication.shared.delegate as! AppDelegate
            delegate.window = window
            print("finding window to provide to zoom sdk")
            print(meetingNumber)
            print(passCode)
            joinMeeting(meetingNumber: meetingNumber, meetingPassword: passCode)
        }
        
        
    }
    func startMeeting() {
        // 5. Obtain the MobileRTCMeetingService from the Zoom SDK, this service can start meetings, join meetings, leave meetings, etc.
        if let meetingService = MobileRTC.shared().getMeetingService() {
            
            
            //6. Set the ViewContoller to be the MobileRTCMeetingServiceDelegate
            meetingService.delegate = delegate

            /*** 5. Create a MobileRTCMeetingStartParam to provide the MobileRTCMeetingService with the necessary info to start an instant meeting. In this case we will use MobileRTCMeetingStartParam4LoginlUser(), since the user has logged into Zoom. ***/
            let startMeetingParameters = MobileRTCMeetingStartParam4LoginlUser()

            // 6. Call the startMeeting function in MobileRTCMeetingService. The Zoom SDK will handle the UI for you, unless told otherwise.
            meetingService.startMeeting(with: startMeetingParameters)
        }
    }
    
    /*func logIn(email: String, password: String) {
        // 2. Obtain the MobileRTCAuthService from the Zoom SDK, this service can log in a Zoom user, log out a Zoom user, authorize the Zoom SDK etc.
        if let authorizationService = MobileRTC.shared().getAuthService() {
             // 3. Call the login function in MobileRTCAuthService. This will attempt to log in the user.
            //authorizationService.login(withEmail: email, password: password, rememberMe: false)
            
        }else {
            print("authorization service failed")
        }
    }*/
    
    func joinMeeting(meetingNumber: String, meetingPassword: String) {
            // Obtain the MobileRTCMeetingService from the Zoom SDK, this service can start meetings, join meetings, leave meetings, etc.
            if let meetingService = MobileRTC.shared().getMeetingService() {


                // Create a MobileRTCMeetingJoinParam to provide the MobileRTCMeetingService with the necessary info to join a meeting.
                // In this case, we will only need to provide a meeting number and password.
                // 2. Set the ViewContoller to be the MobileRTCMeetingServiceDelegate
                meetingService.delegate = delegate
                
                let joinMeetingParameters = MobileRTCMeetingJoinParam()

                joinMeetingParameters.meetingNumber = meetingNumber
                joinMeetingParameters.password = meetingPassword

                MobileRTC.shared().getMeetingSettings()?.disableShowVideoPreview(whenJoinMeeting: true)
                MobileRTC.shared().getMeetingSettings()?.enableCustomMeeting = false
             
                if #available(iOS 13.0, *) {
                    // 13.0 and above
                    //MobileRTC.shared().setMobileRTCRootController(self.newVC as? UINavigationController)
                }

                // Call the joinMeeting function in MobileRTCMeetingService. The Zoom SDK will handle the UI for you, unless told otherwise.
                // If the meeting number and meeting password are valid, the user will be put into the meeting. A waiting room UI will be presented or the meeting UI will be presented.
                DispatchQueue.main.async {
                    meetingService.joinMeeting(with: joinMeetingParameters)
                }
               
            }
        }

}

extension StartZoomVC {
    class Delegate: NSObject, MobileRTCMeetingServiceDelegate {

        func onMeetingError(_ error: MobileRTCMeetError, message: String?) {
           
            switch error {
            case .passwordError:
                print("Could not join or start meeting because the meeting password was incorrect.")
            case .success:
                print("onMeetingError : MobileRTCMeetError_Success")
            default:
                print("Could not join or start meeting with MobileRTCMeetError: \(error) \(message ?? "")")
            }
        }
        func onMeetingEndedReason(_ reason: MobileRTCMeetingEndReason) {
            print("Join meeting end reason.")
        }
        // Is called when the user joins a meeting.
        func onJoinMeetingConfirmed() {
            print("Join meeting confirmed.")
            if let meetingService = MobileRTC.shared().getMeetingService() {
                let newView = meetingService.meetingView()
                print("what am I seeing !")
            }

        }
        // Is called upon meeting state changes.
        func onMeetingStateChange(_ state: MobileRTCMeetingState) {
           print("onMeetingStateChange")
            print(state)
            switch state {
            case .connecting:
                print("Connecting")
            case .disconnecting:
                print("disconnecting")
            case .ended:
                print("ended")
            case .failed:
                print("failed")
            case .idle:
                print("idle")
            case .inMeeting:
                print("in meeting")
            case .inWaitingRoom:
                print("in waiting room")
            case .joinBO:
                print("join bo")
            case .leaveBO:
                print("leave bo")
            case .locked:
                print("locked")
            case .reconnecting:
                print("reconnecting")
            case .unknow:
                print("unknown")
            case .unlocked:
                print("unlocked")
            case .waitingExternalSessionKey:
                print("waiting external session key")
            case .waitingForHost:
                print("waiting for host")
            case .webinarDePromote:
                print("de promote")
            case .webinarPromote:
                print("promote")
            default:
                print("bad things happened")
            }
        }
     }
 }

Here is how I call zoom method from swiftui on button click

StartZoomVC(delegate: StartZoomVC.Delegate(), zoomMeetingNumber: $meetingNumber, zoomPasscode: $meetingPassword)

The error I am getting is this

Could not join or start meeting with MobileRTCMeetError: MobileRTCMeetError the meeting does not exist

Here is full state log trace

onMeetingStateChange

MobileRTCMeetingState

Connecting

onMeetingStateChange

MobileRTCMeetingState

disconnecting

onMeetingStateChange

MobileRTCMeetingState

failed

Could not join or start meeting with MobileRTCMeetError: MobileRTCMeetError the meeting does not exist

onMeetingStateChange

MobileRTCMeetingState

Connecting

Join meeting end reason.

onMeetingStateChange

MobileRTCMeetingState

ended

The main problem is that the user (iPhone) cannot join to the call

Please note meeting ID and pass is correct.

Which iOS Meeting SDK version?
It must be the latest

Hi @ggarnik, thanks for using our SDK.

Can you please provide the exact version you’re using and the SDK logs? You can check the version by calling mobileRTCVersion, and information on how to obtain the SDK logs can be found here.

Thanks!

Hi @jon.lieblich

I use version 5.9.3 (2512)

Thanks,
Garnik

Hi @ggarnik,

Are you able to provide the logs as well as previously requested?

Thanks!

(post deleted by author)

Hi @jon.zoom

I accidently deleted my preivous post.

In some reason I cannot get logs because when I goto Devices & Simulators I do not see Download Container.

I tried to get logs from crash reports but I could not because the app is not crashing it simply does not connect to zoom call.

Please note this we suppose to go live but we are delaying because of this bug.

Any help appreciated.

@jon.zoom do you want me to make a seperate sample and send the source code?

Hi @ggarnik,

Are you sure that you are enabling SDK logs when the SDK is initialized via enableLog?

do you want me to make a seperate sample and send the source code?

If you are able to create a simple demo application in which this is reproducible, that would suffice as well.

Thanks!

Hi @jon.zoom

I created a demo application. Please check the link below

Demo Sample

Please note you should set sdkKey and sdkSecret in AppDelegate.swift file.

Thanks,
Garnik

Hi @ggarnik,

Thanks for providing that. In the demo project, I was able to successfully join a meeting. Since the meeting number and passcode in that project are provided directly from user input, it seems that the meeting number you are using is likely not valid as the error indicates. If you believe this is not the case, we will need the SDK logs to investigate further.

Thanks!

Hi @jon.zoom

So should I get sdkKey and sdkSecret from the same account that I am using as meeting id and pass?

Hi @ggarnik,

No, there is no need to use the same account as your developer credentials for your meeting ownership.

Thanks!

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