On occasion we are receiving the 'USER_NOT_LOGED_IN ’ error message at random times.
More specifically upon app login we initiate CometChat and login the user, then we can perform normal actions like making calls, sending messages etc and then all of the sudden (no pattern found) we can not do any of these actions any more as the ‘USER_NOT_LOGED_IN’ error is received.
Is there a way that we can avoid this or something that we are doing incorrectly to generate the error?
When we reload the app (so force a CometChat re-initialization) things seem to work once more, we have also tried creating fail-safes so that:
*upon receiving the error we re-initialize CometChat and then try to perform the actions behind the scenes
*we added connection listeners so that if the connection is in disconnected state for to long we force a re-initialization
*we analyzed other CometChat properties like fact that sometimes we have experience the fact that the api keys become null and in those cases we try to reinitialize the app
Is there anything that we can do to streamline this?