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

Socket.io prepends '/#' to server ids #2491

Closed
FabioAntunes opened this issue Mar 16, 2016 · 1 comment
Closed

Socket.io prepends '/#' to server ids #2491

FabioAntunes opened this issue Mar 16, 2016 · 1 comment

Comments

@FabioAntunes
Copy link

I'm having a weird issue, I have just cloned a repo that was working perfectly fine, but for no aparent reason it isn't anymore.

Basically what's happening is that my socket.io server instance is prepending '/#' to the ids making them different from the client side.

So on the server side I have /#zG3wncZxZvgRE7LKAAAA and on the client side I have zG3wncZxZvgRE7LKAAAA

Also when the client is receiving a message, it's possible to see on the frames tab this:

4undefined

This is my app.js and config.room = fabio1:

    import config from './config';
    import io from './factories/io';

    io.on('connection', (socket) => {
      socket.join('dmClient');
      socket.join(config.room);
      console.log('socketId', socket.id);
    });

And this is my /factories/io.js

    import socketIo from 'socket.io';
    const io = socketIo(3000);

    export default io;

More info:

  • socket.io - 1.4.5
  • node - v4.4.0
@creole
Copy link

creole commented Mar 16, 2016

See #2475 and #2405

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

2 participants