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

Lobby name change error #7

Closed
mert574 opened this issue Jan 5, 2018 · 4 comments
Closed

Lobby name change error #7

mert574 opened this issue Jan 5, 2018 · 4 comments
Labels

Comments

@mert574
Copy link
Contributor

mert574 commented Jan 5, 2018

When I change the lobby name to anything from default random string; lobby is not becoming joinable.

I also tried this:
Copied the first random name, changed it and then tried to connect with both the random and the changed name. Both doesn't work.

Error: Could not connect to peer TEST

at Peer../node_modules/snex/dist/snex.js.Peer.emitError (snex.js:1694)
at Peer../node_modules/snex/dist/snex.js.Peer._handleMessage (snex.js:1527)
at Socket.<anonymous> (snex.js:1434)
at Socket.emit (snex.js:351)
at WebSocket._socket.onmessage (snex.js:557)
@pomle
Copy link
Owner

pomle commented Jan 5, 2018

Hey, thanks for the report. Is this reproducible on your end. I followed the instructions and works as expected. Please provide more detail on how often this happens, what you did before etc.

@mert574
Copy link
Contributor Author

mert574 commented Jan 5, 2018

Easily reproducible even with clean install. I'm able to reproduce with these steps:

1. git clone https://github.com/pomle/draw.git
2. cd draw/, npm update, npm start

3. 2 incognito chrome windows with ctrl + shift + N
Window 1: started to host with default random name 'LEPA'
Window 2: Successfully, joined the room named 'LEPA'

4. Refreshed both incognito windows.
Window 1: started to host with a lobby name 'test' Says:

Welcome to the Lobby
Join the game at
test

Window 2: Cannot join the room named 'test'. Says:

Could not connect to peer TEST


Versions

Chrome: 63.0.3239.132 (64 bit)
npm: 5.6.0
node: 8.9.4

@mert574
Copy link
Contributor Author

mert574 commented Jan 5, 2018

Found it! the problem is this:
When hosting a lobby, the name has to be uppercase. From joining side it doesn't matter.

Forcing uppercase can be the solution.

@pomle
Copy link
Owner

pomle commented Jan 5, 2018

@mert574 great!

I remember this. I uppercased the input when I created random session words.

I think the solution we should try, is normalize it to uppercase when it is sent to the server for peering, but keep it as entered in the client. That way the room name when given can be displayed with picked case, while still be case insensitive when entered.

@pomle pomle added the bug label Jan 5, 2018
@pomle pomle closed this as completed in #8 Jan 5, 2018
pomle pushed a commit that referenced this issue Jan 5, 2018
* Force sessionId to uppercase

Fixes #7

* Delete comment

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

No branches or pull requests

2 participants