aws / amazon-chime-sdk-cpp

Apache License 2.0
13 stars 5 forks source link

Unable to access speaker #28

Open Rajashekar77777777 opened 1 month ago

Rajashekar77777777 commented 1 month ago

While I am running the executable file getting error like Unable to access speaker and WebSocket. How to resolve this error can someone help me to resolve this error. while trying to run demo application provide by aws chime

/my_cli --attendee_id= --audio_host_url= --external_meeting_id= --external_user_id= --join_token= --log_level= --meeting_id= --signaling_url= --send_audio_file_name=

Error Logs

attendee Name: aa Attendee ID: xxxx Meeting Name: Meeting ID: aaaaaa Audio Filename: k_16bit.pcm Current Log Level: error [INFO]: Creating DefaultSignalingClient [INFO]: Creating WebsocketSignalingTransport [ERROR]: (adm_helpers.cc:48): Unable to access speaker.

[ERROR]: (audio_device_generic.cc:18): BuiltInAECIsAvailable: Not supported on this platform

[ERROR]: (audio_device_generic.cc:28): BuiltInAGCIsAvailable: Not supported on this platform

[ERROR]: (audio_device_generic.cc:38): BuiltInNSIsAvailable: Not supported on this platform

Starting keypress handler [2024/08/07 12:05:33:3666] E: Error while trying to connect the websocket: read failed [ERROR]: Signaling has received error Error while trying to connect the websocket: read failed

Rajashekar77777777 commented 1 month ago

Hi , we are trying to build in Linux, if we are not following the commands to set the Linux as true, it won't work. can you suggest step to overcome issue while building in ubuntu 22(Linux).

hensmi-amazon commented 3 weeks ago

I have pushed a change that fixes most build issues and also adds a script chime-sdk-signaling-cpp/demo/cli/run_with_serverless_demo.sh that should bootstrap the demo better. You can try that branch as is or wait for it to reach main.

My guess is that the configuration was not set up correctly. I will also see if I can updated the demo/SDK to fail faster and with a clearer message.

if we are not following the commands to set the Linux as true

What is this in reference to?

Rajashekar77777777 commented 3 weeks ago

As per your suggestion we made the changes in Cmake file but we are facing errors related to Protobuf. For your reference I have added the error screenshot. image

hensmi-amazon commented 3 weeks ago

Sorry for the possibly confusing suggestion. My changes/readme updates have been merged to mainline. Can you use those and try again? Additionally can you provide me the cmake command used to generate the files?

Rajashekar77777777 commented 3 weeks ago

Now I am able to build using the latest readme file, but when running the demo application, I am getting an error related to the web socket. For your reference I have added the error screenshot. image

hensmi-amazon commented 3 weeks ago

Have you uploaded a Serverless demo and set the --url flag? You can alternatively run the browser demo (https://github.com/aws/amazon-chime-sdk-js/blob/main/demos/browser/README.md) and set --url to http://localhost:8080/, but I have not tried that myself. I will update the readme/script to make this easier to run after this issue is resolved.

Rajashekar77777777 commented 2 weeks ago

Following the steps mentioned by you, I am able to overcome the WebSocket error, but the output window is not displaying for the same. For your reference I have added the error screenshot. image

hensmi-amazon commented 2 weeks ago

Can you upload full logs to this ticket? A few of those logs imply that you are connected.

By 'output window' i assume you mean that you have the browser demo open and joined to the same meeting. I assume you ensured that the --meeting value is the same as you picked in the browser demo? When you retest, can you also provide the meeting ID in the bottom left of the browser demo?

Rajashekar77777777 commented 2 weeks ago

when we are executing below command it is not displaying any media control for audio and video window.

export SERVERLESS_DEMO_URL= # ... ./run_with_serverless_demo.sh --meeting test-meeting --attendee cli-attendee --url $SERVERLESS_DEMO_URL

In our case SERVERLESS_DEMO_URL is deployed in AWS which is providing browser demo and server. For your reference I have added the logs below: from the command --meeting and --attendee are not already created. image image image image image

Rajashekar77777777 commented 2 weeks ago

we are expecting audio and video controller by following this command export SERVERLESS_DEMO_URL= # ... ./run_with_serverless_demo.sh --meeting test-meeting --attendee cli-attendee --url $SERVERLESS_DEMO_URL is it correct way or any different build is required?

Please provide reference link of working C++ application which providing audio and video window.

hensmi-amazon commented 2 weeks ago

I just ran the steps in the CLI README and did not have any issue.

It looks like WebRTC is failing to gather the TURN candidate. What platform are you using to build? Is this on AWS? Have you configured the network access properly?

Rajashekar77777777 commented 2 weeks ago

I am trying to build SDK again on a different system. getting error as mentioned below:

-- Looking for HMAC_CTX_new

-- Looking for HMAC_CTX_new—not found

By following the below export command, even reflecting the above error. Can you suggest how to resolve the same

export BORING_SSL_LIB=$CHIME_SDK_DEMO_DIRECTORY/webrtc-build/webrtc/out/Default/obj/libwebrtc.a

export BORING_SSL_INCLUDE_DIR=$CHIME_SDK_DEMO_DIRECTORY/webrtc-build/webrtc/third_party/boringssl/src/include

Rajashekar77777777 commented 2 weeks ago

image When we are running the cmake --build build from this step Pull and build C++ SDK Signaling Client getting error related to websocket.

Rajashekar77777777 commented 2 weeks ago

I just ran the steps in the CLI README and did not have any issue.

It looks like WebRTC is failing to gather the TURN candidate. What platform are you using to build? Is this on AWS? Have you configured the network access properly?

Rajashekar77777777 commented 2 weeks ago

Here we need to initiate a call from the Ubuntu (Linux) and retrieve the call from the web application. How to check configured the network access ?

hensmi-amazon commented 2 weeks ago

-- Looking for HMAC_CTX_new—not found

Is not necessarily an indication of a failure unless you see other SSL issues down the line.

Here we need to initiate a call from the Ubuntu (Linux) and retrieve the call from the web application. How to check configured the network access ?

It depends on whether you are running on a local device or a cloud instance. This usually isn't relevant on a local device though.

For the rest of the issues, I cannot assist, unless you provide the actual text of the failure. Please run a clean build and redirect the output to a log file (e.g. cmake /* ... */ > ~/build.log 2>&1.

Rajashekar77777777 commented 2 weeks ago

We are running the cloud instance. How to check the required configuration. when we are performing this command cmake -S . -B build \ -DLWS_OPENSSL_LIBRARIES=$BORING_SSL_LIB \ -DLWS_OPENSSL_INCLUDE_DIRS=$BORING_SSL_INCLUDE_DIR \ -DLWS_WITH_BORINGSSL=ON \ -DLWS_HAVE_OPENSSL_STACK=OFF \ -GNinja getting below errors. -- Looking for openssl/ecdh.h -- Looking for openssl/ecdh.h - found -- Looking for SSL_CTX_set1_param -- Looking for SSL_CTX_set1_param - not found -- Looking for SSL_set_info_callback -- Looking for SSL_set_info_callback - not found -- Looking for X509_VERIFY_PARAM_set1_host -- Looking for X509_VERIFY_PARAM_set1_host - not found -- Looking for X509_VERIFY_PARAM_set1_host -- Looking for X509_VERIFY_PARAM_set1_host - not found -- Looking for RSA_set0_key -- Looking for RSA_set0_key - not found -- Looking for X509_get_key_usage -- Looking for X509_get_key_usage - not found -- Looking for SSL_CTX_EVP_PKEY_new_raw_private_key -- Looking for SSL_CTX_EVP_PKEY_new_raw_private_key - not found -- Looking for SSL_CTX_get0_certificate -- Looking for SSL_CTX_get0_certificate - not found -- Looking for SSL_get0_alpn_selected -- Looking for SSL_get0_alpn_selected - not found -- Looking for SSL_set_alpn_protos -- Looking for SSL_set_alpn_protos - not found -- Looking for EVP_aes_128_cfb8 -- Looking for EVP_aes_128_cfb8 - not found -- Looking for EVP_aes_128_cfb128 -- Looking for EVP_aes_128_cfb128 - not found -- Looking for EVP_aes_192_cfb8 -- Looking for EVP_aes_192_cfb8 - not found -- Looking for EVP_aes_192_cfb128 -- Looking for EVP_aes_192_cfb128 - not found -- Looking for EVP_aes_256_cfb8 -- Looking for EVP_aes_256_cfb8 - not found -- Looking for EVP_aes_256_cfb128 -- Looking for EVP_aes_256_cfb128 - not found -- Looking for EVP_aes_128_xts -- Looking for EVP_aes_128_xts - not found -- Looking for EVP_aes_128_ofb -- Looking for EVP_aes_128_ofb - not found -- Looking for EVP_aes_128_ecb -- Looking for EVP_aes_128_ecb - not found -- Looking for EVP_aes_128_ctr -- Looking for EVP_aes_128_ctr - not found -- Looking for RSA_verify_pss_mgf1 -- Looking for RSA_verify_pss_mgf1 - not found -- Looking for HMAC_CTX_new -- Looking for HMAC_CTX_new - not found -- Looking for EVP_PKEY_new_raw_private_key -- Looking for EVP_PKEY_new_raw_private_key - not found -- Looking for SSL_SESSION_set_time -- Looking for SSL_SESSION_set_time - not found -- Looking for EC_KEY_new_by_curve_name -- Looking for EC_KEY_new_by_curve_name - not found -- Performing Test LWS_HAVE_SSL_EXTRA_CHAIN_CERTS -- Performing Test LWS_HAVE_SSL_EXTRA_CHAIN_CERTS - Failed -- Performing Test LWS_HAVE_EVP_MD_CTX_free -- Performing Test LWS_HAVE_EVP_MD_CTX_free - Failed -- Looking for ECDSA_SIG_set0 -- Looking for ECDSA_SIG_set0 - not found -- Looking for BN_bn2binpad -- Looking for BN_bn2binpad - not found -- Looking for EVP_aes_128_wrap -- Looking for EVP_aes_128_wrap - not found -- Looking for EC_POINT_get_affine_coordinates -- Looking for EC_POINT_get_affine_coordinates - not found -- Looking for TLS_client_method -- Looking for TLS_client_method - not found -- Looking for TLSv1_2_client_method -- Looking for TLSv1_2_client_method - not found

hensmi-amazon commented 2 weeks ago

Those are not errors, just optional features that don't exist in boring SSL. I will update README to not call them out as fatal

Looking for openssl/ecdh.h - found

Btw you can upload text files to github instead of copy pasting :).

Rajashekar77777777 commented 2 weeks ago

While I am executing the following command:. "/run_with_serverless_demo.sh --meeting 12 --attendee 2 --url $https://XXXXXX.execute-api.us-east-1.amazonaws.com/Prod/ " application is executing, but the output of the browser is not displayed(video and audio controller of the caller ). For the same, I have attached the logs. please check. I appreciate further solutions to overcome this issue.

hensmi-amazon commented 2 weeks ago

I may be misunderstanding the issue. Those logs show a successful connection. This is not a GUI application. You can navigate to https://xxxxxx.execute-api.us-east-1.amazonaws.com/Prod/, and enter the same meeting name, and you should be able to see the CLI client join.

Rajashekar77777777 commented 1 week ago

Can you please suggest how I can perform video call in Linux system using this same sdk? Can you please explain in brief the steps.

hensmi-amazon commented 1 week ago

This is a low level component and thus does not currently have information on how to make a linux GUI, which is not straightforward to do or maintain. You need to also be familiar with how to use a WebRTC implementation, which is not bundled with the SDK, though we use it in our example.

Unfortunately i think you are asking for too much info outside the scope of this SDK. If you are a enterprise customer you can reach out to AWS premium support for more assistance.

Rajashekar77777777 commented 6 days ago

While i am running the below command getting error: cmake -S . -B build \ -DLWS_OPENSSL_LIBRARIES=$BORING_SSL_LIB \ -DLWS_OPENSSL_INCLUDE_DIRS=$BORING_SSL_INCLUDE_DIR \ -DLWS_WITH_BORINGSSL=ON \ -DLWS_HAVE_OPENSSL_STACK=OFF \ -GNinja

Make Error: The source directory "/chime-sdk-signaling-cpp-demo/amazon-chime-sdk-cpp" does not appear to contain CMakeLists.txt.
hensmi-amazon commented 6 days ago

You probably need to re-set CHIME_SDK_DEMO_DIRECTORY as described in the readme.