This indicates that a signed token request, sent to Ably to request a token, has been used before.  The nonce checks within the Ably service ensure that a signed token request can only be used once, and as such, the rejection of a token request that has been previously used is a valid part of the security measures in the platform design.

This error can be caused by network connectivity issues on the client side. What can happen is that the HTTP request to turn a signed token request into a token gets through to Ably, but the client never gets the response due to network issues. Then, when the client automatically retries the http request in a fallback data center it will get this error.

If you are getting this problem consistently (rather than just occasionally given network issues), here are some things you should check which may be causing it:

  • You should not cache the signed token requests you send to clients.  Each token request must be unique.
  • Check that your client is obtaining a new token request each time the authCallback or authUrl is being used.  We have often seen customers mistakenly cache the token request between authCallback calls.

If you've gone through the list above and are still getting this error, try to get a debug-level log of the generation of a token request, and contact us for more help.