Unhandled Rejection (TypeError): amazon_chime_sdk_js__WEBPACK_IMPORTED_MODULE_2__.DefaultDOMWebSocketFactory is not a constructor
chazdiezal opened this issue · 2 comments
How do I fix this error?
Chat.initChatConnection
C:/users/charles/amazon-ivs-chime-web-demo/web-ui/src/components/chat/Chat.jsx:37
34 | async initChatConnection() {
35 | const { Meeting, Attendee } = this.props.joinInfo;
36 | const messagingUrl = ${config.CHAT_WEBSOCKET}?MeetingId=${Meeting.MeetingId}&AttendeeId=${Attendee.AttendeeId}&JoinToken=${Attendee.JoinToken}
37 | const connection = new ReconnectingPromisedWebSocket(
| ^ 38 | messagingUrl,
39 | [],
40 | 'arraybuffer',
Chat.componentDidMount
C:/users/charles/amazon-ivs-chime-web-demo/web-ui/src/components/chat/Chat.jsx:31
28 | }
29 |
30 | componentDidMount() {
31 | this.initChatConnection();
| ^ 32 | }
33 |
34 | async initChatConnection() {
View compiled
▶ 18 stack frames were collapsed.
start
C:/users/charles/amazon-ivs-chime-web-demo/web-ui/src/components/chimeWeb/Meeting.jsx:76
73 | await this.props.chime.reInitializeMeetingSession(this.joinInfo, this.username);
74 | }
75 |
76 | this.setState({ meetingStatus: 'Success' });
| ^ 77 |
78 | this.props.chime.audioVideo.addObserver({
79 | audioVideoDidStop: async (sessionStatus) => {
View compiled
Hello! Thank you for contacting us about this error. I was able to reproduce it and am currently investigating a fix.
As a temporary workaround, could you try the following steps to see if they unblock you from this issue?
Step 1
Roll back the ChimeSDK dependency in line 6
of web-ui/package.json
. Currently it is set to ^2.5.0
but you will need to change it to ^1.14.0
:
{
...
"dependencies": {
"amazon-chime-sdk-js": "^1.14.0",
...
}
Step 2
In web-ui
, run npm install
to roll back to using the previous ChimeSDK version.
Step 3
Then, run npm start
to start the web app.
Please drop a message here if these steps aren't working for you and I'd be happy to investigate this further. In the meantime, I'll be working on a more permanent fix that doesn't involve rolling back the ChimeSDK version.
Hi there, thank you for the quick response! Yes, rolling back to 1.14 indeed fixed the issue.