Call to refreshCustomData on WEB SDK is stalled for a long time


My web app is performing a poll request every 10 seconds and before each request checks if the access token is about to expire. In case the token is expired it is calling the refreshCustomData method which calls the /auto/session API to obtain a new access token.
This works ok for several hours but at one point I notices the request is stalled for nearly an hour and eventually times out without any failure code.
Is there any reason for this behavior? Please note that the refresh token is still valid.


Sounds like a glitch in the matrix to me.

But in all seriousness, is this something that happened once or are you able to reproduce this deterministically?

Another and slightly unrelated observation is that refreshing the access token is handled automatically by the Realm Web SDK, there should be no need to call the API to refresh it. If a request fails do to an expired access token it will refresh the token and replay the request.

If that’s not the case, we have a bug and in that case my question would be, what “poll request” are you performing?

So, it turns out it is caused only when the PC is sleeping, so it is not related to any server issue.