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

toast-notification-count issue #1

Closed
Mohitur669 opened this issue Aug 12, 2023 · 16 comments
Closed

toast-notification-count issue #1

Mohitur669 opened this issue Aug 12, 2023 · 16 comments

Comments

@Mohitur669
Copy link
Owner

Known Bugs

  • If a user leaves or enters the room, the toast notification number not showing correctly.
    • Like, if I (user1) create a room and user2 joins the same room, then instead of one toast notification, four toast notifications are shown.
    • Now if the user2 leaves, then two toast notifications are shown instead of one.

Note: The number of toast notification increases more and more if more users join and leaves the room.

Note: If you find any other bugs, please let me know. I will try to fix it as soon as possible :)
In case you want to fix it yourself, feel free to make a pull request.

@Mohitur669 Mohitur669 pinned this issue Aug 12, 2023
@Mohitur669
Copy link
Owner Author

  1. To solve the toast notification count remove the React strict app component, just normally pass the component in the index.js
  2. After solving that issue an undefined object is showing up on the connected users' screen if a user leaves. To solve this create a check for undefined users like this,
socketRef.current.on(ACTIONS.DISCONNECTED, ({ socketId, username }) => {
    if(username){
        toast.success(`${username} left the room`);
        setClients((prevClients) => {
            return prevClients.filter(client => client.socketId !== socketId);
        });
    }
});

@Mohitur669
Copy link
Owner Author

Mohitur669 commented Aug 12, 2023

The issues are fixed after applying the above patches.

@dilpreetkaur03
Copy link

Code is not running?
Socket connection failed. Try again is there
what to do

@Mohitur669
Copy link
Owner Author

Code is not running? Socket connection failed. Try again is there what to do

This is the latest working code provided on github. You need to follow the steps given in readme.
Don't you forgot to run server and client. P.S: This whole code is tested only locally.

Repository owner deleted a comment from labelurtag Mar 9, 2024
Repository owner deleted a comment from labelurtag Mar 9, 2024
Repository owner deleted a comment from labelurtag Mar 9, 2024
@monishsoorya31
Copy link

After creating and joining the room, sometimes later a popup says "Socket connection failed" and the room closes automatically, how can I resolve the problem?

@Mohitur669
Copy link
Owner Author

After creating and joining the room, sometimes later a popup says "Socket connection failed" and the room closes automatically, how can I resolve the problem?

Are you testing this in localhost?

@monishsoorya31
Copy link

yes I'm testing in local host

@Mohitur669
Copy link
Owner Author

use npm instead of yarn

@monishsoorya31
Copy link

thanks I'll try

@monishsoorya31
Copy link

Screenshot 2024-03-09 at 5 26 20 PM

@monishsoorya31
Copy link

same error occured

@Mohitur669
Copy link
Owner Author

same error occured

The problem is occurring because you have to run node server.js and npm start into different terminals. Both should be running at the same time.

@monishsoorya31
Copy link

i have tried bro but still same problem

@Mohitur669
Copy link
Owner Author

sent you a connection req in LinkedIn .. message a google meeting link there

@monishsoorya31
Copy link

@rajatsharma979
Copy link

How did you implemented synchronization of code? Did you use OT libraries like ShareDB, OT.js?

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

No branches or pull requests

4 participants