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

Problem with setQuery in socket io version 3.0 #150

Closed
hugoyair opened this issue Feb 5, 2021 · 4 comments
Closed

Problem with setQuery in socket io version 3.0 #150

hugoyair opened this issue Feb 5, 2021 · 4 comments
Labels

Comments

@hugoyair
Copy link

hugoyair commented Feb 5, 2021

When I try to use setQuery (object), I can´t connect me in the server, but when I don´t use setQuery I can. I don´t know why.

I can use setHeaders, but It´s not the best option to do it.

I´m using the last version 2.0.0-beta.2 but my server is socket version 3.0

@jumperchen
Copy link
Member

any example?

@majunor
Copy link

majunor commented Feb 19, 2021

I had the same problem. The offending line seems to be in manager.dart lines 365-367. It adds the query to the the namespace which in my case resulted in the server responding with unknown namespace. Unfortunately this results in the socket class simply ignoring the packet (socket.dart line 218) and not sending an error event. So, it seems like you just can't connect.
Commenting out the lines in manager.dart solves my problem, even though i'm not sure if that causes any side effects...

@jumperchen
Copy link
Member

Fixed in 2.0-beta branch and release socket_io_client 2.0.0-beta.3

@hugoyair
Copy link
Author

hugoyair commented Mar 4, 2021

Thank you so much, I´ll use it to try it.

jumperchen added a commit that referenced this issue Mar 10, 2021
* 2.0-beta:
  Fix #150 Problem with setQuery in socket io version 3.0
  Fix #140 getting Error on emitWithAck() in v2 beta
  fine tune example code.
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

3 participants