Joining failure

Description
I am facing a joining failure problem. some user able to join the meeting after that showing joining fail

Error
joining fail

Which version?
I am using the latest version(https://github.com/zoom/sample-app-web)

To Reproduce(If applicable)

Screenshots
image

Smartphone (please complete the following information):

  • Browser:[e.g. Chrome]

Additional context

Hey @ser.shivam1994,

Please make sure you allow some time for the Web SDK files to load:

If you are still seeing this issue, please provide steps to reproduce the issue.

Thanks,
Tommy

I am seeing the exact same thing. The error actually goes away if you set the role to host instead of attendee in the SDK call. Unfortunately, we need attendee role.

Hey @rschoenfeld,

That is strange, it should work with attendee role 0. Can you please provide steps to reproduce the issue? It is working as expected when I test.

Thanks,
Tommy

I will reach out to my developer for the specific information. Can you provide your steps? Do you have code that we can try where you see it working? I really don’t want to share API credential info in a public forum.

This is the code we are using. I have purposely used placeholders for the meeting password, API Key userName, userEmail and signature for privacy. If needed, we can provide you with this information off-forum.

<!-- import ZoomMtg dependencies -->
<script src="https://source.zoom.us/1.7.8/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/jquery.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/lodash.min.js"></script>

<!-- import ZoomMtg -->
<script src="https://source.zoom.us/zoom-meeting-1.7.8.min.js"></script>

<script>
    $(document).ready(function () {
        ZoomMtg.setZoomJSLib('https://source.zoom.us/1.7.8/lib', '/av');
        ZoomMtg.prepareJssdk();
        ZoomMtg.preLoadWasm();
        
        ZoomMtg.init({
            debug: true, //optional
            leaveUrl: 'https://zoom.us', //required
            showMeetingHeader: false, //option
            disableInvite: true, //optional
            disableCallOut: false, //optional
            disableRecord: true, //optional
            disableJoinAudio: false, //optional
            audioPanelAlwaysOpen: false, //optional
            showPureSharingContent: false, //optional
            isSupportAV: true, //optional,
            isSupportChat: true, //optional,
            isSupportQA: true, //optional,
            isSupportCC: true, //optional,
            screenShare: false, //optional,
            rwcBackup: '', //optional,
            videoDrag: true, //optional,
            sharingMode: 'fit', //optional,
            videoHeader: false, //optional,
            isLockBottom: false, // optional,
            isSupportNonverbal: true, // optional,
            isShowJoiningErrorDialog: true, // optional,
            loginWindow: {  // optional,
              width: 400,
              height: 380
            },
            success: function () {
                ZoomMtg.join({
                    meetingNumber: ***********,
                    passWord: 'passWord',
                    userName: 'Test',
                    userEmail: 'test@test.com',
                    apiKey: 'api_key',
                    signature: 'signature',
                    success: function (res) {
                    },
                    error: function(res){console.log(res)}
                });
            },
            error: function (res) {
                console.log(reg);
            }
        });
    });
</script>

*This post has been edited to remove any meeting / webinar IDs

Hey @rschoenfeld, @bkmak,

Thanks for sharing this, can you also share how you are generating the signature?

Thanks,
Tommy

@tommy,

Below is the server-side code we use to generate the signature. Note that if we change the role variable from “0” to “1”, we are able to join the meeting as the host. It is only when the role is “0” that we receive the “Joining fail” error. This is what we see in the browser console:

{method: “join”, status: false, result: null, errorMessage: “Joining fail”, errorCode: 1}

    public string GetSignature()
    {
        string apiKey = "api_key";
        string apiSecret = "api_secret";
        string meetingNumber = "***********";
        string ts = (ToTimestamp(DateTime.UtcNow.ToUniversalTime()) - 30000).ToString();
        string role = "0";
        string token = GenerateToken(apiKey, apiSecret, meetingNumber, ts, role);
        return token;
    }

    private static long ToTimestamp(DateTime value)
    {
        long epoch = (value.Ticks - 621355968000000000) / 10000;
        return epoch;
    }	

    private static string GenerateToken(string apiKey, string apiSecret, string meetingNumber, string ts, string role)
    {
        string message = String.Format("{0}{1}{2}{3}", apiKey, meetingNumber, ts, role);
        apiSecret = apiSecret ?? "";
        var encoding = new System.Text.ASCIIEncoding();
        byte[] keyByte = encoding.GetBytes(apiSecret);
        byte[] messageBytesTest = encoding.GetBytes(message);
        string msgHashPreHmac = System.Convert.ToBase64String(messageBytesTest);
        byte[] messageBytes = encoding.GetBytes(msgHashPreHmac);
        using (var hmacsha256 = new HMACSHA256(keyByte))
        {
            byte[] hashmessage = hmacsha256.ComputeHash(messageBytes);
            string msgHash = System.Convert.ToBase64String(hashmessage);
            string token = String.Format("{0}.{1}.{2}.{3}.{4}", apiKey, meetingNumber, ts, role, msgHash);
            var tokenBytes = System.Text.Encoding.UTF8.GetBytes(token);
            return System.Convert.ToBase64String(tokenBytes).TrimEnd(_padding);
        }
    }

*This post has been edited to remove any meeting / webinar IDs

Thanks @bkmak,

It looks like the reason users could not join your meeting was because you were requiring registration.

Currently the Web SDK does not support Meeting Registration.

Thanks,
Tommy