Description
I have initialized the SDK, created sessionContext, and joinSession always return NULL.
I looked in joinsession-always-returns-null/46977 forum post to ensure I don’t repeat those issues.
I have written up a little tutorial about this here: “auth sdk failed” when running zoom sdk demo - #7 by Michael_Condon
This is technically about the Client SDK but the steps are the same aside from the actually payload.
Can you take a look at this and use the Video SDK payload to see if you can successfully created a “dummy” JWT?
@Michael_Condon I followed the tutorial that you are referring to. when I followed those steps, I was able to auth App built using client SDK. However, when I followed those instructions doesn’t work for Video SDK. I am also not sure which is the right payload structure…
The tutorial says
{
"app_key": "SDK_KEY",
"version": 1,
"user_identity": "User ID",
"iat": 0, //Provide the current timestamp as the value of this field.
"exp": 0, //Timestamp expiration date (Max: 2 days) in epoch format.
"tpc": "Session name, cannot be empty (Max: 200 characters)"
}
The error code returned is 7 ( ZoomInstantSDKErrors_Invalid_Parameter). how do I get more details on which parameters are wrong?
The payload contains the “tpc” field is the correct one for the Video SDK. I took a look at your code, is initializeSDK being called before JoinSession? I am guessing that there is a race condition between your joinSession call and the SDK initializing.
I looked at your code and there is a race condition between initializing the SDK and calling joinSession(). Your application is initializing the SDK successfully, however it isn’t waiting to attempt to join the session. In your main function your are initializing the exampleListener and then immediately attempting to join the session. Try moving your call to joinSession into the success part of your initialization.
To see what I am talking about, set a breakpoint on the line in your main function that calls join session and then run. The output will only show “Hello world” meaning that join session is called before the SDK has finished initializing.
I did try as you suggested and I am still running in the same issue. here is the code at a high level.
// InitializeSDK()
ZoomInstantSDKInitParams initParams
m_pInstantSDK = CreateZoomInstantSDKObj();
int returnVal = m_pInstantSDK->initialize(initParams);
In side the success part, JoinSession function called.
The JoinSession code includes
ZoomInstantSDKSessionContext sessionContext
// initialized the sessionContext elements.
IZoomInstantSDKSession* pSession = m_pInstantSDK->joinSession(sessionContext);
Every step of the code I have printfs to make sure the code is executed as expected. The print out is
CreateZoomInstantSDKObj done
m_pInstantSDK initialzie is success
sessonContext elements are initialized
JoinSession failed
Error code returned - 7.
I also tried by adding 1 to 5 seconds delay in the code after initialize.
Every time, I run in to the same problem. I hope this helps. Happy to share more details to help root cause the issue.