Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault on onInMeeting_() call #8

Open
FStupar opened this issue Apr 16, 2024 · 11 comments
Open

Segmentation fault on onInMeeting_() call #8

FStupar opened this issue Apr 16, 2024 · 11 comments

Comments

@FStupar
Copy link

FStupar commented Apr 16, 2024

Used Ubuntu Dockerfile,
Built with newest SDK, added necessary tokens and information.
The bot joins the meeting, but as soon as it's admitted it throws a segmentation fault.
Managed to narrow it down to the onInMeeting_() call that happens in
MeetingServiceEventListener::onMeetingStatusChanged once the status is MEETING_STATUS_INMEETING

Any help would be appreciated.

@tanchunsiong
Copy link
Collaborator

@FStupar you are on 5.17.11?

@FStupar
Copy link
Author

FStupar commented Apr 16, 2024

@tanchunsiong yes, latest linux build, 5.17.11

@tanchunsiong
Copy link
Collaborator

@FStupar I've just tested it and it works fine. You are using the dockerfile right?
Is your host on macOS or PC?
Please check the config.txt, make sure it is populated with the correct meeting number, password and JWT token

@FStupar
Copy link
Author

FStupar commented Apr 16, 2024

@tanchunsiong
Yep, Dockerfile dor Ubuntu, not changed in any way, fully populated config.txt, correct meeting number password and jwt.

The bot manages to connect to the meeting just fine, the segmentation fault happens right after that, when calling the onInMeeting_ from the MeetingServiceEventListener

to be precise, segmentation fault occurs right when the onInMeeting_ is called.

EDIT::
The host was originally macOS then we migrated the build process to gitlab and ran the code on PC as well

@tanchunsiong
Copy link
Collaborator

@FStupar has the code been changed?

onInMeeting_ invokes back a method in the main thread. If you are missing the method, or if it is nullptr, you might get the seg fault.

@uro-sh
Copy link

uro-sh commented Apr 17, 2024

@tanchunsiong I had the same problem, and by some additional debugging, I have figured out the segmentation fault happens on the line 137:

SDKError err2 = m_pMeetingService->GetMeetingRecordingController()->CanStartRawRecording();

Even when I comment the line, and assume the recording rights are there, I got the segmentation fault on the line 140:
SDKError err1 = m_pRecordController->StartRawRecording();

Do you have any idea why those SDK methods cannot be invoked?
Also, one more nuance: my config.txt file do not contain recording_token. Is it mandatory for basic recording or not? (I assumed not according you the readme file provided).

@uro-sh
Copy link

uro-sh commented Apr 18, 2024

@tanchunsiong Ok, with the latest version of SDK (just released), the seg fault is not there anymore, but I am having the SDKError 12 ("Cannot start raw recording: no permissions yet, need host, co-host, or recording privilege") even though I have allowed all participants to start recording local files (see image attached).

Screenshot 2024-04-18 at 13 06 33

Do I now need to generate "recording_token" for that?

@tanchunsiong
Copy link
Collaborator

@uro-sh that error is a bit odd, possibly that m_pMeetingService->GetMeetingRecordingController() is throwing nullptr

For the no permission issue, the host can be prompted to provide permission (recommended way).
Recording token requires you to get permission the admin of the meeting which you are joining, to fetch the token prior to joining the meeting.

This is the specific token which is necessary
https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetingLocalRecordingJoinToken

@uro-sh
Copy link

uro-sh commented Apr 18, 2024

@tanchunsiong It is not throwing nullptr, I have checked it. Also, I am able to quickly after the bot joins the meeting click on Participants -> Select the bot -> Click More... -> Select "Allow local recording", and the recording process started and was successful (the PCM file was generated, since only audio part is recorded). But without allowing that option manually the bot cannot start recording.

Is there a code example for prompting for the permission (the recommended way)?

@tanchunsiong
Copy link
Collaborator

@uro-sh , this is code for Windows, but it should be almost identical to Linux

IMeetingRecordingController* m_pRecordController = meetingService->GetMeetingRecordingController();
m_pRecordController->RequestLocalRecordingPrivilege();

@uro-sh
Copy link

uro-sh commented Apr 18, 2024

@tanchunsiong Thank you, that worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants