# C# sdk demo SDKERR\_VIDEO\_NOTREADY

**URL:** <https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470>\
**Category:** Windows\
**Created:** [June 15, 2021, 9:48am UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470 "2021-06-15T09:48:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takabrycheri](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@Takabrycheri](https://devforum.zoom.us/u/Takabrycheri)\
**Post date:** [June 15, 2021, 9:48am UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/1 "2021-06-15T09:48:01Z")

</div>

**Description**  
When I try to auth into the C# SDK demo it returns SDKERR\_VIDEO\_NOTREADY

**Which Desktop Client SDK version?**  
zoom-c-sharp-wrapper-5.5.12511.0422

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Run the demo
2. Authenticate with the jwt token
3. Get the SDKERR\_VIDEO\_NOTREADY
4. The auth window reappears without going further

**Device (please complete the following information):**

- Device: Multiple desktop/laptop
- OS: Windows 10 19043.1052

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [June 16, 2021, 6:36pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/2 "2021-06-16T18:36:59Z")

</div>

Hey @Takabrycheri,

Thanks for using the dev forum!

Using the same JWT, are you seeing this error in the C++ demo as well?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![Takabrycheri](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@Takabrycheri](https://devforum.zoom.us/u/Takabrycheri)\
**Post date:** [June 16, 2021, 7:50pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/3 "2021-06-16T19:50:36Z")

</div>

Hi @Michael_Condon,  
honestly i tried but i failed because i had other errors with visual studio and then i didn’t try anymore.

I can’t even compile it to run it…

Also in the C++ template many files are in different folders and therefore many files cannot find them, it took me about ten minutes to change all the includes

---

<div class="post-metadata">

**Author:** ![roland.oldenburg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/roland.oldenburg/32/19920_2.png) [@roland.oldenburg](https://devforum.zoom.us/u/roland.oldenburg)\
**Post date:** [June 21, 2021, 6:00pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/4 "2021-06-21T18:00:07Z")

</div>

Hi all,

I recognized the same problem, but in fact it is simply error code 11 which usually means “Video-Not-Ready”, but that of course makes no sense when authorizing the SDK.

The call to **authService.SDKAuth(new AuthContext { jwt\_token = token }));** probably returns another **kind** of error code.

In any case it is numerical 11. Which means… what?  
Can anybody from Zoom clarify on this?

Thanks

---

<div class="post-metadata">

**Author:** ![roland.oldenburg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/roland.oldenburg/32/19920_2.png) [@roland.oldenburg](https://devforum.zoom.us/u/roland.oldenburg)\
**Post date:** [June 21, 2021, 6:01pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/5 "2021-06-21T18:01:09Z")

</div>

Ah, and it does not always happen. More often on slow machines as it seems… So maybe a race condition? Maybe related to garbage collection in c#?

---

<div class="post-metadata">

**Author:** ![roland.oldenburg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/roland.oldenburg/32/19920_2.png) [@roland.oldenburg](https://devforum.zoom.us/u/roland.oldenburg)\
**Post date:** [June 21, 2021, 6:01pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/6 "2021-06-21T18:01:42Z")

</div>

And it does NOT only happen in the demo app. Also in custom app using the sdk.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [June 21, 2021, 7:28pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/7 "2021-06-21T19:28:43Z")

</div>

Hey @roland.oldenburg,

Since Zoom does not actively maintain the C# wrapper, developer support is very limited there. If this can be reproduced in C++ we will be able to assist you.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![andrez](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@andrez](https://devforum.zoom.us/u/andrez)\
**Post date:** [June 22, 2021, 8:23am UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/8 "2021-06-22T08:23:14Z")

</div>

I also have this problem with the C# wrapper sometimes. I understand your policy about limited support for it.

Then please advice what error code 11 is, so I can debug it myself. According to documentation ([https://marketplace.zoom.us/docs/sdk/native-sdks/windows/resource/error-codes#12-authentication-error](https://marketplace.zoom.us/docs/sdk/native-sdks/windows/resource/error-codes#12-authentication-error)) valid return codes for authentication are only 0-7 but the SDK DLLs return 11. There is no documentation about this behavior. This 11 is returned by native SDK not by wrapper.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [June 22, 2021, 10:36pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/9 "2021-06-22T22:36:19Z")

</div>

Hey @andrez,

That error code usually means that the video module of the SDK has not been initialized properly. This can be caused by improper linking/importing of the SDK DLL’s.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![andrez](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@andrez](https://devforum.zoom.us/u/andrez)\
**Post date:** [June 23, 2021, 9:39am UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/10 "2021-06-23T09:39:15Z")

</div>

Actually it is a misunderstanding of the original thread opener that error code 11 in context of authentication is related to the video module.

But I found the meaning of error code 11 in context of authentication. The recent C++ SDK updated the AuthResult enumeration.

Meaning is:

> AUTHRET\_JWTTOKENWRONG, ///\<The jwt token to authenticate is wrong.

Is there any way the community can contribute bug fixes to the C# wrapper?

We can assume that this behavior is a bug in the C# wrapper.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [June 23, 2021, 7:52pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/11 "2021-06-23T19:52:05Z")

</div>

Hey @andrez,

Ah I see, that makes sense 🙂

The AUTHRET\_JWTTOKENWRONG is usually not a bug with the SDK or wrapper. JWT’s are really tricky to get right. Usually, there is a mistake in the payload used to generate the JWT.

> [@andrez](#):
>
> Is there any way the community can contribute bug fixes to the C# wrapper?

We are in the process of making the C# more community-driven for the future, but at this time it can only be modified locally.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![roland.oldenburg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/roland.oldenburg/32/19920_2.png) [@roland.oldenburg](https://devforum.zoom.us/u/roland.oldenburg)\
**Post date:** [July 6, 2021, 6:09pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/12 "2021-07-06T18:09:05Z")

</div>

Hi there @Michael_Condon, @andrez,  
I just did some further testing on the affected machine.  
And I have proof now, that this is caused by the c# SDK wrapper!

I started my app on the affected machine and made it dump the “problematic” token. I then copied the string and started the c+±SDK-Demo-App and pasted it there. SDK auth worked perfectly fine.

So: The EXACT SAME TOKEN works in the c+±demo-app but not using the c#-sdk-wrapper.

Oh and I used the very same executable and deps (even copied the whole directory) that are working fine on my machine. I even tried out the VERY SAME token on my machine using the same app/executable. Worked.

So my guess is: There is something harmful happening to the token string when passed into native/c++ part. And it must be something like a race condition or so as it does not happen on every machine. Andre even wrote to me about cases where he could stop it “breaking” when using a debugger. So maybe an early firing garbage collection? Lost references to the string and therefore “freed” to early? Maybe an encoding thing? (System language dependent…?)

---

<div class="post-metadata">

**Author:** ![roland.oldenburg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/roland.oldenburg/32/19920_2.png) [@roland.oldenburg](https://devforum.zoom.us/u/roland.oldenburg)\
**Post date:** [July 6, 2021, 6:18pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/13 "2021-07-06T18:18:33Z")

</div>

P.S. As you guys are using `PtrToStringChars` maybe it is something like this: [string - pin\_ptr & PtrToStringChars vs. StringToHGlobalAnsi: Why does PtrToStringChars var loose its value? - Stack Overflow](https://stackoverflow.com/questions/18789886/pin-ptr-ptrtostringchars-vs-stringtohglobalansi-why-does-ptrtostringchars-va)

Or maybe there is a problem when converting from UTF to ANSI…? This here indicates that `StringToHGlobalAnsi` would be the better choice: [Convert from System String to Char - C# | Microsoft Docs](https://docs.microsoft.com/en-us/troubleshoot/dotnet/csharp/convert-systemstring-char)

---

<div class="post-metadata">

**Author:** ![Takabrycheri](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@Takabrycheri](https://devforum.zoom.us/u/Takabrycheri)\
**Post date:** [July 7, 2021, 7:12am UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/14 "2021-07-07T07:12:27Z")

</div>

Hi there,  
to be honest I don’t know what changed, maybe I’ve failed creating JWT token without notice it but now seems working fine, it also join meeting without problems.

Maybe I try it for a few days on different machines before confirming that it actually works, considering what @roland.oldenburg said.

Thanks anyway for the help, I will keep you updated 🙂

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [July 7, 2021, 7:25pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/15 "2021-07-07T19:25:29Z")

</div>

Hey @roland.oldenburg,

Are you waiting for the initialization to finish before calling SDKAuth? Can you provide your code?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![roland.oldenburg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/roland.oldenburg/32/19920_2.png) [@roland.oldenburg](https://devforum.zoom.us/u/roland.oldenburg)\
**Post date:** [July 7, 2021, 8:47pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/16 "2021-07-07T20:47:39Z")

</div>

That may be it!!! I will check for that…

---

<div class="post-metadata">

**Author:** ![roland.oldenburg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/roland.oldenburg/32/19920_2.png) [@roland.oldenburg](https://devforum.zoom.us/u/roland.oldenburg)\
**Post date:** [July 7, 2021, 8:57pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/17 "2021-07-07T20:57:29Z")

</div>

Ok. Checked it. Does not seem to be it.  
Cannot provide the Code, sorry.

Still: I am a little confused. How am I supposed to wait for “initialization to finish”?  
I mean, I am calling synchronously `CZoomSDKeDotNetWrap.Instance.Initialize(initParam))`  
and I am checking, that the result is `SDKError.SDKERR_SUCCESS`  
All that is done in UI Thread.

Is there anything else I am supposed to do before calling `CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(..)`?

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [July 7, 2021, 9:15pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/18 "2021-07-07T21:15:26Z")

</div>

Hey @roland.oldenburg,

If you are checking the return value of initialize, then synchronously calling sdkAuth you should be ok. Have you provided a valid web domain?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![roland.oldenburg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/roland.oldenburg/32/19920_2.png) [@roland.oldenburg](https://devforum.zoom.us/u/roland.oldenburg)\
**Post date:** [July 7, 2021, 9:43pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/19 "2021-07-07T21:43:48Z")

</div>

Of course.  
h t t p s : // zoom . us

Really, literally, as said: It is the **same code** with the **same JWT** , behaving different in the c# code on two different machines. One fails with Auth 11. The other is successful.

And the JWT itself is fine as the c++ sdk demo accepts it and successfully authenticates SDK on the “failing” machine. So JWT token works on both machines. But one is failing with it when using c# wrapper.

Ah. And thanks as well. 🙂

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [July 8, 2021, 8:01pm UTC](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470/20 "2021-07-08T20:01:36Z")

</div>

Hey @roland.oldenburg,

Can you set the demo app to Release and x86, in the actual wrapper solution clean and build, then clean and build the demo app?

Thanks!  
Michael

[Next page](https://devforum.zoom.us/t/c-sdk-demo-sdkerr-video-notready/52470.md?page=2)
