'Agora Flexible classroom - Chat not working
I just launched agora flexible classroom. But the chat module is not working and it's showing this console error. How do I solve this issue and chat work? Here are my codes. Please check: SDK:
AgoraEduSDK.config({
// Here pass in the Agora App ID you have got
appId: self.agora_id,
})
AgoraEduSDK.launch(
document.querySelector("#classroom"), {
// Here pass in the RTM token you have generated
rtmToken: self.token,
// The user ID must be the same as the one you used for generating the RTM token
userUuid: self.authuserid,
userName: self.authuser,
roomUuid: "6441444714144", //Should be unique and generate when join
roomName: "demo-class", //Any
roleType: 1, //teacher = 1, student = 2, assistant = 3
roomType: 4, // Room1v1Class = 0, RoomBigClass = 2, RoomSmallClass = 4
pretest: true,
language: "en",
startTime: new Date().getTime(),
duration: 60 * 30, // dynamic time
courseWareList: [],
listener: (evt) => {
if (evt == 1){
this.joined = true //Ready
}
if (evt == 2){
this.joined = false //Leave
}
console.log("evt", evt)
}
}
)
Solution 1:[1]
I'd suggest double checking your config especially your RTM token (which is different from the RTC Token). You're using variable for a few properties, try logging those out to make sure the values are correct - the error in your image suggests the passed JSON has some syntax issue. If you're still facing issues you can open a support ticket using the Agora console.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ekaansh Arora |
