Type: 'INVALID_PARAMETERS', error: "userId is not correct"; What does this error mean?

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:

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:

zmClient.getAllUser()

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

EDIT:

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

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.

Hey @DaleAtMarvin

Thanks for your feedback.

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

Thanks
Vic

appreciate the reply @vic.yang

how can i get an update when this is fixed?

Hey @DaleAtMarvin

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

Thanks
Vic

1 Like

@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

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

@vic.yang

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

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

Hey @DaleAtMarvin

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

Thanks
Vic

@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