jitsi / lib-jitsi-meet

A low-level JS video API that allows adding a completely custom video experience to web apps.
Apache License 2.0
1.33k stars 1.11k forks source link

How to restore a stuck screen after "session terminate for ice restart - error" appears #2260

Open chx-1994 opened 1 year ago

chx-1994 commented 1 year ago

When using the "lib-jitsi-meet API (low level)" to create a video conference with two users, communication is normal at first.

However, after a while, the console displays the error "2023-04-18T06:27:04.799Z [modules/connectivity/IceFailedHandling.js] <s._conference.jvbJingleSession.terminate.reason>: session-terminate for ice restart - error: undefined".

One user's video freezes and the example page also displays this error, causing the video to stutter briefly before returning to normal.

I would like to know how the jitsi-meet team handles this issue and restores normal video.

QQ截图20230418145037

saghul commented 1 year ago

Do you see any errors in the jicofo or JVB logs?

chx-1994 commented 1 year ago

Server log:

image

Page log:

image

After the call is established, no action is taken, and this error occurs every time more than a minute has passed. There are no other errors

This is my config:

export const getConfig = (name) => {

    var subdir = `${name}/`;
    var subdomain = `${name}.`;

    if (subdomain) {
        subdomain = subdomain.substr(0, subdomain.length - 1).split('.')
            .join('_')
            .toLowerCase() + '.';
    }

    // In case of no ssi provided by the webserver, use empty strings
    if (subdir.startsWith('<!--')) {
        subdir = '';
    }
    if (subdomain.startsWith('<!--')) {
        subdomain = '';
    }
    var enableJaaS = true;
    var config = {
        hosts: {
            domain: 'meet.example.org',
            muc: 'conference.' + subdomain + 'meet.example.org',
        },
        bosh: '//meet.example.org/' + subdir + 'http-bind',
        serviceUrl: 'https://meet.example.org/http-bind',
        testing: {},
        enableNoAudioDetection: true,
        enableNoisyMicDetection: true,
        channelLastN: -1,
        p2p: {
            enabled: true,
            stunServers: [
                { urls: 'stun:meet-jit-si-turnrelay.jitsi.net:443' },
            ],
        },
        analytics: {
            mouseMoveCallbackInterval: 1000,
        }
    }
    config.flags = config.flags || {};
    config.flags.sourceNameSignaling = true;
    config.flags.sendMultipleVideoStreams = true;
    config.flags.receiveMultipleVideoStreams = true;

    if (enableJaaS) {
        config.dialInNumbersUrl = 'https://conference-mapper.jitsi.net/v1/access/dids';
        config.dialInConfCodeUrl = 'https://conference-mapper.jitsi.net/v1/access';
        config.roomPasswordNumberOfDigits = 10; // skip re-adding it (do not remove comment)
    }
    return config;
}

What should I do to handle this error or avoid its occurrence. thank you for your help!

damencho commented 1 year ago

Isntour deployment working? This is ice failed trying to connect to the bridge. The common problem is either a firewall vlocking access of clients to the bridge or people forget to forward UDP port 10000 from the public ip to rhe bridge.