Session restart with expired refresh token crashes on subsequent login attempt

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Expected results

      After a refresh token expires, it should be possible to login again without a crash.
      Expected result would be to get a new auth session and not crash.

      Actual Results

      When starting an application with an expired refresh token, attempts to login again crash the application.

      Steps & Code to Reproduce

      My current setup is to run a local BaaS with the refresh token expiration set to 1 minute. Upon expiration, the sync session is paused and resumed (or the application can be restarted).
      This results in logging out the user.
      Upon logging in again, the following crash occurs:

      libc++abi: terminating due to uncaught exception of type realm::MultipleSyncAgents: Multiple sync agents attempted to join the same session
      

      Notes

      When the refresh token is expired and a manual logout is performed by the application, the crash does not occur. It would seem that the sync session detecting the refresh token expiration leaves it in a state that causes the crash.

      Core version

      Core version: 13.24.0

            Assignee:
            Michael Wilkerson-Barker (Inactive)
            Reporter:
            Andrew Meyer
            Archiver:
            Marc Greenfield

              Created:
              Updated:
              Resolved:
              Archived: