react-native-zoom-us icon indicating copy to clipboard operation
react-native-zoom-us copied to clipboard

ERR_ZOOM_INITIALIZATION when ininitialize and joinMeeting not return anything

Open lamlengend98 opened this issue 1 year ago • 5 comments

Hi, as the title, after initializing i got ERR_ZOOM_INITIALIZATION, when I call init again I got the successfully, and then I call join meeting I did not get any error or log or something like this. I don't know what is happening

react-native-zoom-us@^6.18.1 [email protected]


  const initialize = async () => {
    try {
      if (!isInitialized) {
        const signature = sign(
          {
            sdkKey: Config.CLIENT_ID,
            iat: moment().unix(),
            exp: moment().add(2, "hour").unix(),
            mn: meetingId,
            role: "0",
          },
          Config.CLIENT_SECRET,
          { alg: "HS256" }
        );
        console.log("Config.CLIENT_ID", Config.CLIENT_ID);
        console.log("Config.CLIENT_SECRET", Config.CLIENT_SECRET);
        console.log(
          "🚀 ~ file: index.tsx:32 ~ initialize ~ signature:",
          signature
        );
        const result = await ZoomUs.initialize({
          clientKey: Config.CLIENT_ID ?? "",
          clientSecret: Config.CLIENT_SECRET ?? "",
        });
        console.log("🚀 ~ file: index.tsx:53 ~ initialize ~ result:", result);

        if (result.includes("successfully")) {
          dispatch(
            setIsInitialized({
              isInitialized: true,
            })
          );

          dispatch(
            setJwtToken({
              jwtToken: signature,
            })
          );
        }
      }
    } catch (error) {
      console.log("error", error);
    }
  };
  const joinMeeting = async (signature: string) => {
    try {
      // Join Meeting
      console.log("join", meetingId);
      await ZoomUs.joinMeeting({
        userName: userInfo.name,
        meetingNumber: meetingId,
        autoConnectAudio: true,
        zoomAccessToken: signature,
        noMeetingErrorMessage: true, // Set this to be able to show Alert.alert
      });
    } catch (error) {
      console.error("error", error);
    }
  };
image

lamlengend98 avatar Nov 21 '23 10:11 lamlengend98

Could you try with [email protected]? Note that you will need to use jwtToken because clientKey/clientSecret have been removed.

mieszko4 avatar Jan 21 '24 23:01 mieszko4

Could you try with [email protected]? Note that you will need to use jwtToken because clientKey/clientSecret have been removed.

How can I get jwtToken .

yoonpyaepyaenyein avatar Jan 22 '24 05:01 yoonpyaepyaenyein

See react-native-zoom-us-test for inspiration.

mieszko4 avatar Jan 22 '24 08:01 mieszko4

@mieszko4 I'm using [email protected] and I tried to use react-native-pure-jwt for generating jwt code, but it still display this issue Screenshot 2024-02-17 at 03 00 38

princetoad1995 avatar Feb 16 '24 20:02 princetoad1995

Yeah, this process is a bit confusing. Maybe this official doc will help you? https://developers.zoom.us/docs/meeting-sdk/auth/

mieszko4 avatar Sep 01 '24 21:09 mieszko4