ably-js
ably-js copied to clipboard
disconnected with self generated JWT token
Never connected using generated JWT token. And there is no error fired to know the reason.
➤ Automation for Jira commented:
The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3563
Hey @step135, thanks for reaching out!
You can observe connection state by using the client.connection event emitter interface:
// The listener gets called every time the client connection state changes
client.connection.on(stateChange => {
stateChange.previous // the previous connection state
stateChange.current // the new connection state
stateChange.reason // the error which caused the connection state to change, if any
});
You should be able to use this to observe which error is preventing the client from establishing a connection and diagnose your JWT problem accordingly. Let us know if this doesn't work or if you have any further issues.
Closing this issue as it has been inactive for more than a year. If you are still experiencing issues with using JWT tokens in ably-js, please open a new issue.