mieszko4 / react-native-zoom-us

MIT License
126 stars 118 forks source link

ERR_ZOOM_INITIALIZATION when ininitialize and joinMeeting not return anything #321

Open lamlengend98 opened 12 months ago

lamlengend98 commented 12 months ago

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 react-native@0.69.3


  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
mieszko4 commented 9 months ago

Could you try with react-native-zoom-us@6.20.0? Note that you will need to use jwtToken because clientKey/clientSecret have been removed.

yoonpyaepyaenyein commented 9 months ago

Could you try with react-native-zoom-us@6.20.0? Note that you will need to use jwtToken because clientKey/clientSecret have been removed.

How can I get jwtToken .

mieszko4 commented 9 months ago

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

princetoad1995 commented 9 months ago

@mieszko4 I'm using react-native-zoom-us@6.20.0 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

mieszko4 commented 2 months ago

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