Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error when E2EE is enabled #2587

Open
TamaraFinogina opened this issue Oct 10, 2024 · 0 comments
Open

Runtime error when E2EE is enabled #2587

TamaraFinogina opened this issue Oct 10, 2024 · 0 comments

Comments

@TamaraFinogina
Copy link

Description


Runtime error when E2E is enabled due to rejection in _sendSessionInit (Tried to send session-init to ${pId} but we already have a session, here: https://github.com/internxt/lib-jitsi-meet/blob/master/modules/e2ee/OlmAdapter.js#L987)

Current behavior


Screenshot 2024-10-10 at 11 12 11

Expected Behavior


OLM channels are established without problems

Possible Solution


It is a problem in the call logic.
When E2EE is enabled, then this chain of events happens:

  • JitsiConference.prototype.toggleE2EE calls _e2eEncryption.setEnabled
  • _e2eEncryption.setEnabled calls _keyHandler.setEnabled
  • _keyHandler.setEnabled calls _setEnabled and setLocalParticipantProperty (here the issue starts)
  • _setEnabled (in ManagedKeyHandler.js) calls _olmAdapter.initSessions(), which sends _sendSessionInit to all participants with bigger IDs
  • setLocalParticipantProperty triggers SetProperty, which starts _onParticipantPropertyChanged that sends _sendSessionInit to all participants with bigger IDs AGAIN.
  • Upon a second call to _sendSessionInit the rejection is triggered:
if (olmData.session) {
            logger.warn(`Tried to send session-init to ${pId} but we already have a session`);

            return Promise.reject();
 }

Steps to reproduce


Start a conference between 3 participants on localhost via Visual Studio Code and enable E2EE. Runtime error follows.

Environment details


Google Chrome Version 129.0.6668.90 (Official Build) (arm64)
macOs Sonoma 14.6.1
Visual Studio Code Version: 1.93.1
npm 9.6.4
node 20.0.0

TamaraFinogina pushed a commit to internxt/lib-jitsi-meet that referenced this issue Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant