# Suddenly unable to join meetings, then recovered

**URL:** <https://devforum.zoom.us/t/suddenly-unable-to-join-meetings-then-recovered/96558>\
**Category:** Meeting SDK\
**Created:** [October 11, 2023, 1:32am UTC](https://devforum.zoom.us/t/suddenly-unable-to-join-meetings-then-recovered/96558 "2023-10-11T01:32:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![msoliter](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/msoliter/32/49307_2.png) [@msoliter](https://devforum.zoom.us/u/msoliter)\
**Post date:** [October 11, 2023, 1:32am UTC](https://devforum.zoom.us/t/suddenly-unable-to-join-meetings-then-recovered/96558/1 "2023-10-11T01:32:16Z")

</div>

**Meeting SDK Type and Version**

We are running a custom client-side integration using the Web SDK, version `2.16.0`.

**Description**

On 2023/10/10 between 1-2 PM (Tokyo, GMT+9), many of our meetings were suddenly not joinable. Before 1 PM, meetings worked exactly as expected. Between 1-2 PM, joining a meeting virtually always failed with “failed to join” errors in the browser log. Sometime towards 2 PM, the exact same meetings suddenly became joinable again.

The code in question was deployed days ago to a staging environment, undergone extensive testing, and has not otherwise been touched since. I also used it _that morning_ to join events successfully, but joining failed in the previously mentioned hours, only to recover functionality, without any action on our part.

Why did our events suddenly become unjoinable, then become joinable again as usual? Should we expect this to happen periodically with the Zoom Meeting API and Web SDK?

**Error**

The log message in Chrome developer console was just that joining the meeting had failed.

**Troubleshooting Routes**

- I checked my internet connection at the time and it was stable. I was also in a non-Zoom video meeting in that time, so it wasn’t intermittently connecting/disconnecting.
- I checked the Zoom status page but no incidents or service degradation was reported in that time period.
- I had other users try to join meetings, and they also failed similarly. Everyone was able to join meetings again around the same time afterwards.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [October 11, 2023, 2:07pm UTC](https://devforum.zoom.us/t/suddenly-unable-to-join-meetings-then-recovered/96558/2 "2023-10-11T14:07:00Z")

</div>

Hi @msoliter ,

I don’t see any outages reported. I checked:

- [https://status.zoom.us/](https://status.zoom.us/)

I am going to message you for the following to check on our end:

- account id
- developer email associated with the Meeting SDK
- MSDK client id
- a few meeting ids/uuids where you observed this behavior
- any other supporting evidence you think might be helpful (i.e. screenshots, screen recording)

Thanks!

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [October 12, 2023, 4:58pm UTC](https://devforum.zoom.us/t/suddenly-unable-to-join-meetings-then-recovered/96558/4 "2023-10-12T16:58:50Z")

</div>

I saw your response in the private message. Could you please share the code for how you’re generating your signature? Sometimes we see this issue with iat and token signing.

> [@Sporadic Joining Meeting Timeout - Fail to Join Meeting - No Error Detail - Error Callback not Called](https://devforum.zoom.us/t/sporadic-joining-meeting-timeout-fail-to-join-meeting-no-error-detail-error-callback-not-called/93507/17):
>
> After a lot of testing and comparing the config for successful joins against unsuccessful joins, I discovered there was, in fact, an unreported issue with the signing token in our signature. I think this should trigger a specific error, or at least a signature error. This error and behaviour of this error was unnecessarily baffling and had us looking everywhere but the problem. If you’re working in .Net you don’t have a good option for base 64 URL encoding that zoom supports out of the box. Unf…

> [@Zoom Web SDK shows Joining Meeting Timeout. Fail to join the meeting](https://devforum.zoom.us/t/zoom-web-sdk-shows-joining-meeting-timeout-fail-to-join-the-meeting/83741/9):
>
> Hi, this is to let you all know that I have finally succeeded in implementing the SDK. The time was creating the problem. Please find the correct code below. @app.route('/meeting/\<IDP\>', methods=['GET']) def meet(IDP): ID = IDP[:IDP.index(' ')] payload = {'sdkKey': SDK\_KEY, "mn": ID, "role": 0, "iat": int(time.time()), "exp": int(time.time())+4\*3600, "tokenexp": int(time.time())+4\*3600} encoded = jwt.encode(payload, SDK\_SECRET, algorithm="HS256") return render\_template('meeting.…

---

<div class="post-metadata">

**Author:** ![msoliter](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/msoliter/32/49307_2.png) [@msoliter](https://devforum.zoom.us/u/msoliter)\
**Post date:** [October 13, 2023, 1:47am UTC](https://devforum.zoom.us/t/suddenly-unable-to-join-meetings-then-recovered/96558/5 "2023-10-13T01:47:14Z")

</div>

Sure. I am generating everything on a Go server, then just dumping the JSON as-is into the `join` method on the frontend.

The code consists of three functions. I fetch the meeting details, specifically the meeting number and password, from the database. These are represented by a `Meeting` struct. The top-level parameter generation function is as follows:

```go
func (c *zoomClient) generateParams(meeting *Meeting, name string, host bool) (any, error) {
	signature, err := c.generateSignature(meeting.Number, host)

	if err != nil {
		return nil, err
	}

	params := map[string]any{
		"sdkKey": c.config.AppClientID(),
		"signature": signature,
		"meetingNumber": meeting.Number,
		"userName": name,
		"password": meeting.Password,
	}

	if host {
		zak, err := c.getZak(meeting)

		if err != nil {
			return nil, err
		}

		params["zak"] = zak
	}

	return params, nil
}

```

A valid signature is generated as follows:

```go
func (c *zoomClient) generateSignature(meetingNumber int64, host bool) (string, error) {
	role := 0

	if host {
		role = 1
	}

	iat := math.Round(float64(time.Now().UnixMilli())/1000) - 30
	exp := iat + 60*60*2
	claims := jwt.MapClaims{
		"appKey": c.config.AppClientID(),
		"sdkKey": c.config.AppClientID(),
		"mn": meetingNumber,
		"role": role,
		"iat": iat,
		"exp": exp,
		"tokenExp": exp,
	}

	token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
	token.Header["alg"] = "HS256"
	token.Header["typ"] = "JWT"
	return token.SignedString([]byte(c.config.AppClientSecret()))
}

```

Finally, in the case of generating parameters for a host, there’s a routine for fetching the latest `zak`. The `execute` function performs the request, does some error checking, and returns a `gjson.Result`.

```go
func (c *zoomClient) getZak(meeting *Meeting) (string, error) {
	response, err := c.execute(
		"GET",
		fmt.Sprintf("/meetings/%v", meeting.Number),
		nil,
	)

	if err != nil {
		return "", err
	}

	startURL, err := url.Parse(response.Get("start_url").String())

	if err != nil {
		return "", fmt.Errorf("failed to parse Zoom meeting start_url: %v", err)
	}

	query := startURL.Query()

	if !query.Has("zak") {
		return "", fmt.Errorf("start URL did not contains a 'zak': %s", startURL)
	}

	return query.Get("zak"), nil
}

```

This has worked for joining dozens of test meetings already, and hasn’t failed since the incident on October 10th.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [October 16, 2023, 9:07pm UTC](https://devforum.zoom.us/t/suddenly-unable-to-join-meetings-then-recovered/96558/6 "2023-10-16T21:07:47Z")

</div>

Hi @msoliter ,

I am a bit puzzled here. The code that was deployed to a staging environment – was it different from what you were using before?

Were you able to confirm if your signatures for the meetings between that 1-hr block were valid?

> [@Randomly getting "Signature is invalid" error](https://devforum.zoom.us/t/randomly-getting-signature-is-invalid-error/77667):
>
> Meeting SDK Type and Version @zoomus/websdk: 2.8.0 Type: Component View Description Randomly getting “Signature is invalid” error while joining zoom meeting. But when I retries to join zoom meeting with same signature then after some retries or some time I can able to join with the same signature. I am generating signature at the server side with role = 0. Error? {type: ‘JOIN\_MEETING\_FAILED’, reason: ‘Signature is invalid.’, errorCode: 3712} Following is the signature generation code sni…

---

<div class="post-metadata">

**Author:** ![msoliter](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/msoliter/32/49307_2.png) [@msoliter](https://devforum.zoom.us/u/msoliter)\
**Post date:** [December 6, 2023, 5:40am UTC](https://devforum.zoom.us/t/suddenly-unable-to-join-meetings-then-recovered/96558/7 "2023-12-06T05:40:19Z")

</div>

Sorry, this issue resolved itself so I forgot to follow up. The thread you linked has an interesting discussion on how `Math.round` may have caused the issue. I guess if it happens again that’s where I’ll start.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [December 6, 2023, 8:17pm UTC](https://devforum.zoom.us/t/suddenly-unable-to-join-meetings-then-recovered/96558/8 "2023-12-06T20:17:29Z")

</div>

Glad it’s resolved @msoliter and that the linked thread was helpful 🙂
