# Sporadic failure to join meeting with error: FailedFromWeb, SB\_ERROR\_UNKNOWN, 200

**URL:** <https://devforum.zoom.us/t/sporadic-failure-to-join-meeting-with-error-failedfromweb-sb-error-unknown-200/80183>\
**Category:** Web\
**Created:** [December 12, 2022, 8:57pm UTC](https://devforum.zoom.us/t/sporadic-failure-to-join-meeting-with-error-failedfromweb-sb-error-unknown-200/80183 "2022-12-12T20:57:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zakakaufman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zakakaufman/32/43696_2.png) [@zakakaufman](https://devforum.zoom.us/u/zakakaufman)\
**Post date:** [December 12, 2022, 8:57pm UTC](https://devforum.zoom.us/t/sporadic-failure-to-join-meeting-with-error-failedfromweb-sb-error-unknown-200/80183/1 "2022-12-12T20:57:19Z")

</div>

**Description**  
When I try to join meetings from the web meeting SDK on my website, about 30% of the time, I get a “Joining Meeting Timeout. Fail to join the meeting.” popup. Pressing “Retry” often makes it work, but sometimes it fails multiple times in a row.

**Browser Console Error**  
No errors on the console, but when examining the websocket messages, I see two normal messages:  
“test”: “welcome to zoom”  
“status”: “ready”  
and then the third message is an error saying:  
“error\_desc”: “FailedFromWeb, SB\_ERROR\_UNKNOWN ,200”

**Which Web Meeting SDK version?**  
2.8.0

**Meeting SDK Code Snippets**

```auto
ZoomMtg.preLoadWasm();
			ZoomMtg.prepareWebSDK();
			ZoomMtg.i18n.load('en-US');
			ZoomMtg.i18n.reload('en-US');
			ZoomMtg.init({
			leaveUrl: 'livezoom?v=' + Date.now() + "&num=" + mtgnum + "&pw=" + mtgpw,
			success: (success) => {
				console.log(success)
				
				ajax( "data", "zoom-sig", { num: mtgnum, pw: mtgpw }, function( xml )
				{
					let config = emf.fromAttributes( $( xml ).find( "zoominfo" ) );
					config.success = function( success ){ console.log( success ) };
					config.error = function( error ){ console.log( error ) };
					console.log( config );
					ZoomMtg.join({
						sdkKey: config.sdkKey,
						signature: config.signature,
						meetingNumber: config.meetingNumber,
						passWord: config.passWord,
						userName: config.userName,
						success: (success) => {
							console.log(success);
							parent.postMessage( "joinedzoom" , "*" );
						},
						error: (error) => {
							console.log(error);
							location.reload();
						}
					});
				});
			},
			error: (error) => {
				console.log(error)
			}
			});

```

**Troubleshooting Routes**  
I have not found any info on this error message online, and the issue appears to happen randomly without me doing anything differently, so it is hard to find any pattern. I do notice that it happens more frequently the first time I use the web SDK on a new browser.

**Device (please complete the following information):**  
Happens on many devices, but the device I am currently testing with is

- Device: RazerBlade 15
- OS: Windows 11
- Browser: Chrome
- Browser Version: 108.0.5359.99 (Official Build) (64-bit)

**Additional context**  
Aside from this issue, the webSDK is working great, and it is a great thing to have on our website, but we really need to get to the bottom of this issue because our customers will be confused if they keep having to retry joining the meetings. Thanks!

---

<div class="post-metadata">

**Author:** ![j.schoenemeyer](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@j.schoenemeyer](https://devforum.zoom.us/u/j.schoenemeyer)\
**Post date:** [December 14, 2022, 9:43am UTC](https://devforum.zoom.us/t/sporadic-failure-to-join-meeting-with-error-failedfromweb-sb-error-unknown-200/80183/2 "2022-12-14T09:43:53Z")

</div>

check in your code (-\> creating signature), how your “iat” is defined

here is the zoom example from github

> <https://github.com/zoom/meetingsdk-sample-signature-node.js/blob/master/index.js>

---

<div class="post-metadata">

**Author:** ![zakakaufman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zakakaufman/32/43696_2.png) [@zakakaufman](https://devforum.zoom.us/u/zakakaufman)\
**Post date:** [December 14, 2022, 4:08pm UTC](https://devforum.zoom.us/t/sporadic-failure-to-join-meeting-with-error-failedfromweb-sb-error-unknown-200/80183/3 "2022-12-14T16:08:39Z")

</div>

I am using the following code to create the iat. Should be equivalent to how the example is doing it:

```auto
Long ts = ( System.currentTimeMillis() - 30000 ) / 1000;
String	iat = Long.toString( ts ),
                exp = Long.toString( ts + 10800 ), //3 hours

```

---

<div class="post-metadata">

**Author:** ![j.schoenemeyer](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@j.schoenemeyer](https://devforum.zoom.us/u/j.schoenemeyer)\
**Post date:** [December 14, 2022, 7:20pm UTC](https://devforum.zoom.us/t/sporadic-failure-to-join-meeting-with-error-failedfromweb-sb-error-unknown-200/80183/4 "2022-12-14T19:20:57Z")

</div>

very strange

“FailedFromWeb, SB\_ERROR\_UNKNOWN ,200”

nothing on google or bing - not even for “SB\_ERROR”

add

```auto
ZoomMtg.init({
    debug: true,

```

an try again

---

<div class="post-metadata">

**Author:** ![zakakaufman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zakakaufman/32/43696_2.png) [@zakakaufman](https://devforum.zoom.us/u/zakakaufman)\
**Post date:** [December 14, 2022, 8:14pm UTC](https://devforum.zoom.us/t/sporadic-failure-to-join-meeting-with-error-failedfromweb-sb-error-unknown-200/80183/5 "2022-12-14T20:14:55Z")

</div>

Yes I was surprised to find nothing when searching for this error. I just tried with debug as you suggested, and it did not seem to provide any useful information.

The only difference is that when it fails, I get a console message saying --close socket-- whereas when it succeeds I get a “createAVSocket” message. Otherwise, the consoles look the same up to that point. I would attach screenshots, but the forum won’t let me ☹

By the way, if you’d like to reproduce my issue, you can try it at this URL where I am hosting my WebSDK app: [IMACS Zoom](https://live.imacs.org/imacsadmin/p/joinzoom)

If you create a meeting using Zoom elsewhere, and then try to join that meeting with my WebApp, it fails 20-30% of the time. It seems to fail more frequently the first time you try to join, so if you are able to join successfully, try ending the meeting and restarting it before you join again from the webapp. Eventually you should get a failure.

Thank you so much for your help!

---

<div class="post-metadata">

**Author:** ![zakakaufman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zakakaufman/32/43696_2.png) [@zakakaufman](https://devforum.zoom.us/u/zakakaufman)\
**Post date:** [December 16, 2022, 3:38pm UTC](https://devforum.zoom.us/t/sporadic-failure-to-join-meeting-with-error-failedfromweb-sb-error-unknown-200/80183/6 "2022-12-16T15:38:47Z")

</div>

I think I have resolved the issue. I realized that I was not doing Base64url encoding correctly on my backend when creating the JWT. After fixing this, I haven’t seen any failures to join meetings. This was hard to debug because it only occasionally caused errors, and the zoom error was not descriptive. In case anyone else will benefit, here is how to properly implement the JWT generation for a Java Backend:

```auto
                              String sdkkey = "YourSDKKey", //Generated from Zoom SDK Website
		                            sdksecret = "YourSDKSecret"; //Generated from Zoom SDK Website

				int role = 0;

				Long ts = ( System.currentTimeMillis() - 30000 ) / 1000;

				String	iat = Long.toString( ts ),
						exp = Long.toString( ts + 10800 ), //3 hours
						header = "{\"alg\":\"HS256\",\"typ\":\"JWT\"}",
						payload = String.format( "{\"sdkKey\":\"%s\",\"mn\":\"%s\",\"role\":\"%d\",\"iat\":\"%s\",\"exp\":\"%s\",\"tokenExp\":\"%s\"}", sdkkey, mtgnum, role, iat, exp, exp ),
						headencode = "",
						payencode = "",
						msg = "",
						signature = "";

				try
				{
					Mac hasher = Mac.getInstance( "HmacSHA256" );
					hasher.init( new SecretKeySpec( sdksecret.getBytes(), "HmacSHA256") );
					headencode = java.util.Base64.getEncoder().encodeToString( header.getBytes() );
					payencode = java.util.Base64.getEncoder().encodeToString( payload.getBytes() );

					String msgtmp = headencode + "." + payencode;

					msg = msgtmp.replaceAll( "/", "_" ).replaceAll( "\\+", "-" ).replaceAll( "=", "" );

					byte[] hash = hasher.doFinal( msg.getBytes() );

					String hashencodetmp = java.util.Base64.getEncoder().encodeToString( hash );
					String hashencode = hashencodetmp.replaceAll( "/", "_" ).replaceAll( "\\+", "-" ).replaceAll( "=", "" );
					
					signature = msg + "." + hashencode;
				}
				catch ( Exception e )
				{
				}

```

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [December 28, 2022, 3:54pm UTC](https://devforum.zoom.us/t/sporadic-failure-to-join-meeting-with-error-failedfromweb-sb-error-unknown-200/80183/7 "2022-12-28T15:54:56Z")

</div>

Thanks @zakakaufman and @j.schoenemeyer for sharing this with the community!!! 🥇

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [January 28, 2023, 1:55am UTC](https://devforum.zoom.us/t/sporadic-failure-to-join-meeting-with-error-failedfromweb-sb-error-unknown-200/80183/8 "2023-01-28T01:55:33Z")

</div>

Closed on January 28, 2023, 1:55am UTC

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