# Type: 'INVALID\_PARAMETERS', error: "userId is not correct"; What does this error mean?

**URL:** <https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152>\
**Category:** Video SDK\
**Created:** [August 9, 2023, 9:06am UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152 "2023-08-09T09:06:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaleAtMarvin](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/daleatmarvin/32/50392_2.png) [@DaleAtMarvin](https://devforum.zoom.us/u/DaleAtMarvin)\
**Post date:** [August 9, 2023, 9:06am UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152/1 "2023-08-09T09:06:08Z")

</div>

I’ve been getting this error sometimes trying to build off the default Video SDK sample project you guys provide. It’s happening during code that looks similar to this:

```auto
subscribedVideos.forEach(async (userId) => {
          await mediaStream?.renderVideo(
            videoRef.current as HTMLCanvasElement,
            userId,
            width,
            height,
            x,
            y,
            quality,
          );
        }
      });

```

But all the userId’s are valid and show up if i do a:

```auto
zmClient.getAllUser()

```

It would be great if the error explained a bit more or if I can figure out why this is happening.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/7/67c0ebe0958ad0a2dae64a5bf53e86ce086dd952.png)

EDIT:

specifically it’s coming from here in the useRenderVideo file:

```auto
subscribedVideos.forEach(async (userId) => {
        const index = participants.findIndex((user) => user.userId === userId);
        const cellDimension = layout[index];
        if (cellDimension &&(!isSkipSelfVideo ||(isSkipSelfVideo&&userId!==currentUserId))) {
          const { width, height, x, y, quality } = cellDimension;
          await mediaStream?.renderVideo(
            videoRef.current as HTMLCanvasElement,
            userId,
            width,
            height,
            x,
            y,
            quality,
          );
        }
      });

```

**some background:** i’ve been working for days now trying to get video and video-single to switch together in a button toggle… it’s a requirement for my client and i’m struggling.

i pretty much have mixed both file codes together into one file pretty successfully but it runs into this error that isn’t making any sense to me. i feel like if the error gave more detail on why that’s happening when it’s trying to render valid userIds… i can maybe solve it. i can’t even click the line of code because the code is minified.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [August 9, 2023, 9:23am UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152/2 "2023-08-09T09:23:35Z")

</div>

Hey @DaleAtMarvin

Thanks for your feedback.

It’s a known issue in the sample app, we will fix it later.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![DaleAtMarvin](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/daleatmarvin/32/50392_2.png) [@DaleAtMarvin](https://devforum.zoom.us/u/DaleAtMarvin)\
**Post date:** [August 9, 2023, 9:29am UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152/3 "2023-08-09T09:29:45Z")

</div>

appreciate the reply @vic.yang

how can i get an update when this is fixed?

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [August 9, 2023, 9:32am UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152/4 "2023-08-09T09:32:31Z")

</div>

Hey @DaleAtMarvin

We will inform you on this thread once it is updated.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![DaleAtMarvin](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/daleatmarvin/32/50392_2.png) [@DaleAtMarvin](https://devforum.zoom.us/u/DaleAtMarvin)\
**Post date:** [August 9, 2023, 6:38pm UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152/5 "2023-08-09T18:38:53Z")

</div>

@vic.yang

didn’t want to start a new thread but can you elaborate what this bug is about? it’s happening again in very similar line of code as above. thank you

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/e/be3e6346516759651ba1b286d9da2e77ede3a930.png)

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [August 10, 2023, 1:44am UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152/6 "2023-08-10T01:44:41Z")

</div>

Hey @DaleAtMarvin

The error occurs when trying to render a user’s video who is not sending video. (Can identify by the bVideoOn property in the user data).

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![DaleAtMarvin](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/daleatmarvin/32/50392_2.png) [@DaleAtMarvin](https://devforum.zoom.us/u/DaleAtMarvin)\
**Post date:** [August 11, 2023, 6:37pm UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152/7 "2023-08-11T18:37:47Z")

</div>

@vic.yang

just wanted to show you what’s happening in correlation of the bug. hope you guys get it fixed soon

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/d/1d23c27d0d2759340080a055e84089e250f8a7bd.jpeg)

---

<div class="post-metadata">

**Author:** ![JackYang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jackyang/32/1135_2.png) [@JackYang](https://devforum.zoom.us/u/JackYang)\
**Post date:** [August 14, 2023, 6:26pm UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152/8 "2023-08-14T18:26:42Z")

</div>

we update demo, can you try to this and verify it. [1.8.5 demo by honeybeejack · Pull Request #38 · zoom/videosdk-web-sample · GitHub](https://github.com/zoom/videosdk-web-sample/pull/38)

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [August 16, 2023, 3:28am UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152/9 "2023-08-16T03:28:44Z")

</div>

Hey @DaleAtMarvin

We have updated the sample app, could you pull the latest code and try it again?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![DaleAtMarvin](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/daleatmarvin/32/50392_2.png) [@DaleAtMarvin](https://devforum.zoom.us/u/DaleAtMarvin)\
**Post date:** [August 16, 2023, 3:30am UTC](https://devforum.zoom.us/t/type-invalid-parameters-error-userid-is-not-correct-what-does-this-error-mean/93152/10 "2023-08-16T03:30:07Z")

</div>

@vic.yang hey guys thank you will do that tomorrow and will let you guys know if we still run into that error. thank you for the hard work
