Cannot join session using a physical ios device


Description
the video SDK is working good on android[Emulator / physical device]
it’s also working perfect on ios simulator , the problem is with ios physical device while joining session as host or attendee

Errors

Error: Join Session failed
    at Object.promiseMethodWrapper [as joinSession] (NativeModules.js:105:51)
    at ZoomVideoSdk.joinSession (ZoomVideoSdk.ts:263:27)
    at Object.joinSession (useSdkHandler.ts:64:31)
    at call-screen.tsx:84:20
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (asyncToGenerator.js:3:24)
    at _next (asyncToGenerator.js:22:9)
    at tryCallOne (core.js:37:12)
    at core.js:123:15
    at JSTimers.js:247:18

Which React Native Video SDK version?
[0.71.0] : it’s the react native simple app source code

Video SDK Code Snippets

await zoom.joinSession({
          sessionName: params.sessionName,
          sessionPassword: params.sessionPassword,
          token: token,
          userName: params.displayName,
          audioOptions: {
            connect: true,
            mute: true,
          },
          videoOptions: {
            localVideoOn: true,
          },
          sessionIdleTimeoutMins: parseInt(params.sessionIdleTimeoutMins, 10),
        });
      } catch (e) {
        console.log(e);
        Alert.alert('Failed to join the session');
        setTimeout(() => navigation.goBack(), 1000);
      }

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Launch the app
  2. Click on Join/Create
  3. create session as host / join as attendee
  4. Error: Join Session failed

Screenshots

Troubleshooting Routes

  • checking the internet connect on the ios physical device => pass
  • run the same app on ios simulator => working perfect .

Smartphone (please complete the following information):

  • Device: [iPhone Xr]
  • OS: [iOS 16.3]

Hi @y.makhfi ,

Thank you for posting on the developer’s forum. Would you please check whether you’ve filled in the required JoinSessionConfig to join the session?
Based on the errors you provided, it’s possible that you missed the JWT token.
image

Best,
Elaine

sorry i didn’t mentioned the whole code , this is all the required parameters :

async () => {
      const {params} = route;
      const token = await generateJwt(params.sessionName, params.roleType);
      try {
        await zoom.joinSession({
          sessionName: params.sessionName,
          sessionPassword: params.sessionPassword,
          token: token,
          userName: params.displayName,
          audioOptions: {
            connect: true,
            mute: true,
          },
          videoOptions: {
            localVideoOn: false,
          },
          sessionIdleTimeoutMins: parseInt(params.sessionIdleTimeoutMins, 10),
        });
      } catch (e) {
        console.log(e);
        Alert.alert('Failed to join the session');
        setTimeout(() => navigation.goBack(), 1000);
      }
    }

JWT token is generated using ‘react-native-pure-jwt’, and this is an example of it :

eyJhbGciOiJIUzI1N.................................................mTyWbLdak9BPVZbMzq6-MrsiOU 

after using https://jwt.io/ this is the header :

{
  "alg": "HS256",
  "typ": "JWT"
}

and this is PAYLOAD:DATA :

{
  "iat": 1675241035,
  "app_key": "[i hided api key]",
  "role_type": 1,
  "exp": 1675323835,
  "tpc": "grand-canyon-261",
  "version": 1,
  "user_identity": "[i hided user_identity]"
}

Hi @y.makhfi ,

Thanks for your response. The reason that you’re receiving this error is that you haven’t created a session successfully. There isn’t any session that exists.
Would you please try to console.log the JoinSessionConfig that you try to pass the joinSession function? There might be missing parameters or parameters with incorrect values.
If there’s any error message that has been printed on Xcode console or Metro server, please also let me know.
Thank you
image

Elaine

Hi @elaine.ku as i said already , the app working fine on android and ios simulator, so the problem is not related to creating session or session config, after i delete the zoom sdk framwork and add it again everything works fine and i don’t know why , so the problem is solved and thank you for your effort .

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