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

cannot read 'sid' of undefined on linux in windows its working fine #1392

Closed
1 of 2 tasks
Warrior-hound opened this issue Nov 6, 2020 · 5 comments
Closed
1 of 2 tasks
Labels
question Further information is requested

Comments

@Warrior-hound
Copy link

Note: for support questions, please use one of these channels: stackoverflow or slack

For bug reports and feature requests for the Swift client, please open an issue there.

For bug reports and feature requests for the Java client, please open an issue there.

You want to:

  • report a bug
  • request a feature

Current behaviour

What is actually happening?

Steps to reproduce (if the current behaviour is a bug)

Note: the best way (and by that we mean the only way) to get a quick answer is to provide a failing test case by forking the following fiddle.

Expected behaviour

What is expected?

Setup

  • OS:
  • browser:
  • socket.io version:

Other information (e.g. stacktraces, related issues, suggestions how to fix)

@petersaints
Copy link

This report is rather uncomplete, but I'm having the same issue.

@lcherone
Copy link

lcherone commented Nov 6, 2020

Check both client and server versions are the same if you're trying to connect to v3.0.0 server with an older client 2.x.x it wont work

@darrachequesne
Copy link
Member

I think you must be trying to connect to a v2 server with a v3 client, which are not compatible.

Since the v2 server doesn't send a sid in the CONNECT packet, it will throw here: https://github.com/socketio/socket.io-client/blob/3.0.0/lib/socket.ts#L227-L229

@Warrior-hound could you please confirm the analysis? Or give additional details about the error? Thanks!

@darrachequesne darrachequesne added the question Further information is requested label Nov 6, 2020
@Warrior-hound
Copy link
Author

Thank actually vps installed latest v3 version and so i downgraded it to v2 and it just worked fine. TYSM for help.

@petersaints
Copy link

Ok. That seems to be the problem. I wrongly assumed that the new client was backwards compatible with Socket.io v2 server.

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

No branches or pull requests

4 participants