I’m building a test react webapp, and somehow got into the state where my Realm.App.currentUser is a loggedOut, “active” user. When I try to remove tracking of this user altogether, I get an InvalidSession error. I’m confused by this error, since why would this user need a valid session in order to be removed from the Realm app altogether? Is this inconsistent state supposed to be possible? See the console log statements below for the weird state this user seems to be in:
console.log("got invalid session...") console.log("current_user id is " + app.currentUser.id) console.log("isLoggedIn is " + app.currentUser.isLoggedIn) console.log("state is " + app.currentUser.state) console.log("attempting to remove " + app.currentUser.id) await app.removeUser(app.currentUser)
Which prints out in order:
indent preformatted text by 4 spaces current_user id is 60298bf0537dbb177e356e89 isLoggedIn is undefined state is active attempting to remove 60298bf0537dbb177e356e89
and on the removeUser call it gives me the following error
- how could the isLoggedIn variable be undefined? According to the docs it’s supposed to be either True or False.
- how could the user be active, when its loggedIn state is undefined?
- Why does Realm need a valid session to remove the user at all?