Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-1910

Session restart with expired refresh token crashes on subsequent login attempt

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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.wilkersonbarker@mongodb.com Michael Wilkerson-Barker (Inactive)
            Reporter:
            andrew.meyer@mongodb.com Andrew Meyer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: