Uncaught Error: Reducers may not dispatch actions

When my web SDK opens. it shows me this error

redux.min.js:1 Uncaught Error: Reducers may not dispatch actions.
at a (redux.min.js:1)
at redux-thunk.min.js:1
at dispatch (redux.min.js:1)
at zoom-meeting-1.9.1.min.js:2
at Object.dispatch (redux-thunk.min.js:1)
at y.value (zoom-meeting-1.9.1.min.js:2)
at x (zoom-meeting-1.9.1.min.js:2)
at Object.expel (zoom-meeting-1.9.1.min.js:2)
at generate?enc=eyJp.......
at HTMLDivElement.<anonymous> (zoom-meeting-1.9.1.min.js:2)

Hey @digix.sameera,

Thank you for reaching out to the Zoom Developer Forum. First, I would make sure that you are importing dependencies either through the CDN or Local method but not both. As you build your application, I recommend using one of our sample apps as a reference:

If that isn’t helpful, please provide a public git repo that has code I can use to reproduce the issue.

Thanks,
Max

1 Like

I’m also running into this issue, I’ve switched to the cdn and am using zoom websdk version 1.9.1.

The call seems fine initially, then after a couple minutes it crashes out for all users. I tested this with 3-4 users.

Hey @zulu ,

Does this error crash the Web SDK for you? Or is it just a passive error? (I have not seen this error before).

Thanks,
Tommy

Yes, this is on the Web SDK. It completely black screens the call for all users, and then tries to reconnect them, but just continues to crash and attempt a reconnect in a loop.

Hey @zulu,

When this happens, do you see any errors in the browser console? Also, are you seeing this issue when testing with the Sample Web App?

Thanks,
Max

Hi Max,

Finally got a screenshot of the errors I’m encountering. It was fine with a host and two people, but as soon as the third joined it crashed the site to a white screen & killed the call in the app. Here is a screenshot of the error that was thrown:

The WebGL warnings were thrown prior to the crash and were just mounting up, then as soon as the fourth person joined I was given the errors.

For reference, this is the js code I’m using to setup the meeting on the site. I’m using " Import Through CDN" from the documentation to get react, react-thunk etc.

const restUrl = document.currentScript.getAttribute( 'data-rest' );

let currentScript = document.currentScript;

let zoomData = '';

fetch(restUrl)
	.then((response) => { return response.json(); })
	.then((data) => {

		zoomData = data;

		if ( "1" === data.isWebinar ) {

			createPopup();
		} else {
			run_zoom();
		}

	}
);

const createPopup = () => {

	const popupMarkup = `
		<div id="uob-webinar-form" class="uob-webinar-form">
			<div class="window">
				<p>To join this webinar you must first enter your email address</p>
				<form id="join_webinar">
					<input type="email" id="webinar_email" name="webinar_email" placeholder="Email address" required />
					<button type="submit" class="custom-zoom-btn join">Join Webinar</button>
				</form>
			</div>
		</div>
	`;

	document.body.insertAdjacentHTML( 'beforeend', popupMarkup );

	document.getElementById( 'join_webinar' ).addEventListener( 'submit', submitEmail )
}

const submitEmail = (e) => {

	e.preventDefault()

	if ( document.getElementById( 'webinar_email' ).value ) {
		run_zoom( document.getElementById( 'webinar_email' ).value )

		document.getElementById( 'uob-webinar-form' ).remove();
	}
}

function run_zoom( email = '' ) {

	ZoomMtg.setZoomJSLib( 'https://dmogdx0jrul3u.cloudfront.net/1.9.1/lib', '/av' ); 
	ZoomMtg.preLoadWasm();
	ZoomMtg.prepareWebSDK();

	ZoomMtg.init({
		leaveUrl: zoomData.url,
		isSupportAV: true,
		screenShare: false,
		disableInvite : true,
		isSupportChat: false,
		isSupportQA: true,
		isSupportPolling: true,

		success: (success) => {

			ZoomMtg.join({
				signature: zoomData.signature,
				meetingNumber: zoomData.meeting_id,
				userName: 'user' + getRandomInt( 99999 ),
				apiKey: zoomData.key,
				passWord : zoomData.meeting_password,
				userEmail: email,
				success: (success) => {

					// console.log( success )

					ZoomMtg.getCurrentUser({
						success (response) {
							console.log( success )
							ZoomMtg.mute({userId: response.result.currentUser.userId, mute: true});
						},
						error (error) {
							console.log( error )
						}
					});

					ZoomMtg.inMeetingServiceListener('onUserLeave', function (data) {
						parent.document.getElementById( 'zoom-container' ).remove();
					});

					let button = document.createElement( 'button' );
					button.id = 'custom-leave-btn';
					button.classList.add( 'custom-zoom-btn', 'end' );
					button.innerHTML = 'Leave Meeting';

					currentScript.parentNode.append( button );

					button.addEventListener( 'click', function() {
						ZoomMtg.leaveMeeting();
						parent.document.getElementById( 'zoom-container' ).remove();
					});

				},
				error: (error) => {
					console.log( 'failed to join' )
					console.log( error )
				}
			});
		},
		error: (error) => {
			console.log( 'failed to init' )
			console.log( error )
		}
	});
}

function getQueryString() {
	var queryStringKeyValue = window.parent.location.search.replace('?', '').split('&');
	var qsJsonObject = {};
	if (queryStringKeyValue != '') {
		for (var i = 0; i < queryStringKeyValue.length; i++) {
			qsJsonObject[queryStringKeyValue[i].split('=')[0]] = queryStringKeyValue[i].split('=')[1];
		}
	}
	return qsJsonObject;
}

function getRandomInt(max) {
	return Math.floor(Math.random() * Math.floor(max));
}

Hi @zulu,

Thanks for sharing these details with us.

Based on the errors in the browser console, it looks like these may actually be related to your program/WebGL. If your app is crashing after these errors, it seems the root cause is related to how your WebGL is being called/built. Have you tried searching these errors on StackOverflow or similar?

Let us know,
Will

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