Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning message when joining call using CallWithChatComposite #5688

Open
adrian-crisan625 opened this issue Mar 7, 2025 · 1 comment
Open
Assignees

Comments

@adrian-crisan625
Copy link

Describe the bug; what happened?
Access the storybook for CallWithChatComposite https://azure.github.io/communication-ui-library/?path=/story/composites-call-with-chat-basicexample-basic-example--basic-example. After joining the call you see in console a warning "MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 51 stateChanged listeners added. Use emitter.setMaxListeners() to increase limit"

What are the steps to reproduce the issue?
Go to the communication-ui storybook for CallWithChatComposite https://azure.github.io/communication-ui-library/?path=/story/composites-call-with-chat-basicexample-basic-example--basic-example

What behavior did you expect?
No warning is shown in console related to MaxListenersExceededWarning. This issue was fixed in the past for the CallComposite in issue #2468

If applicable, provide screenshots:

Image

In what environment did you see the issue?

  • @azure/communication-react npm package version

  • OS: Win 11

  • Browser: Any

Is there any additional information?

@dmceachernmsft
Copy link
Member

Thanks for bringing this up @adrian-crisan625! This warning is caused by something internally on our side and the fix here was missed when we did it for the CallComposite. We have the fix up for this right now and will be in the next release.

A small explanation as to what is causing the issue:

We are using the useSelector hook that we export from the UI library internally inside the composite and when this hook is used with the different selectors we have written externally, and internally, it makes a subscription to the 'stateChanged' event on the adapter. Since we use this hook in a lot of places we get this warning as it is managing more than 50 subscriptions which was out of date for the amount of new features that we have in the Composite experiences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants