Be able to successfully call Realm.login() again after refreshing app.
Login should run and return the user information like the first time the app loads
Nothing happens, no errors shown in the console. Realm logs don't show the request is being made.
When I fire up the React Native Debugger, I did see an error about Realm.Credentials.function(payload); not being able to be created. I believe some of the functionality for function auth is missing in the lib/browser/credentials.js and lib/browser/rpc.js. We are using function auth, however, I received the same behavior of the original issue using anonymous and other auth types.
Launch app from Xcode in simulator or on iOS device.
Run Login (works beautifully).
Refresh the react native bundle from the package server.
Try to login again (nothing happens)
I have the same issue.
I have to kill the app and relogin
➤ Chris Bush commented:
Encountered this myself. Some investigation revealed that (on iOS at least) the RunLoopScheduler is stale because its m_runloop is still pointing to the original thread, whereas the JS executor is actually running on a different thread after an app reload. This causes the scheduler to never be able to schedule requests, so the requests to log in are never heard from again. Please DM me for more details.
this is fixed in https://github.com/realm/realm-js/pull/3340
Most helpful comment
this is fixed in https://github.com/realm/realm-js/pull/3340