jitsi / jitsi-meet-electron-sdk

Jitsi Meet SDK for Electron
Apache License 2.0
78 stars 83 forks source link

Context Isolation error #337

Open Samiur-UTI opened 1 year ago

Samiur-UTI commented 1 year ago

For IPC message exchange context isolation is the best practice, but the following error throws up after enabling context isolation:

Uncaught Error: An object could not be cloned. at Conference._loadConference (Conference.js:176:25)

the error is thrown in the following cone snippet of Conference.js:

// Setup Jitsi Meet Electron SDK on this renderer.
    window.jitsiNodeAPI.setupRenderer(this._api, {
      enableRemoteControl: ENABLE_REMOTE_CONTROL,
      enableAlwaysOnTopWindow: this.props._alwaysOnTopWindowEnabled
 });

After digging further, found the cause which is the setupRenderer function takes in the API native class which is not supported by the structured clone algorithm. Please comment if anyone know any work around, Thanks!

wbigert commented 9 months ago

Could this solution be what you seek? I had the same issues as you had. (Or maybe not, since you are not just looking for screen sharing?)

https://github.com/jitsi/jitsi-meet-electron-sdk/issues/358#issuecomment-1893722994

saghul commented 9 months ago

Not quite, if remote control is used the SDK is not ready for context isolation.