Error initializing SDK

I installed the video sdk about a year ago. I delayed upgrading to the newest version of the sdk a few months ago because of the significant changes that were made in your sdk that would have required me to invest time to refactor my code. But up until about a month ago my app stil worked with the older sdk. I haven’t used the video meeting part of my app for about a month. But today when I attempted to use it, the initialization of the sdk failed with an error code of 7.

I spent some time reading up on the Zoom docs to see if anything on your backend changed that would prevent the older sdk from working. One thing I noticed was that the jwt token is suppose to include a role_type field but the documenation states that this is only for sdk versions 1.2.0 and newer. This is where things have started to get very confusing. First, I wasn’t even sure anymore what version my sdk even was. I also went to my Zoom project’s page and noticed that the current Android sdk version is v5.9.6.4777. There isn’t even a version 1.2.0 listed. I can hardly imagine that even within one year, the versions went from 1.x to 5.9. Please clarify why I’m seeing this.

I decided to download the v5.9.6.4777 sdk and run the app. In the past I did this with only minor issues getting the jwt token correct. I also made sure to add the role_type field to the jwt token. This is what my token looks like:

{
  "alg": "HS256",
  "typ": "JWT"
}

{
  "app_key": "2VfZYxxxxxxxxx",
  "exp": 1646337547,
  "iat": 1646323147,
  "role_type": 1,
  "tpc": "oyW8n1EZriIOdP9f",
  "user_identity": "SqEDUAMprS7vqz9P_",
  "version": 1
}

I’ve used this format previously excluding the role_type and it worked, so there is really nothing wrong with this token. Using the sample app from the sdk, I get an error code of 1 (“Wrong usage of the interface”). I have no idea what the issue can be.

Another issue that contributes to this confusion is that I have two Zoom app types: jwt and sdk. I actually only use the jwt as my backend is responsible for generating the jwt tokens and forwarding to the Android app. However, it is very confusing from your documentation when it states to download the Android sdk which is only available under the “sdk” type. The “jwt” type does not have anything to download, yet under this project the api key and secret are defined. But under the “sdk” project, you refer to this as “sdk key” and “secret”. But the documentation for installing and running the sample app only use the jwt token. There is no mention in the documentation about using a “sdk key”. You need to provide better documentation on this. If the “sdk key” is suppose to be used somewhere, you need to indicate where and under what conditions. As mentioned, I was using the “api key” and secret up until now and that worked.

The following are my development settings:

Android Studio Android Studio Bumblebee | 2021.1.1 Patch 2
Device: Pixel 2 XL running Android 11

I also had to fix up your build.gradle files as the demo app would not compile.

Project’s build.gradle

buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.2'
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

Sample module’s build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion = 31
    buildToolsVersion = "31.0.0"

    defaultConfig {
        applicationId "us.zoom.sdkexample"
        minSdkVersion 21
        targetSdkVersion 31
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true

//        ndk {
//            abiFilters "arm64-v8a"
//        }
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
        }

        debug {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
        }

    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }
}

dependencies {
    //for demo
    implementation 'androidx.recyclerview:recyclerview:1.0.0'

    implementation project(':commonlib')
    implementation project(':mobilertc')

}

Note that I also upgraded to Java 11 and am using SDK 31 for Android (not 30 as your sample originally used)

Hi @AndroidDev,

Based on the version you are using, it looks like you may have downloaded the Meeting SDK. The latest version of the Video SDK is 1.2.1. The developer account associated with your Video SDK credentials will not be the same account that you have a Meeting SDK app on, as both cannot exist on the same account. Can you please try switching over to your Video SDK account and downloading the correct SDK and see which issues (if any) are resolved?

Thanks!

It turned out that I have two accounts. The Video SDK was not available under the account that I am using to post this comment with. I’ve switched over to the other account. I believe that these two accounts were a result of a previous issue where you had to create a new account to use the SDK if you already signed up before that using the Client SDK.

To avoid this problem from repeating in the future, I would like to use this forum with the account I am using for the Video SDK. But this appears impossible. If I sign in with the account used for the Video SDK and then attempt to navigate to this forum, I am presented with a web page that states:

You cannot authorize Zoom Developer Forum Log-in Helper

Here’s an image:

I am then told to contact the App Market support. There is clearly no way of actually contacting them. I remember in the past that Zoom had an app called “Log-in Helper” that I could install. But this app no longer appears available if I search for it.

How can I sign in with my Video SDK account and then use this forum with that account?

Hi @AndroidDev,

You are correctly seeing that your Video SDK account unfortunately cannot be used to sign into the dev forum. This is because authentication is done through Zoom OAuth, which does not exist for Video SDK accounts. We completely understand that it is not ideal to require you to use a separate account to post to the dev forum and apologize for the inconvenience. Hopefully we will be able to improve the UX here in the future.

Thanks!

thanks for the awesome information.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.