voximplant / react-native-voximplant

Voximplant mobile SDK for React Native (iOS/Android)
http://voximplant.com
205 stars 39 forks source link

Login failed after connection established (error 491) #135

Closed anniewey closed 2 years ago

anniewey commented 2 years ago

As mentioned in #39 , the issue still happening in "react-native-voximplant": "^1.27.0".

We are trying to log user in after opening the app from background via push notification. First perform client connect voximplant.connect() before logging uservoximplant.login(user) and getting AuthResult Error code: 491.

const voximplant = Voximplant.getInstance()

if (status === Voximplant.ClientState.DISCONNECTED){
      await voximplant.connect()   
      loginVoxUser() //get error 491
}

Update: After changing to ConnectionEstablished listener instead, the error seems not showing. Will continue to observe this. Closing the issue for now.

const voximplant = Voximplant.getInstance()

voximplant.on(Voximplant.ClientEvents.ConnectionEstablished, (connection) => {
      console.log('//connection receive', connection)
      loginVoxUser()
})