Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Uncaught RangeError: Maximum call stack size exceeded #37745

Open
1 task done
deepakk0109 opened this issue Nov 26, 2024 · 1 comment
Open
1 task done

[Bug]: Uncaught RangeError: Maximum call stack size exceeded #37745

deepakk0109 opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels
Bug Something isn't working Community Reported issues reported by community members Custom JS Libraries Issues related to adding custom JS library High This issue blocks a user from building or impacts a lot of users Javascript Product Issues related to users writing javascript in appsmith Needs Triaging Needs attention from maintainers to triage Query & JS Pod Issues related to the query & JS Pod

Comments

@deepakk0109
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description

getting this error white getting data of socket io in JSObject
"Uncaught RangeError: Maximum call stack size exceeded"

image

Steps To Reproduce

  1. load cdn socket library: https://cdn.socket.io/4.8.1/socket.io.min.js

  2. create JSObject
    paste below code> chage the socket-io endpoint and events

export default {
socket: null,
socketData:null,

connectToSocket:async ()=> {
	if (!this.socket) {
		this.socket = await io("Your_socket_enpoint", {
			transports: ["websocket"],
		});
		this.socket.on("connect", () => {
			showAlert("Connected to the Socket.IO server!");
		});

		this.socket.on("disconnect", () => {
			showAlert("Disconnected from the Socket.IO server.");
		});

this.socket.on("avsocket-inv", (data) => {
			console.log("data",data.data);
			// showAlert(`Received data: ${JSON.stringify(data)}`);
		});
		

	}
},

disconnectSocket() {
	if (this.socket) {
		this.socket.disconnect();
		this.socket = null;
	}
},

emitEvent(eventName, data) {   
	if (this.socket && this.socket.connected)
	{       console.log(`Emitting event: ${eventName} with data: ${data}`);  
	 this.socket.emit(eventName, data);     }
	else { showAlert("Socket is not connected."); }
}

};

  1. run the "connectToSocket" function

Public Sample App

No response

Environment

Production

Severity

Critical (Broken Production apps)

Issue video log

No response

Version

latest

@deepakk0109 deepakk0109 added Bug Something isn't working Needs Triaging Needs attention from maintainers to triage labels Nov 26, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added Community Reported issues reported by community members High This issue blocks a user from building or impacts a lot of users Custom JS Libraries Issues related to adding custom JS library labels Nov 26, 2024
@github-actions github-actions bot added Javascript Product Issues related to users writing javascript in appsmith Query & JS Pod Issues related to the query & JS Pod labels Nov 26, 2024
@Nikhil-Nandagopal
Copy link
Contributor

@deepakk0109 there may be an issue using the socket.io library. You can use websockets following this guide
https://docs.appsmith.com/build-apps/how-to-guides/set-up-websockets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Community Reported issues reported by community members Custom JS Libraries Issues related to adding custom JS library High This issue blocks a user from building or impacts a lot of users Javascript Product Issues related to users writing javascript in appsmith Needs Triaging Needs attention from maintainers to triage Query & JS Pod Issues related to the query & JS Pod
Projects
None yet
Development

No branches or pull requests

5 participants