# Cannot join session using a physical ios device

**URL:** <https://devforum.zoom.us/t/cannot-join-session-using-a-physical-ios-device/82393>\
**Category:** React Native\
**Tags:** video-sdk, ios\
**Created:** [January 31, 2023, 11:54am UTC](https://devforum.zoom.us/t/cannot-join-session-using-a-physical-ios-device/82393 "2023-01-31T11:54:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![y.makhfi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/y.makhfi/32/39522_2.png) [@y.makhfi](https://devforum.zoom.us/u/y.makhfi)\
**Post date:** [January 31, 2023, 11:54am UTC](https://devforum.zoom.us/t/cannot-join-session-using-a-physical-ios-device/82393/1 "2023-01-31T11:54:23Z")

</div>

* * *

**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**

```auto
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**

```auto
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]

---

<div class="post-metadata">

**Author:** ![elaine.ku](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elaine.ku/32/40026_2.png) [@elaine.ku](https://devforum.zoom.us/u/elaine.ku)\
**Post date:** [February 1, 2023, 12:28am UTC](https://devforum.zoom.us/t/cannot-join-session-using-a-physical-ios-device/82393/3 "2023-02-01T00:28:44Z")

</div>

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](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/c/fcd61aa1cc3baee3c979c7a8152b09c7a0bb8d14.png)

Best,  
Elaine

---

<div class="post-metadata">

**Author:** ![y.makhfi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/y.makhfi/32/39522_2.png) [@y.makhfi](https://devforum.zoom.us/u/y.makhfi)\
**Post date:** [February 1, 2023, 9:08am UTC](https://devforum.zoom.us/t/cannot-join-session-using-a-physical-ios-device/82393/4 "2023-02-01T09:08:15Z")

</div>

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

```auto
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 :

```auto
eyJhbGciOiJIUzI1N.................................................mTyWbLdak9BPVZbMzq6-MrsiOU 

```

after using [https://jwt.io/](https://jwt.io/) this is the header :

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

```

and this is PAYLOAD:DATA :

```auto
{
  "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]"
}

```

---

<div class="post-metadata">

**Author:** ![elaine.ku](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elaine.ku/32/40026_2.png) [@elaine.ku](https://devforum.zoom.us/u/elaine.ku)\
**Post date:** [February 6, 2023, 7:17pm UTC](https://devforum.zoom.us/t/cannot-join-session-using-a-physical-ios-device/82393/5 "2023-02-06T19:17:56Z")

</div>

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](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/b/bb1723951b3db6d24e64132ad10d1aabda14431a.png)

Elaine

---

<div class="post-metadata">

**Author:** ![y.makhfi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/y.makhfi/32/39522_2.png) [@y.makhfi](https://devforum.zoom.us/u/y.makhfi)\
**Post date:** [February 28, 2023, 11:26am UTC](https://devforum.zoom.us/t/cannot-join-session-using-a-physical-ios-device/82393/6 "2023-02-28T11:26:50Z")

</div>

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 .

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 2, 2023, 11:54am UTC](https://devforum.zoom.us/t/cannot-join-session-using-a-physical-ios-device/82393/7 "2023-03-02T11:54:51Z")

</div>

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