Troubleshooting AVS Device SDK Common Issues
Having trouble with the Alexa Voice Service (AVS) Device SDK? The following page provides possible resolutions for common issues on all platforms, Android, Ubuntu, macOS, Raspberry Pi and Windows. If you run into another AVS Device SDK problem that's not listed here, create a new issue on the SDK GitHub page.
All platforms
Issue: the SDK doesn't load
Symptoms
This problem can occur if your AlexaClientSDKConfig.json file doesn't reference the correct databases. You might see the following error message:
miscDatabase:E SQLiteMiscStorage:createFailed:reason=Could not load config value,key=databaseFilePath
.
Try this
To determine if your databases are linked
- Open your AlexaClientSDKConfig.json file.
-
Find the
databaseFilePath
entries and make sure they link to the appropriate databases.For example, the following json object lists the database path for
cblAuthDelegate
. This path must be valid.{ "cblAuthDelegate": "databaseFilePath":"${SDK_CBL_AUTH_DELEGATE_DATABASE_FILE_PATH}" },
Issue: Amazon Music won't play
Symptoms
This problem can occur if your device isn't set with the correct date. Incorrect time settings cause certificate issues when contacting Amazon server. You might see the following error message:
curlEasyPerformFailed:error=Peer certificate can't authenticate with the provided CA certificates
.
Try this
To change the date on your device
- In your terminal, run the following commands with the correct date.
- Change the date:
date +%Y%m%d -s "20180131"
- Change the time:
date +%T -s "16:11:00"
- Change the date:
Issue: The SDK doesn't output audio
Symptoms
This problem can occur if the SDK doesn't reference the correct audiosink
in the AlexaClientSDKConfig.json file – sometimes the SDK automatically tries to select the best audio sink based on your system configuration. This automatic setting can cause issues depending on how you build the SDK.
Try this
To check if your audiosink
is working
- In your terminal, run the following command:
gst-launch-1.0 -m audiotestsrc ! autoaudiosink
.- If the system is working, a test tone plays.
- If the system isn't working, a test tone doesn't play.
-
If a test doesn't play, use
-m
to determine which audio sink you've set up. For example:autoaudiosink0-actual-sink-osxaudio" (tag): GstMessageTag, taglist=(taglist)"taglist\,\ description\=\(string\)\"audiotest\\\ wave\"\;;
- Run the following command
gst-launch-1.0 -m audiotestsrc ! alsasink
- If you hear a test tone, you must modify the value on line 589.
Replace the existing audio_sink
values
m_pipeline.audioSink = gst_element_factory_make("autoaudiosink", "audio_sink");
With the following audio_sink
values
m_pipeline.audioSink = gst_element_factory_make("alsasink", "audio_sink");
Android
Issue: Git clone fails after running the setup.sh
script
Symptoms
After running the setup.sh
script in Step 4: Modify the configuration settings in Set up the AVS Device SDK on Android, the following error occurs.
==============> CLONING SDK ==============
Cloning into 'avs-device-sdk'...
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
Try this
- Navigate to the
avs-device-sdk/tools/Install
directory. - Open the
setup.sh
file. - Search for
git://github.com/alexa/avs-device-sdk.git
, and then replace it withhttps://github.com/alexa/avs-device-sdk.git
. - Save, and then close the file.
Issue: SDK errors out after running the setup.sh
script on Android
Symptoms
When you're building SDK for Android using the setup.sh
script in Step 4: Modify the configuration settings in Set up the AVS Device SDK on Android, the following problem about missing xml2
library occurs.
configure: error: in `/Users/jdoe/dev/126_android/debug/android-30/arm64-v8a/libarchive':
configure: error: Missing xml2 library
See `config.log' for more details
Try This
- Navigate to the
avs-device-sdk-1-2x/tools/Install
directory. - Open the
android.sh
file. - Search for
Build libarchive
in the file. - Below line 626, which is
--prefix="${INSTALL_TARGET}" \
, add the line--without-xml2 \
in the file. - Save, and then close the file.
Ubuntu
Issue: No sound when using the Plantronics speaker box
Symptoms
There is no audio output when using the sample app. This problem can occur if the gstreamer
is incorrectly configured.
Try this
To update GStreamer
- In your terminal, run the following command:
sudo apt install gstreamer1.0-alsa
. - Test GStreamer with the following command:
gst-launch-0.10 audiotestsrc ! autoaudiosink
. If GStreamer is working, you hear a constant tone sound.
To configure audio settings
If audio is still not working after you install GStreamer, you might have to adjust some system settings.
- Disable the onboard audio with a deny list:
sudo echo "blacklist snd_bcm2835" > /etc/modprobe.d/alsa-blacklist.conf
. - Set your USB / DAC card as the default audio device.
sudo echo "options snd-usb-audio index=0" > /etc/modporbe.d/alsa-base.conf
.
Issue: CMake version 3.10.2 doesn't work with libcurl version 7.67.0
Symptoms
CMake version 3.10.2 – which is the default version of CMake that ships with Ubuntu 18.04 – is incompatible with libcurl version 7.67.0.
Try this
CMake version 3.18.2 is compatible with libcurl version 7.67.0.
- Uninstall the default version provided by the Ubuntu package manager.
sudo apt-get purge cmake
- Download and extract the latest version of CMake from the official CMake webpage.
-
Update the version and build variables with the following command.
version=3.x build=3 mkdir ~/temp cd ~/temp wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gztar xzvf cmake$version.$build.tar.gz cd cmake-$version.$build
- Install the extracted source.
./bootstrap make -j4 sudo make install
macOS
Issue: The SDK fails to build
Symptoms
This problem can occur if your build is missing required dependencies. The SDK won't compile and throws an error related to the dependency you are missing.
Try this
To update your dependencies
To fix any missing dependencies, run the brew install
command for each missing dependency.
Issue: The sample app failed to build
Symptoms
This problem can occur if your version of curl
doesn't support HTTP/2. This problem can occur if curl installs with incorrect settings.
Try this
- In your terminal, run the following command:
brew uninstall curl
. - Re-install curl as described in Set up your MacOS environment.
Issue: Gstreamer fails to build
The Gstreamer plugin can't dynamically load as it fails to find the path to the plugin.
Symptoms
The SampleApp build fails with this error.
0:00:00.013776000 35506 0x7f78e5d06720 WARN GST_ELEMENT_FACTORY gstelementfactory.c:754:gst_element_factory_make_valist: no such element factory "audioconvert"!
<unknown>:35506): GStreamer-CRITICAL **: 12:04:10.148: gst_object_unref: assertion 'object != NULL' failed
(<unknown>:35506): GLib-CRITICAL **: 12:04:10.149: g_main_context_find_source_by_id: assertion 'source_id > 0' failed
Failed to create SampleApplication!
Or the SampleApp hangs with this error.
(gst-plugin-scanner:35769): GLib-GObject-WARNING **: 12:09:00.338: type name '-a-png-encoder-pred' contains invalid characters
(gst-plugin-scanner:35769): GLib-GObject-CRITICAL **: 12:09:00.338: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:35769): GLib-GObject-CRITICAL **: 12:09:00.338: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:35769): GLib-GObject-WARNING **: 12:09:00.377: type name '-a-png-encoder-pred' contains invalid characters
(gst-plugin-scanner:35769): GLib-GObject-CRITICAL **: 12:09:00.377: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:35769): GLib-GObject-CRITICAL **: 12:09:00.377: g_type_set_qdata: assertion 'node != NULL' failed
Try this
Override the Gstreamer plugin search path to /usr/local/lib/gstreamer-1.0
, where /usr/local
is your Homebrew prefix path.
GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 ./SampleApp/src/SampleApp ./Integration/AlexaClientSDKConfig.json DEBUG9
Raspberry Pi
Issue: Git clone fails after running the setup.sh
script
Symptoms
After running the setup.sh
script in Step 2: Download and Install the SDK in Set Up the AVS Device SDK on Raspberry Pi with a Script, the following error occurs:
==============> CLONING SDK ==============
Cloning into 'avs-device-sdk'...
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
Try this
- Navigate to the
avs-device-sdk/tools/Install
directory. - Open the
setup.sh
file. - Search for
git://github.com/alexa/avs-device-sdk.git
, and then replace it withhttps://github.com/alexa/avs-device-sdk.git
. - Save, and then close the file.
Issue: Device freezes and install process stops
Symptoms
Your Raspberry Pi freezes after you run the setup.sh
script to install the SDK. For details about installing the SDK, see Step 2: Download and Install the SDK in Set Up the AVS Device SDK on Raspberry Pi with a Script. This problem might occur when there isn't enough memory on the device, especially if you use an older model of Raspberry Pi, such as Raspberry Pi 3.
Try this
From the command line, run the following commands to increase the virtual memory on your device.
- Stop the operating system from using the current swap file.
sudo dphys-swapfile swapoff
- Modify the swap file configuration file.
sudo nano /etc/dphys-swapfile
- Find
CONF_SWAPSIZE
in the file, and then update it to 2048.CONF_SWAPSIZE=2048
- Reinitialize the swap file of your Raspberry Pi.
sudo dphys-swapfile setup
- Turn the swap system back on.
sudo dphys-swapfile swapon
- Restart your Raspberry Pi.
sudo reboot
Issue: Raspberry Pi overheats
Symptoms
Your Raspberry Pi freezes after you run the setup.sh
script to install the SDK. For details about installing the SDK, see Step 2: Download and Install the SDK in Set Up the AVS Device SDK on Raspberry Pi with a Script. This problem might occur when your Raspberry Pi overheats.
Try this
From the command line, run the following commands.
- Navigate to your
/home/pi
directory. - Open the
setup.sh
file. For example, typesudo nano setup.sh
- Find all the occurrences of
-j2
and remove them. - Save, and then close the file.
Issue: SDK fails to build due to missing atomic
Symptoms
In Step 2: Download and Install the SDK, after you run the install script, the SDK fails to build, and you receive the following error. This problem can occur if you run Raspberry Pi on Bullseye because the distribution doesn't automatically link libatomic
.
/usr/bin/ld: ../../../AVSCommon/libAVSCommon.so: undefined reference to __atomic_load_8' collect2: error: ld returned 1 exit status make[2]: *** [shared/acsdkCommunication/test/CMakeFiles/InMemoryCommunicationInvokeHandlerTest.dir/build.make:106: shared/acsdkCommunication/test/InMemoryCommun icationInvokeHandlerTest] Error 1 make[1]: *** [CMakeFiles/Makefile2:17016: shared/acsdkCommunication/test/CMakeFiles/InMemoryCommunicationInvokeHandlerTest.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... /usr/bin/ld: ../../../AVSCommon/libAVSCommon.so: undefined reference to __atomic_fetch_add_8'
/usr/bin/ld: ../../../AVSCommon/libAVSCommon.so: undefined reference to __atomic_store_8' /usr/bin/ld: ../../../AVSCommon/libAVSCommon.so: undefined reference to __atomic_load_8'
collect2: error: ld returned 1 exit status
make[2]: *** [shared/acsdkCommunication/test/CMakeFiles/InMemoryCommunicationPropertiesHandlerTest.dir/build.make:106: shared/acsdkCommunication/test/InMemoryCo mmunicationPropertiesHandlerTest] Error 1
make[1]: *** [CMakeFiles/Makefile2:16988: shared/acsdkCommunication/test/CMakeFiles/InMemoryCommunicationPropertiesHandlerTest.dir/all] Error 2
make: *** [Makefile:160: all] Error 2
Try this
- Navigate to the
avs-device-sdk/cmakeBuild/cmake
directory. - Open
Platforms.cmake
file. - At the end of the file, add the following code.
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") link_libraries(atomic) endif()
- Save, and then close the file.
Issue: No option to output sound to a USB sound card
Symptoms
The SampleApp uses the default input and output for audio.
Try this
To use a USB sound card, install the dsnoop
and dmix
plugins. Paste this code into .asoundrc
, and into asound.conf
.
Issue: Microphone doesn't work
Symptoms
You get the following error rec FAIL formats: can't open input default: snd_pcm_open error: No such file or directory
when testing the Raspberry Pi during the microphone set up.
This problem can occur when the .asoundrc file isn't configured correctly for the voice input hardware.
Try this
-
In your terminal, type
arecord -l
to list the correct card number and device number to record audio. Take note of the numbers that followcard
anddevice
, you need them later.For example
**** List of CAPTURE Hardware Devices **** card 2: Device [USB Audio Device], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0
- Open the .asoundrc file.
- In the
capture.pcm
object, find theslave.pcm
value. -
Add the card number and device number that you generated in step one in the following format
hw: <card number>, <device number>
.For example
If you use the values from the example shown in step one, your
capture.pcm
object has a card number of2
and a device number of0
. Note that different Raspberry Pi models might have different hardware numbers.... capture.pcm { type plug slave.pcm "hw:2,0" } ...
Issue: No audio output when using the 3.55mm audio jack
Symptoms
You are running the Sample App and the Alexa wake word is triggering, however, you don't hear any audio out of your speaker that's connected to a 3.5mm audio jack.
This problem can occur if the .asoundrc file isn't configured correctly for the voice input hardware.
Try this
-
In your terminal, enter
aplay -l
to list the correct card number and device number for audio playback. Take note of the numbers that followcard
anddevice
, you need them later.For example
**** List of PLAYBACK Hardware Devices **** ***....*** card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] Subdevices: 4/4 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3
- Open the .asoundrc file.
- In the
playback.pcm
object, find theslave.pcm
value. -
Add the card number and device number that you generated in step one in the following format
hw: <card number>, <device number>
.For example
If you use the values from the example shown in step one, your
playback.pcm
object has a card number of1
and a device number of0
. Note that different Raspberry Pi models might have different hardware numbers.... playback.pcm { type plug slave.pcm "hw:1,0" } ...
Windows
Issue: Git clone fails after running the setup.sh
script
Symptoms
After running the setup.sh
script in Step 5: Download the SDK and dependencies in Set Up the AVS Device SDK on Windows 10, the following error occurs:
==============> CLONING SDK ==============
Cloning into 'avs-device-sdk'...
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
Try this
- Navigate to the
avs-device-sdk/tools/Install
directory. - Open the
setup.sh
file. - Search for
git://github.com/alexa/avs-device-sdk.git
, and then replace it withhttps://github.com/alexa/avs-device-sdk.git
. - Save, and then close the file.
Issue: The system can't locate libwinpthread-1.dll
Symptoms
Windows can't find the libwinpthread-1.dll
library because it's not installed or it's not in the path environment variable. This error typically occurs when trying to start the sample app.
Try this
Verify that the library exists and that the files are nested within the proper path on your local machine, such as c:/msys64/mingw64/bin
.
Issue: The sample app hangs when it starts
Symptoms
The sample app fails to load and hangs when it starts. The CPU might run high. This can occur if Gstreamer 1.14 or later is missing directsoundsink
.
Try this
To apply a workaround to fix this problem
- Delete
INetCache
in the registry. -
Restart the sample app. The
Directsoundsink
should reappear.For more details about this problem, see the following Gstreamer troubleshooting page.
Related topics
- Android quick start guide
- iOS quick start guide
- Generic Linux quick start guide
- MacOS quick start guide
- Raspberry Pi quick start guide
- Ubuntu Linux quick start guide
- Windows 64 quick start guide
Last updated: Jan 18, 2021