Getting "access token expired" in the logs of ROS


I am developing an android application and using ROS. Sometimes in the logs of the ROS for a particular user the error comes “Access token expired” followed by that the syncing between the mobile app and the ROS stops.Please could anyone suggest why this is happening and how to fix it


The access token may expire for a couple of reasons, the most likely of which is if the app was backgrounded, so the proactive token refresh code didn’t get to run. Then as the app gets foregrounded and tries to reestablish the sync session, it uses the token that is now expired. That is a transient error though and the app should refresh its token immediately after that error is thrown and syncing should continue. Are you certain people lose the ability to sync after the error is thrown and do you have a way to reproduce that behavior?


As you said there could be number of reasons for this issue to occur,this particular scenario doesn’t match my situation .We noticed it occurring even when the app is in foreground.I have gone through some posts related to the same problem and it was mentioned there that this issue can arise when you are working with an outdated version of realm in the app.Is it maybe due to the version which I am using ?
classpath “io.realm:realm-gradle-plugin:3.3.2”