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

Client does not return without internet connection #369

Closed
SarveshRamachandran opened this issue Mar 31, 2021 · 4 comments · Fixed by #462
Closed

Client does not return without internet connection #369

SarveshRamachandran opened this issue Mar 31, 2021 · 4 comments · Fixed by #462
Labels
enhancement New feature or request

Comments

@SarveshRamachandran
Copy link

Client.connectUser does not work properly if there is no internet connection. It should return an error saying that there were connection issues, but it doesn't return anything at the moment

@SarveshRamachandran SarveshRamachandran added the bug Something isn't working label Mar 31, 2021
@imtoori imtoori assigned imtoori and unassigned imtoori Apr 1, 2021
@imtoori
Copy link
Contributor

imtoori commented Apr 1, 2021

I see, it returns null at the moment when there is no connection, or throws an exception if there is a server error
We'll work on more specific error types, thanks for the report

@imtoori imtoori removed their assignment Apr 1, 2021
@imtoori imtoori added enhancement New feature or request and removed bug Something isn't working labels Apr 1, 2021
@SarveshRamachandran
Copy link
Author

SarveshRamachandran commented Apr 1, 2021

I don't think it returns null. While testing it yesterday, it wouldn't return at all, so any watchers that were linked to the client wouldn't begin correctly and instead get stuck

@imtoori
Copy link
Contributor

imtoori commented Apr 2, 2021

I tested it to understand your issue and it returns null if there is no connection
This is my snippet

final res = await client.connectUser(
    User(id: userId),
    userToken
  );

  print('res: $res');

I agree this is not the best behaviour, but at least it does not hang

@xsahil03x xsahil03x linked a pull request Jun 18, 2021 that will close this issue
@imtoori
Copy link
Contributor

imtoori commented Jun 25, 2021

we added more specific errors, you can find the new implementation in the develop branch
it will be available in the next release
I'm closing this issue, feel free to reopen it if you have any doubt

@imtoori imtoori closed this as completed Jun 25, 2021
This was referenced Jun 28, 2021
@imtoori imtoori mentioned this issue Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants