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

**URL:** <https://devforum.zoom.us/t/cannot-read-property-error-of-undefined-when-trying-to-generatesignature/39252>\
**Category:** Web\
**Created:** [December 27, 2020, 5:18pm UTC](https://devforum.zoom.us/t/cannot-read-property-error-of-undefined-when-trying-to-generatesignature/39252 "2020-12-27T17:18:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Safwen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/safwen/32/20416_2.png) [@Safwen](https://devforum.zoom.us/u/Safwen)\
**Post date:** [December 27, 2020, 5:18pm UTC](https://devforum.zoom.us/t/cannot-read-property-error-of-undefined-when-trying-to-generatesignature/39252/1 "2020-12-27T17:18:04Z")

</div>

**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

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [December 28, 2020, 6:34pm UTC](https://devforum.zoom.us/t/cannot-read-property-error-of-undefined-when-trying-to-generatesignature/39252/2 "2020-12-28T18:34:13Z")

</div>

Hey @Safwen,

I think my post here will help you out:

> [@Window undefined with 1.8.5](https://devforum.zoom.us/t/window-undefined-with-1-8-5/39247/2):
>
> Hey @Safwen, Can you please provide steps to reproduce the issue? I am not seeing this issue when testing on my end. If you are using React, you can see the Web SDK React Sample App here: Thanks, Tommy

Let me know if you have any additional issues! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [January 28, 2021, 4:34am UTC](https://devforum.zoom.us/t/cannot-read-property-error-of-undefined-when-trying-to-generatesignature/39252/3 "2021-01-28T04:34:22Z")

</div>

Closed on January 28, 2021, 4:34am UTC

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