# I can't create more than one subsession

**URL:** <https://devforum.zoom.us/t/i-cant-create-more-than-one-subsession/119831>\
**Category:** Video SDK\
**Tags:** video-sdk\
**Created:** [October 25, 2024, 12:27pm UTC](https://devforum.zoom.us/t/i-cant-create-more-than-one-subsession/119831 "2024-10-25T12:27:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev\_lxpead](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev_lxpead/32/63797_2.png) [@dev\_lxpead](https://devforum.zoom.us/u/dev_lxpead)\
**Post date:** [October 25, 2024, 12:27pm UTC](https://devforum.zoom.us/t/i-cant-create-more-than-one-subsession/119831/1 "2024-10-25T12:27:10Z")

</div>

All integrations were made following the Zoom Video SDK documentation.  
I’m having some unsolved issues in the documentation.

When I have a subsession created and I try to create another, the second one is not created because the following error is returned:  
Uncaught (in promise) TypeError: e.map is not a function

The function I use to create the subsessions is this:

```auto
export const createSubsessions = async (subsessionClient, subsessionNames = [], autoAssignType = 1) => {
    if (!subsessionClient) return
    await subsessionClient.createSubsessions(subsessionNames, autoAssignType)
}

```

In the subsessionClient parameter I pass the subsession client, in the subsessionNames parameter I pass an array containing strings with the room names.  
Ex:  
`createSubsessions(client.getSubsessionClient(), ['Room 2'], 2)`

Below is more information about the versions and system I am using:  
Video SDK version: 1.12.5  
React version: 18  
Next JS version: 14.2.2  
OS: Windows 11  
Browser: Google Chrome  
Browser Version 129.0.6668.70 (Official Build) (64 bits)

---

<div class="post-metadata">

**Author:** ![dev\_lxpead](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev_lxpead/32/63797_2.png) [@dev\_lxpead](https://devforum.zoom.us/u/dev_lxpead)\
**Post date:** [October 29, 2024, 8:57pm UTC](https://devforum.zoom.us/t/i-cant-create-more-than-one-subsession/119831/2 "2024-10-29T20:57:04Z")

</div>

I discovered what was causing the error.  
When subsessions are open in the session, no other can be created, so whenever I open a subsession to include a participant in it, I must close it immediately afterwards if I want to create a new subsession.  
I did not find an explicit explanation for this rule in the documentation.

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [October 30, 2024, 7:15am UTC](https://devforum.zoom.us/t/i-cant-create-more-than-one-subsession/119831/3 "2024-10-30T07:15:41Z")

</div>

Closed on October 30, 2024, 7:15am UTC


