Subchapter 150.20
troubleshooting/common-issues.mdMarkdown7 KBView on GitHub
| Likely Cause |
|---|
| Solution |
|---|
| Callbacks don’t fire | Missing message loop | Windows Message Loop |
| Build errors | Include order / missing headers | Build Errors |
| Abstract class error | Missing delegate methods | Delegate Methods |
| Video subscribe fails | Subscribing too early | Subscribe in onUserVideoStatusChanged |
| Error code 2 | Video not ready | Wait for status.isOn == true |
| Error code 8 | Too frequent calls | Add Sleep(200) between calls |
| DLL not found | DLLs not copied | Copy SDK bin\ to output |
| Code | Name | Description | Solution |
|---|---|---|---|
| 0 | Success | Operation succeeded | - |
| 1 | Wrong_Usage | API called incorrectly | Check API documentation |
| 2 | Internal_Error | SDK internal error | Often: video not ready yet |
| 3 | Uninitialize | SDK not initialized | Call initialize() first |
| 4 | Memory_Error | Memory allocation failed | Check system resources |
| 5 | Load_Module_Error | Failed to load DLL | Check DLLs are present |
| 6 | UnLoad_Module_Error | Failed to unload DLL | - |
| 7 | Invalid_Parameter | Bad parameter | Check NULL pointers, HWNDs |
| 8 | Call_Too_Frequently | API called too often | Add Sleep(200) |
| 9 | No_Impl | Feature not implemented | - |
| 10 | Dont_Support_Feature | Feature not supported | Check SDK version |
| 100 | Unknown | Unknown error | Check logs |
| Code | Name | Solution |
|---|---|---|
| 1001 | Auth_Error | Check JWT token |
| 1002 | Auth_Empty_Key_or_Secret | Provide credentials |
| 1003 | Auth_Wrong_Key_or_Secret | Verify credentials |
| 1004 | Auth_DoesNot_Support_SDK | Check SDK version |
| 1005 | Auth_Disable_SDK | Contact Zoom support |
| Code | Name | Solution |
|---|---|---|
| 3001 | Session_Join_Failed | Check session name/token |
| 3002 | Session_No_Rights | Check permissions |
| 3003 | Session_Already_In_Progress | Leave first |
| 3005 | Session_Reconnecting | Wait for reconnect |
| 3008 | Session_Need_Password | Provide password |
| 3009 | Session_Password_Wrong | Check password |
When onVideoCanvasSubscribeFail fires:
| Code | Reason | Solution |
|---|---|---|
| 0 | None | - |
| 1 | HasSubscribe1080POr720P | Already have HD subscription |
| 2 | HasSubscribeTwo720P | Max 2x 720p |
| 3 | HasSubscribeExceededLimit | Too many subscriptions |
| 4 | HasSubscribeTwoShare | Max 2 share subscriptions |
| 5 | HasSubscribeVideo1080POr720PAndOneShare | Combined limit |
| 6 | TooFrequentCall | Add Sleep(200) |
Cause: Missing Windows message loop
Fix:
while (!done) {
MSG msg;
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Sleep(10);
}Cause: Invalid JWT token or session name
Fix:
Cause: Video not ready when subscribing
Fix: Subscribe in onUserVideoStatusChanged, not onUserJoin:
void onUserVideoStatusChanged(..., userList) override {
for (auto user : userList) {
if (user->GetVideoPipe()->getVideoStatus().isOn) {
user->GetVideoCanvas()->subscribeWithView(hwnd, ...);
}
}
}Causes:
Fixes:
// 1. Start your camera
sdk->getVideoHelper()->startVideo();
// 2. Verify HWND is valid and visible
HWND hwnd = CreateWindow(...);
ShowWindow(hwnd, SW_SHOW);
// 3. Check subscribe return value
ZoomVideoSDKErrors err = canvas->subscribeWithView(hwnd, ...);
if (err != ZoomVideoSDKErrors_Success) {
std::cout << "Subscribe failed: " << err << std::endl;
}Cause: Calling subscribe too frequently
Fix: Add delay between subscribe calls:
canvas->subscribeWithView(hwnd1, ...);
Sleep(200); // Add delay
canvas->subscribeWithView(hwnd2, ...);Cause: Audio not connected
Fix: Connect audio in onSessionJoin:
void onSessionJoin() override {
sdk->getAudioHelper()->startAudio();
}Also ensure audioOption.connect = false during join:
context.audioOption.connect = false; // Connect in callbackCause: Trying to control audio before connected
Fix: Wait for audio to be connected:
void onUserAudioStatusChanged(...) override {
if (user->getAudioStatus().isAudioConnected) {
// Now safe to mute/unmute
}
}Cause: Not all delegate methods implemented
Fix: Implement ALL 80+ methods:
class MyDelegate : public IZoomVideoSDKDelegate {
void onSessionJoin() override { }
void onSessionLeave() override { }
void onError(ZoomVideoSDKErrors, int) override { }
// ... all 80+ methods
};See Delegate Methods.
Cause: sdk.lib not linked
Fix: Add to linker settings:
$(SolutionDir)SDK\libsdk.libCause: SDK DLLs not in executable directory
Fix: Copy all DLLs from SDK\bin\ to output directory.
Post-Build Event:
xcopy /Y /D "$(SolutionDir)SDK\bin\*.*" "$(OutDir)"Cause: Cleanup order incorrect
Fix: Proper cleanup sequence:
void Cleanup() {
// 1. Leave session first
if (sdk->isInSession()) {
sdk->leaveSession(false);
}
// 2. Wait for onSessionLeave callback
// (process messages while waiting)
// 3. Cleanup SDK
sdk->cleanup();
// 4. Destroy SDK object
DestroyZoomVideoSDKObj();
}Enable SDK logging for debugging:
ZoomVideoSDKInitParams params;
params.enableLog = true;
params.logFilePrefix = L"zoom_video_sdk";Logs are written to: %APPDATA%\ZoomVideoSDK\logs\
Quick fixes:
onUserVideoStatusChangedSleep(200) between calls