Cannot read property 'error' of undefined when trying to generateSignature

Description
this is my code inside a useEffect react component

      ZoomMtg.setZoomJSLib("https://source.zoom.us/1.8.5/lib", "/av");
      ZoomMtg.preLoadWasm();
      ZoomMtg.prepareJssdk();
try {
  ZoomMtg.generateSignature({
    apiKey: zoomConfig.apiKey,
    apiSecret: zoomConfig.apiSecret,
    meetingNumber: zoomConfig.meetingNumber,
    role: zoomConfig.role,
    success: function (res) {
      console.log("res", res);
    },
  });
} catch (error) {
  console.log(error,"ERROR")
  
}

Error
Cannot read property ‘error’ of undefined when trying to generateSignature

Which version?
1.8.5

Hey @Safwen,

I think my post here will help you out:

Let me know if you have any additional issues! :slight_smile:

Thanks,
Tommy