# Zoom Web sdk worked in local but not working in production

**URL:** <https://devforum.zoom.us/t/zoom-web-sdk-worked-in-local-but-not-working-in-production/15516>\
**Category:** Web\
**Created:** [April 29, 2020, 11:59pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-worked-in-local-but-not-working-in-production/15516 "2020-04-29T23:59:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![taushifali](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/taushifali/32/2065_2.png) [@taushifali](https://devforum.zoom.us/u/taushifali)\
**Post date:** [April 29, 2020, 11:59pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-worked-in-local-but-not-working-in-production/15516/1 "2020-04-29T23:59:10Z")

</div>

**Description**  
I have integrated zoom web sdk 1.7.5, I am using reactjs.  
The whole setup working on my local system but it is not working on production.

**Error**  
Can’t see any error!

**Which version?**  
web sdk 1.7.5

Css and js are loading from CDN, I am trying to ZoomMtg.setZoomJSLib(‘[https://source.zoom.us/1.7.5/lib](https://source.zoom.us/1.7.5/lib)’, ‘/av’) from CDN too.

For reference I am attaching my code here.

```
import React, { Component } from 'react';
import { ZoomMtg } from '@zoomus/websdk';
import connect from 'src/apiClient';
import PropTypes from 'prop-types';
import { PromiseState } from 'react-refetch';
import PromiseStateContainer from '../../PromiseStateContainer';
import queryString from 'query-string';
import { createVideoConference } from '../../../services/videoConferencing.service';
import { selfUrl } from 'src/config';

const zoomMeeting = document.getElementById('zmmtg-root');

class ZoomConference extends Component {
  static propTypes = {
match: PropTypes.object.isRequired,
meetingDetails: PropTypes.instanceOf(PromiseState).isRequired
  };

  static contextTypes = {
user: PropTypes.object.isRequired
  };

  constructor(props, context) {
super(props);
this.state = {
  userEmail: context.user.email
};
  }

  componentDidMount() {
ZoomMtg.setZoomJSLib('https://source.zoom.us/1.7.5/lib', '/av');
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
ZoomMtg.leaveMeeting({});
  }

  launchMeeting = (meetingDetails, userEmail) => {
console.log('Launch meeting function');
const qparams = queryString.parse(window.location.search);
zoomMeeting.style.display = 'flex';
zoomMeeting.style.height = '100%';
zoomMeeting.style.width = '100%';
zoomMeeting.style.position = 'fixed';
zoomMeeting.style.zIndex = '1';
zoomMeeting.style.backgroundColor = 'black';
const apiKey = Buffer.from(meetingDetails.api_key, 'base64').toString('utf8');
const meetingId = parseInt(meetingDetails.meeting_id, 10);
const { refType } = this.props.match.params;

ZoomMtg.init({
  debug: true,
  isSupportAV: true,
  leaveUrl: `${selfUrl}videoConferencing/zoom/ended/${meetingId}?ref_type=${refType}&ref_id=${qparams.ref_id}`,
  success() {
    ZoomMtg.join(
      {
        meetingNumber: meetingId,
        userName: userEmail,
        signature: meetingDetails.signature,
        apiKey,
        passWord: meetingDetails.password,
        success() {
          console.log('join meeting success');
        },
        error(res2) {
          console.log(res2);
        }
      }
    );
  },
  error(res3) {
    console.log(res3);
  }
});
  };

  renderZoom = data => (
<PromiseStateContainer
  ps={data}
  onFulfillment={(meetingDetails) => (
    <span>
      {this.launchMeeting(meetingDetails, this.state.userEmail)}
    </span>
  )}
/>
  );

  render() {
console.log('Rendering the component');
zoomMeeting.style.display = 'none';
zoomMeeting.style.height = '0px';
zoomMeeting.style.width = '0px';
zoomMeeting.style.position = 'relative';
zoomMeeting.style.backgroundColor = 'black';
zoomMeeting.style.zIndex = '1';
return (
  <span>{this.renderZoom(this.props.meetingDetails)}</span>
);
  }
}

export default connect(({ match }) => {
  const { refType } = match.params;
  console.log('Calling api');
  const qparams = queryString.parse(window.location.search);
  return {
meetingDetails: createVideoConference(refType, qparams.ref_id, qparams.role)
  };
})(ZoomConference);

```

I am trying to debug but don’t have any clues about what could be going wrong here.

---

<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:** [May 1, 2020, 9:03pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-worked-in-local-but-not-working-in-production/15516/2 "2020-05-01T21:03:11Z")

</div>

Hey @taushifali,

What do you see on the screen? Can you share a screenshot?

Have you added any logging to see if the init or join functions are being called?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![taushifali](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/taushifali/32/2065_2.png) [@taushifali](https://devforum.zoom.us/u/taushifali)\
**Post date:** [May 3, 2020, 2:36pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-worked-in-local-but-not-working-in-production/15516/3 "2020-05-03T14:36:27Z")

</div>

Hi @tommy,  
The error which I faced

 ![Screenshot 2020-04-30 at 3.10.24 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/a/a18ad46bd41f7ad471ebb6bf8b3dabfc4a20fe2f.png)

I have managed to get it work with the solution here:-

> [@ZOOm-JSSDK error](https://devforum.zoom.us/t/zoom-jssdk-error/4456/22):
>
> Hi @tommy, The error which was coming for us, while running web sdk on production:- super expression must either be null or a function, not undefined We have managed to solve this by removing UglifyJsPlugin from webpack config. My dev environment webpack config don’t have UglifyJsPlugin thats why it was working in dev environment. We had optimization block that have UglifyJsPlugin in prod webpack config, and this UglifyJsPlugin is not compatible with the zoom web sdk. Code snippet that was…

Please check why zoom web sdk is not compatible with UglifyJsPlugin(1.2.7 version).

---

<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:** [May 6, 2020, 8:14pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-worked-in-local-but-not-working-in-production/15516/4 "2020-05-06T20:14:02Z")

</div>

Thanks for sharing your solution @taushifali!

We will look into why UglifyJsPlugin(1.2.7 version) is not compatible.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:05pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-worked-in-local-but-not-working-in-production/15516/5 "2020-08-21T21:05:47Z")

</div>

Closed on August 21, 2020, 9:05pm UTC


