_this.pc.addTrack is not a function + other issue

I set up the server on AWS, and connect to the public IP address. Everything seems to work great, I can get a token for a session, connect to it, and even subscribe to other streams

However, I end up with the following errors:

  1. Uncaught (in promise) TypeError: _this.pc.addTrack is not a function
    at WebRtcPeer.ts:97

  2. although I allegedly connect to the stream and publish to the stream and subscribe to the stream, and although subcribing in APPEND mode creates a new element with a proper ID, there is no video being played inside the created video element for subscribers (there is one for the publisher). However, I do connect to my AWS public IP address, which is what the FAQ post recommended I look at, so I don’t think it’s that.

Not sure if these issues are related. Thanks!

Screen Shot 2020-11-25 at 1.07.43 PM|690x382

How did you deploy? Did you use cloudformation?

Can you show your .env configuration?

If you’re using a domain, you should use your domain, not your AWS public IP to access

Regards,
Carlos

Thanks so much for the response, sorry for just getting back. We use cloudformation, and yes I do connect to the domain sorry for the confusion. Here is the .env

OpenVidu configuration

----------------------

Documentation: https://docs.openvidu.io/en/stable/reference-docs/openvidu-config/

NOTE: This file doesn’t need to quote assignment values, like most shells do.

All values are stored as-is, even if they contain spaces, so don’t quote them.

Domain name. If you do not have one, the public IP of the machine.

For example: 198.51.100.1, or openvidu.example.com

DOMAIN_OR_PUBLIC_IP=****(blocked out for post)*****

OpenVidu SECRET used for apps to connect to OpenVidu server and users to access to OpenVidu Dashboard

OPENVIDU_SECRET=****(blocked out for post)*****

Certificate type:

- selfsigned: Self signed certificate. Not recommended for production use.

Users will see an ERROR when connected to web page.

- owncert: Valid certificate purchased in a Internet services company.

Please put the certificates files inside folder ./owncert

with names certificate.key and certificate.cert

- letsencrypt: Generate a new certificate using letsencrypt. Please set the

required contact email for Let’s Encrypt in LETSENCRYPT_EMAIL

variable.

CERTIFICATE_TYPE=letsencrypt

If CERTIFICATE_TYPE=letsencrypt, you need to configure a valid email for notifications

LETSENCRYPT_EMAIL=jc@ambient.chat

Proxy configuration

If you want to change the ports on which openvidu listens, uncomment the following lines

Allows any request to http://DOMAIN_OR_PUBLIC_IP:HTTP_PORT/ to be automatically

redirected to https://DOMAIN_OR_PUBLIC_IP:HTTPS_PORT/.

WARNING: the default port 80 cannot be changed during the first boot

if you have chosen to deploy with the option CERTIFICATE_TYPE=letsencrypt

HTTP_PORT=80

Changes the port of all services exposed by OpenVidu.