2

I'm trying to integrate the AWS Chime Demo Chat application into my react application. The Demo application works fine when ran individually. But after integrating it with my react app, I'm getting an error - [INFO] SDK Chat Demo - WebSocket close: 4401 Unauthorized. What could be the reason for the same? Thanks!

2 Answers2

3

There are three potential reasons for that.

1: You are not using HTTPS protocol. It will only work if your Backend and Frontend are being served over HTTPS (Even in dev env). Here is an app I worked on for your reference (Built using Angular, Nodejs, and Chime).

2: You are providing invalid credentials.

3: The IAM role is not set up properly. Read More

Javapocalypse
  • 2,223
  • 17
  • 23
1

Please check the credential you are providing, make sure the appInstanceArn is correct. Also check whether user instance is created for a particular user.

Above may not be the proper solution but i was facing this same issue and i found that i was providing the wrong app instance arn in env file.

shiva rao
  • 163
  • 8