webSDK - React is not defined and s.AK.connectSocket is not a function

@zoomus/websdk - 2.18.3
react - 16.13.1
error - screenshot
when i use https://source.zoom.us/2.18.3/lib - i get 403(forbidden)
The error happened suddenly. Everything worked and no configuration was changed. After that, I updated the webSDK version and started having problems with React

const { ZoomMtg } = await import('@zoomus/websdk');

			ZoomMtg.setZoomJSLib('https://source.zoom.us/2.17.0/lib', '/av');
			ZoomMtg.preLoadWasm();
			ZoomMtg.prepareWebSDK();
			ZoomMtg.generateSDKSignature({
				meetingNumber,
				role: role.toString(),
				sdkKey: ZOOM.VIDEOSDK.KEY,
				sdkSecret: ZOOM.VIDEOSDK.SECRET,
				success: (signature: any) => {
					ZoomMtg.init({
						leaveUrl: backUrl || window.location.origin,
						disablePreview: true,
						success: () => {
							document.title = 'mRecords meeting';
							ZoomMtg.join({
								meetingNumber,
								sdkKey: ZOOM.VIDEOSDK.KEY,
								signature: signature.result,
								userName: userName ?? '',
								passWord: password.toString() ?? '',
								tk: '',
								success: () => {
									document.addEventListener('visibilitychange', () => {
										if (document.visibilityState === 'hidden') {
											ZoomMtg.leaveMeeting({
												confirm: false,
												success: () => {
													console.log('success leave');
												},
												error: (error: any) => {
													console.log(error);
												},
											});
										}
									});
									document.title = 'mRecords meeting';
									console.log('<--- Joined --->');
								},
								error: (error: any) => {
									console.log(error);
								},
							});
						},
						error: (error: any) => {
							console.log(error);
						},
					});
				},
				error: (error: any) => {
					console.log(error);
				},
			});
		} catch (error) {
			console.error('Error fetching data:', error);
		}

@chaichka175 ,

Could you try with a valid version such as 2.18.2?

Hello @chunsiong.zoom
I am getting the same problem

what problem are you getting @chaichka175

@chunsiong.zoom
I have this error - Screenshot by Lightshot

ok @chaichka175,

on your html page, are you loading these?
ignore the version number as I’m using 2.18.0 instead of 2.18.2
You will need to load these javascript files before loading the zoom js library

    <!-- For Component and Client View -->
    <script src="https://source.zoom.us/2.18.0/lib/vendor/react.min.js"></script>
    <script src="https://source.zoom.us/2.18.0/lib/vendor/react-dom.min.js"></script>
    <script src="https://source.zoom.us/2.18.0/lib/vendor/redux.min.js"></script>
    <script src="https://source.zoom.us/2.18.0/lib/vendor/redux-thunk.min.js"></script>
    <script src="https://source.zoom.us/2.18.0/lib/vendor/lodash.min.js"></script>

    <!-- For Client View -->
    <script src="https://source.zoom.us/zoom-meeting-2.18.0.min.js"></script>
    <script type="text/javascript" src="/client-view.js"></script>

@chunsiong.zoom Thank you so much. I think it is solution

1 Like