Bad user authentication (BIND, REFRESH) errors

Hello,

For at least one week we observe sporadic “Bad user authentication (BIND, REFRESH)” errors coming from client devices trying to connect to a Realm-cloud instance.

This instance hosts just one realm database, which is accessed via single user account(user/pass). The same error occurs when we’re connected with Realm Studio(using the same account) after some time period.

Please advise - is this a known Realm Cloud issue?

Regards,
Ivo

Hi @Ivo_Dimitrov,

The “Bad user authentication (BIND, REFRESH)” message is a client level error.

Per the client error descriptions, the expected cause is:

Indicates that the server has produced a bad token, or that the SDK has done something wrong.

If you are still seeing this error intermittently can you provide some more details including:

  • The version(s) of the client SDK you are encountering this error with
  • Your Realm Studio version
  • How frequently this error occurs
  • Whether the occurs for all your Realm Cloud instances or is specific to one or more instances

Thanks,
Stennie

Not sure if this is applicable, but I got a lot of BIND, REFRESH errors when attempting to read a read-only realm from Realm Cloud. The error message wasn’t really clear, but what happened in my case was that I had missed the part in the documentation that says that you need to open a read only realm asynchronously the first time to make sure it is fully downloaded.

If you don’t do this, the realm will initially be empty which will cause a schema mismatch. And since the user doesn’t have permissions to change the realm schema you will get a BIND, REFRESH error.

Not sure if this is why it is happening for you, but I thought I’d share what the problem was for me in case it helps.