Closed enggomarpu closed 1 year ago
In order to perform calls, you need to be connected to chat
This is stated here https://developers.connectycube.com/js/videocalling?id=preparations
'null is not an object (evaluating 'client.jid._local')'.
means you are not connected to chat
Ok. @DaveLomber I got your point and solved the issue by calling login method written in auth-service.js file for react-native video calling sample code on every app reload.
I get this error [TypeError: undefined is not an object (evaluating 'this.streamManagement.elementHandler')]
when i call ConnectyCube.chat.disconnect() on logout button of my app
@enggomarpu hm, it's hard to say what's the reason could you post the complete stack trace
@DaveLomber This is the error, I am getting when I calls ConnectyCube.chat.disconnect(). I am implementing one to one video call and following sample video call code.
`disconnect() { Utils.DLog('[Chat]', 'disconnect'); if (this._isLogout) { Utils.DLog('[Chat]', 'Warning! Chat is already disconnected!'); return; }
this.muc.joinedRooms = {};
this.isConnected = false;
this._isConnecting = false;
this._isLogout = true;
this._isReconnect = false;
this.helpers.setUserCurrentJid('');
if (this.streamManagement.elementHandler) {
this.xmppClient.removeListener('element', this.streamManagement.elementHandler)
}
return this.xmppClient.stop();
}`
This the function called in your cubeChat.js. Please share your thoughts, how can I avoid this error or remove this error.
@enggomarpu I see
can you try to use the following SDK config and see if the issues persists:
const CONFIG = { "chat": {
"streamManagement": {
"enable": true
}
},
"debug": {
"mode": 1
}
}
ConnectyCube.init(CREDENTIALS, CONFIG);
@DaveLomber thanks for your input. It is working fine now. But is there any API of Connectycube, which can tell user online status, if we pass user id ?
Hello, Hope you are doing great. I am implementing connnectycube for a react native app. When I first time login to my app, video call functionality works fine. When I reload my app and push start call button again I get this error 'null is not an object (evaluating 'client.jid._local')'. I make sure my session is stored to the local storage. I am also updating session on app reload though using this code.
Versions
"react-native": "0.68.0",
"react-native-webrtc": "^1.100.1"
"react-native-connectycube": "^3.18.0",
useEffect(() => { getItem('ConnectyCube:session').then((storedSession) => { console.log('storedSession', storedSession) if(storedSession){ const session = JSON.parse(storedSession); ConnectyCube.setSession(session); } }).catch(() => { Alert.alert('Error in reading local storage') }) }, [])
Any suggestions or help, am i doing missing something or doing wrong ?