Sharing the screen is unstable, sometimes it displays the screen, sometimes it returns an error in the console and does not display

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

When the function to display screen sharing is called, an error sometimes appears in the console for no defined reason:

{
    “type”: “INVALID_OPERATION”,
    “reason”: “”
}

When this happens, screen sharing is not displayed on the page, despite starting and displaying the popup to stop screen sharing.

NOTE: Sometimes the error is not returned and the screen is displayed on the page, but this only happens in 10% of attempts within the same environment.

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)

Hey @dev_lxpead

Thanks for your feedback.

Could you share some problematic session IDs with us for troubleshooting purposes?

Thanks
Vic

Hello @vic.yang !
Thank you very much for your feedback. I ended up redoing all the screen sharing logic and it started working. The problem was in the way I was implementing it.

Instead of using the same element that rendered the user’s camera, I started using another container and I had no more problems.