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

I can't connect(setToken) #68

Closed
furkanerkl opened this issue Nov 17, 2022 · 4 comments
Closed

I can't connect(setToken) #68

furkanerkl opened this issue Nov 17, 2022 · 4 comments

Comments

@furkanerkl
Copy link

ErrorEvent{error: Connect error: ClientDisconnectedError}

I am getting this error. I think the problem is that I can't assign the token properly. How can I use the setToken command like in JS. Also how can I make 'debug:true' as in the code below.

const centrifuge = new Centrifuge('url', {
websocket: WebSocket,
debug: true
});

@enesuludg
Copy link

I have same problem

@FZambia
Copy link
Member

FZambia commented Nov 18, 2022

Hello

Could you share server and Dart SDK versions? Note that:

The latest centrifuge-dart is compatible only with the latest Centrifugo server (v4) and Centrifuge >= 0.25.0. For Centrifugo v2, Centrifugo v3 and Centrifuge < 0.25.0 you should use centrifuge-dart v0.8.0.

setToken method not available in the latest Dart SDK, to work with tokens you need to use token and getToken configuration options - see example. This SDK now works according to this spec.

@furkanerkl
Copy link
Author

@FZambia As you said, the problem was solved when I changed the library version to v0.8.0.

@FZambia
Copy link
Member

FZambia commented Nov 18, 2022

Awesome, closing then. @enesuludg hopefully you have same issue, if not please open a new one with server/client versions and steps to reproduce

@FZambia FZambia closed this as completed Nov 18, 2022
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

3 participants