cometchat / chat-sdk-javascript

Voice & Video Calling and Text Chat SDK for JavaScript/Web
Other
30 stars 24 forks source link

Cannot end properly a video call, javascript error and no effetcs #40

Closed VisiBoost closed 5 years ago

VisiBoost commented 5 years ago

With last 1.8 release (1.8.12) I have JS errors in console (with both Chrome and Firefox) and no effets when click on then red button "end video call" :

lib-jitsi-meet.min.js?v=3387:6 [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>:  UnhandledError: null Script: null Line: null Column: null StackTrace:  Error: Strophe: TypeError: Failed to execute 'postMessage' on 'Window': 2 arguments required, but only 1 present.
    at r.window.APP.connection.addEventListener (15705171300c7dccb596aac05ff4f92488db2697d69a8ef7d8:891)

It happend just after the

Sending out message message in console. Looking to code sending by the https://caesar.cometchat.com page it seems that the trouble is here :

this['window']['APP'].connection.addEventListener(
JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED,
()=>{
console.log("parent window", window.parent);
//console.error("diconnection");
// window.close();
console.log("Sending out message",{window})
window.postMessage(parent.postMessage(JSON.stringify({
'type': 'hangup',
'message': 'Message text from iframe.'
})),"*");

the window.postMessage also need the "*" second parameter like it is already done for parent.postMessage and about 10 lines after into the page code.

mayur-bhandari commented 5 years ago

Hello @VisiBoost , can you please let us know which browser are you using?

VisiBoost commented 5 years ago

I'am working under Linux Ubuntu 18.04 (64 bits) and test failed with both :

It also fails on Android (multiple browsers) but I have not check the console to see if that's the same error.

I have same kind of trouble (video call not closing) on latest Windows Chrome release (77) with another error trace : UnhandledError: null Script: null Line: null Column: null StackTrace:  Error: Strophe: Error: Blocked a frame with origin "https://caesar.cometchat.com" from accessing a cross-origin frame.

williamcruzme commented 5 years ago

I have the same issue too:

[react/features/base/redux/StateListenerRegistry.js] <Object._listener>:  TypeError: Cannot read property 'updateView' of undefined
    at Object.updateLargeVideo (VideoLayout.js:990)
    at Object._updateAfterThumbRemoved (VideoLayout.js:274)
    at Object.removeParticipantContainer (VideoLayout.js:816)

<Object.getGlobalOnErrorHandler>:  UnhandledError: null Script: null Line: null Column: null StackTrace:  TypeError: Cannot read property 'isConnectionInterrupted' of undefined
    at Object.isConnectionInterrupted (conference.js:1066)
    at LargeVideoManager.js:281
i @ Logger.js:125

conference.js:1066 Uncaught (in promise) TypeError: Cannot read property 'isConnectionInterrupted' of undefined
    at Object.isConnectionInterrupted (conference.js:1066)
    at LargeVideoManager.js:281

Logger.js:125 [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>:  UnhandledError: null Script: null Line: null Column: null StackTrace:  Error: Strophe: Error: Blocked a frame with origin "https://caesar.cometchat.com" from accessing a cross-origin frame.
    at console.log (<anonymous>)
    at r.<anonymous> (15707591881225da9685f36aaa0d346ed33ceddb024dcf157b:887)
    at r.emit (events.js:96)
    at t.value (xmpp.js:257)
    at r.Connection._changeConnectStatus (strophe.js:3683)
mayur-bhandari commented 5 years ago

Hello @VisiBoost and @williamcruzme, we have solved this in our latest release.

mayur-bhandari commented 5 years ago

Please update to latest version and let us know if it works as intended.

VisiBoost commented 5 years ago

That's working fine for me, no errors in console and call properly ended.

Thanks !

caglarturkurka commented 5 years ago

I have same error now and I updated latest version (1.8.13). Please help me about this issue

[react/features/base/redux/StateListenerRegistry.js] : TypeError: Cannot read property 'updateView' of undefined