Problems running the `linux_raw_recording_sample`

Meeting SDK Type and Version
Linux - v6.1.1.493 (latest at time of writing)

Description
I am trying out the Linux headless recording/playing example as I am trying to build an app to run arbitrary video (audio not necessary) through Zoom meetings. I build and compile the project successfully and can run it, but I get some error messages (see below) and nothing happens afterwards (note that the program doesn’t crash or exit). I have the config.txt values such that the program tries to join a meeting in progress and only the SendVideoRawData option is enabled:

token: REDACTED
meeting_number: REDACTED
meeting_password: REDACTED
GetVideoRawData: "false"
GetAudioRawData: "false"
SendVideoRawData: "true"
SendAudioRawData: "false"

I am running this on Debian GNU/Linux 11 (bullseye). The only lines that I changed in the actual .cpp are in meeting_sdk_demo.cpp and that was only the video filename and commenting out the following lines (they were not compiling and I don’t need recording, so I figured I would just cut them :slight_smile: ):

	// Set the event listener for recording privilege status
	//m_pRecordController = m_pMeetingService->GetMeetingRecordingController();
	//m_pRecordController->SetEvent(new MeetingRecordingCtrlEventListener(&onIsGivenRecordingPermission));

Is this an issue with my dependencies, config, or something else?

Error?

tom@data-zoom-testing-tom:~/meetingsdk-linux-raw-recording-sample/demo/bin$ ./meetingSDKDemo
getpath
self path: /home/tom/meetingsdk-linux-raw-recording-sample/demo/bin
Readfile success.
Reading..token: REDACTED
Reading..meeting_number: REDACTED
Reading..meeting_password: REDACTED
Reading..GetVideoRawData: "false"
Reading..GetAudioRawData: "false"
Reading..SendVideoRawData: "true"
Reading..SendAudioRawData: "false"
Meeting Number: REDACTED
Token: REDACTED
meeting_password: REDACTED
GetVideoRawData before parsing is : false
GetVideoRawData: 0
GetAudioRawData before parsing is : false
GetAudioRawData: 0
SendVideoRawData before parsing is : true
SendVideoRawData: 1
SendAudioRawData before parsing is : false
SendAudioRawData: 0
directory of config file: /home/tom/meetingsdk-linux-raw-recording-sample/demo/bin/config.txt
Init meetingSdk:success
AuthService created.
AuthServiceEventListener added.
AuthSDK:token extracted from config file REDACTED
ALSA lib control.c:1471:(snd_ctl_open_noupdate) Invalid CTL
ALSA lib control.c:1471:(snd_ctl_open_noupdate) Invalid CTL
ALSA lib control.c:1471:(snd_ctl_open_noupdate) Invalid CTL
ALSA lib control.c:1471:(snd_ctl_open_noupdate) Invalid CTL
ALSA lib control.c:1471:(snd_ctl_open_noupdate) Invalid CTL
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM
ALSA lib control.c:1471:(snd_ctl_open_noupdate) Invalid CTL
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM

Apologies for double-posting, but I’ve solved (part of) my own problem! I created a default ~/.config/zoomus.conf and that suppressed the errors that I was seeing. However, the program still hangs and doesn’t join the meeting. It gets to the line AuthSDK:token extracted from config file REDACTED and nothing else happens. Could this be a problem with my jwt token?

EDIT: I checked on the actual result of the call to SDKAuth(param) with:

if (ZOOM_SDK_NAMESPACE::SDKERR_SUCCESS != sdkErrorResult){
	std::cerr << "AuthSDK:error " << std::endl;
    std::cerr << sdkErrorResult << std::endl;
} else {
	std::cerr << "AuthSDK:send success, awaiting callback " << std::endl;
}

Which gets me: AuthSDK:error 15 which corresponds to SDKERR_INTERNAL_ERROR according to the SDK docs. To me, this looks like a problem with some initialization or maybe how param is created and not with the JWT itself (unless there is some parsing that it isn’t getting past inside the SDK). Any ideas? @chunsiong.zoom I noticed you maintained the example repo so you might have an idea. Thank you so much in advance :pray:

How are you making the JWT token? It could be that the JWT is not being parsed correctly because it doesn’t have the right format.

@thomas can you share a sample of your JWT token?

Here is a token that I generated earlier: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBLZXkiOiI0aGVFdHRYU1JNNllVQl8zT0R6YW5BIiwiZXhwIjoxNzIxNzY4NDM1LCJpYXQiOjE3MjE2ODIyMjV9.p-jyo4u_kHHezGgRHJysc6LurUIiSo5vPQxn6qxsspM. This was generated with the header: { "alg": "HS256", "typ": "JWT" } and payload:

{
"appKey": "CLIENT_ID",
"role": 0,
"exp": 1721768435,
"iat": 1721682225
}

and was signed with my client secret.

EDIT: :man_facepalming: I double checked the reqs for the JWT and saw I was missing tokenExp. Apologies and thanks for your responses.

Yes. Also, if the problem persists, do not include the role parameter.