Join_meeting_failed

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Hi @chunsiong.zoom ,

We still have the “Signature has expired” issue. It happens to us several times a day.

you suggested do the following:

I can’t be certain yet, but there is possibility if this javascript is running on client side (on the user’s browser), wrong timing from the user’s PC / Mac might cause the “Signature has expired” issue.

One way of reducing such issue would be to run the signature generator on a server, and expose it as a secure + authenticated web-service.

This is how our system is working. When the client web wants to join the meeting, it makes an web api request to the server and it calculate a signature an that moment using the code I showed in one of my previous reply.

What else could I try ? I there any log where I can see the problem with more details ?

Regards

@efren , how long are you setting the expiry for?

Hi @chunsiong.zoom,
We set the expiry for one day. The code that generates the signature is the following:

    private static long ToEpoch(DateTime value) => (value.Ticks - 621355968000000000) / (10000 * 1000);
    public static string GetSignature(long meetingNumber, string sdkKey, string sdkSecret)
    {
        var now = DateTime.UtcNow;
        int roleId = 1;
        var iat = ToEpoch(now);
        var exp = ToEpoch(now.AddDays(1));
        var payload = new Dictionary<string, object>()
      {
          { "appKey", sdkKey },
          { "sdkKey", sdkKey },
          { "mn", meetingNumber },
          { "role", roleId },
          { "iat", iat },
          { "exp", exp },
          { "tokenExp", exp },
      };
        return Jose.JWT.Encode(payload, Encoding.UTF8.GetBytes(sdkSecret), JwsAlgorithm.HS256);
    }

@efren ,

it seems the code is ok.

I would do something like

var iat = ToEpoch(now.AddSeconds(-60));
var exp = ToEpoch(now.AddDays(1));

For the meeting which you are joining, are they created by users in the same account or users in external accounts?

Hi @chunsiong.zoom thanks for you answer.

I’ve changed the iat as you suggested, I’ve done some tests and it seems it works properly!! Let’s wait for the users usage.
I’ll come back to you if the issue happens again.

Regards

Hi @chunsiong.zoom the frequency of this issue has decreased but we still are having it. Twice today.
Any suggestion to fix it?
Is there any log to check what is the problem ?

We are a bit frustrated because it is an issue that appears from time to time and we can’t tell the client that it’s solved.

Thanks in advance,

@efren , do you know what error message was given?

Hi @chunsiong.zoom ,

The “signature has expired” error message.

Regards,

@efren , are you currently just doing -1 minute for IAT?

we might be able to try doing a more flexible time range for IAT. Maybe -30 mins or -60 mins?

Hi @chunsiong.zoom ,

I set -3 min and it continue happening few times every week. I will try with -60 min.
Is there any place to see logs or something ?

The same app has Android SDK Users and last week all android users were kicked out at the same time. I was looking for a log of the session to understand the problem. A log of the session exists?

Thanks,

@efren , for Android SDK, you can capture the log in the initParams.enableLog parameter

I would recommend setting the expiry to be 60 mins or more if you are using mobile SDK.

thanks for your answer @chunsiong.zoom ,

We will enable the android logs on a test device and we’ll wait for the next time this issue happens.

Is there any log in server side that I could check from the Zoom platform ?

Thanks,

Hi @chunsiong.zoom ,

Regarding the “signature has expired error”
We set the iat -60 mins and we still have signature errors few times a week.

As we are losing the confidence of our client we need to solve the problem.
Is there any premium support or the possibility to hire any zoom technical specialist?

Regards,

@efren you might be able to sign up for developer support here

Nonetheless, did you managed to capture the log from android ?

If you are able to replicate this on the Web SDK, let me know too, we might be able to capture the tracking ID

@efren wanted to double check something with you too. Did you do minutes or seconds btw?
I realised previously the code sample was -60 seconds, instead of -60 minutes

Hi @chunsiong.zoom ,

Based on what the client reports to us, the “signature is expired” error message appears 5% -10% ot the times the users join a meeting.

The code is the following (It is in server side, the web client requests a signature each time it enters a meeting):

//static readonly int roleId = 0; // 0 for participant, 1 for host
        private static long ToEpoch(DateTime value) => (value.Ticks - 621355968000000000) / (10000 * 1000);
        public static string GetSignature(long meetingNumber, string sdkKey, string sdkSecret)
        {
            var now = DateTime.UtcNow;
            int roleId = 1;
            var iat = ToEpoch(now.AddMinutes(-65));
            var exp = ToEpoch(now.AddDays(1));

            var payload = new Dictionary<string, object>()
          {
              { "appKey", sdkKey },
              { "sdkKey", sdkKey },
              { "mn", meetingNumber },
              { "role", roleId },
              { "iat", iat },
              { "exp", exp },
              { "tokenExp", exp },
          };
            return Jose.JWT.Encode(payload, Encoding.UTF8.GetBytes(sdkSecret), JwsAlgorithm.HS256);
        }

@efren ,

Here’s what I would do.

  1. Try to capture the log from the SDK running on Android
  2. Use a different roleId for Participant and Host. There should be more participants than host.

I’ve tried out the c# code which you have shared, and tested it on my own meeting, it works fine (at least from the few test which I’ve done)

Some other considerations which might be farfetched, but still possible

  1. Cache of the web service which might be serving stale data
  2. static variables which might be using stale / older datetime data.

Hi @chunsiong.zoom ,

Yesterday we did the following test:

  1. We entered a meeting using our platform through web meeting SDK. We get the signature expired error message. We printed the signature used.
  2. A minute later, we “hardcoded” this signature to force using the same to enter the same meeting. It worked fine.

So, we understand that the problem is not in the signature although the sdk error message told us so.

We assume then the problem is in the way the meeting sdk is used. The structure is the following:

this.client
                .init({
                    debug: true,
                    zoomAppRoot: meetingElement,
                    language: 'es-ES',
                    customize: {
                        video: {
                            isResizable: false,
                            popper: {
                                disableDraggable: true
                            },
                            viewSizes: {
                                default: {
                                    width:
                                        window.innerWidth -
                                        window.innerWidth / 2.5,
                                    height: window.innerHeight - 180
                                },
                                ribbon: {
                                    width: 300,
                                    height: 300
                                }
                            }
                        },
                        meetingInfo: [
                            'topic',
                            'host',
                            'mn',
                            'pwd',
                            'telPwd',
                            'invite',
                            'participant',
                            'dc',
                            'enctype'
                        ]
                    }
                })
                .then(() => {
                    this.HTMLElement.style.display = 'none';

                    this.joinZoom(this.meeting!.data).then((connected: any) => {
                        this.connected = connected;

                        this.HTMLElement.style.display = 'initial';

                        // Once zoom is loaded, we get the initial status of the meeting
                        this.getMeetingStatus().then((data) => {
                            resolve({ meetingStatus: data, isReady: true });
                        });
                    });
                })
                .catch((err: any) => {
                    console.log('ERROR joining zoom');
                    reject(err);
                });

joinZoom(data: any) {
        return new Promise((resolve, reject) => {
            const config = {
                sdkKey: Config.get().zoomSDK.KEY,
                signature: data.signature,
                meetingNumber: data.meeting.zoomId,
                password: data.meeting.zoomPwd,
                userName: data.userDisplayName
            };

            console.log('Zoom Config', config);

            setTimeout(() => {
                this.client
                    .join(config)
                    .then(() => {
                        resolve(true);
                    })
                    .catch((err: any) => {
                        console.log('Error joining zoom', err);
                        reject(err);
                    });
            }, 200);
        });
    }

In this code, this.client = ZoomMtgEmbedded.createClient();

Do you have any idea where the problem is?

Regarding the ratio host/participant. We have seen that we set roleId in the signature = 1 for all users. We’ll set roleId = 0 for participants and try again. I’m not sure this is the problem because when we get the error, there are no participants in the meeting yet.

Regards