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, Linux, macOS, and Raspberry Pi. 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
lwaAuthorization
. This path must be valid.{ "lwaAuthorization": { "databaseFilePath": "${SDK_LWA_AUTHORIZATION_ADAPTER_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");
Issue: Authentication error when changing products
Symptoms
When you try to run the Alexa Smart Screen SDK sample app on a new device, you see the following error. You have registered the device as a product in the Alexa console.
RequiresShutdown:~RequiresShutdownFailed:reason=notShutdown,name=FocusBridge
CapabilitiesDelegate:getCapabilityConfigsStringFromJsonFailed::Interface configurations not available
CapabilitiesDelegate:getCapabilityConfigsStringFromJsonFailed::Interface configurations not available
CapabilitiesDelegate:getCapabilityConfigsStringFromJsonFailed::Interface configurations not available
CapabilitiesDelegate:getCapabilityConfigsStringFromJsonFailed::Interface configurations not available
CapabilitiesDelegate:getCapabilityConfigsStringFromJsonFailed::Interface configurations not available
CapabilitiesDelegate:getCapabilityConfigsStringFromJsonFailed::Interface configurations not available
CapabilitiesDelegate:getCapabilityConfigsStringFromJsonFailed::Interface configurations not available
CapabilitiesDelegate:getCapabilityConfigsStringFromJsonFailed::Interface configurations not available
CapabilitiesDelegate:getCapabilityConfigsStringFromJsonFailed::Interface configurations not available
CBLAuthDelegate:receiveTokenResponseFailed:result=UNAUTHORIZED_CLIENT
Try this
-
Navigate to the
~/sdk-folder/db
folder and delete its contents. -
From the new product's
config.json
file, copy the credentials (clientID
andproductID
) into theAlexaClientSDKConfig.json
file. -
Run the sample again.
-
To authorize the new product, enter the code provided on the screen in the web page at amazon.com/us/code. For more details, see Get a Refresh Token in the AVS Device SDK documentation.
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 $(brew --prefix)/lib/gstreamer-1.0/
.
GST_PLUGIN_PATH=$(brew --prefix)/lib/gstreamer-1.0/ ./SampleApplications/ConsoleSampleApplication/src/SampleApp ./Integration/AlexaClientSDKConfig.json DEBUG9
Issue: macOS dynamic link library (dyld
) not loaded in npm install
Symptoms
You see the following output.
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
/bin/sh: line 1: 91419 Abort trap: 6 npm install
make[2]: *** [modules/GUI/CMakeFiles/GUIClient] Error 134
make[1]: *** [modules/GUI/CMakeFiles/GUIClient.dir/all] Error 2
make: *** [all] Error 2
Try this
brew reinstall node
If brew reinstall node
doesn’t fix the error, uninstall and reinstall the node manually from the node.js
website.
brew uninstall --ignore-dependencies node
-
In your web browser, go to https://nodejs.org/en/download/.
-
Download the LTS version for Mac, and follow the prompts to install
Node.js
. -
Rerun your
cmake
andmake
commands.
Issue: MacOS dynamic link library (dyld
) not loaded error from sample app
Symptoms
When you try to run the Alexa Smart Screen SDK sample app, you see the following output.
dyld: Library not loaded: @rpath/libAVSCommon.dylib
Referenced from: ~/sdk-folder/ss-build/./modules/Alexa/SampleApp/src/SampleApp
Reason: image not found
Abort trap: 6
Try this
- Run the following command.
export DYLD_LIBRARY_PATH=$HOME/sdk-folder/sdk-install/lib:$DYLD_LIBRARY_PATH
Issue: SampleApp fails to create PortAudio microphone wrapper
Symptoms
You see the following error.
||PaMacCore (AUHAL)|| Error on line 1277: err='-66748', msg=Unknown Error
PortAudioMicrophoneWrapper:Failed to open PortAudio default stream:errorCode=-9986
PortAudioMicrophoneWrapper:Failed to initialize PortAudioMicrophoneWrapper
SampleApplication:Failed to create microphone wrapper!
InternetConnectionMonitor:testConnectionFailed:reason=contentFetcherCouldNotDownloadHeader
SampleApplication:Failed to initialize SampleApplication
Try this
- Run the following command.
brew install portaudio
- Use the updated PortAudio paths to rebuild AVS SDK and SmartScreen SDK. Note that the paths might be slightly different on your system depending on where
brew
installed the packages.-DPORTAUDIO_LIB_PATH=$(brew --prefix)/opt/portaudio/lib/libportaudio.dylib \ -DPORTAUDIO_INCLUDE_DIR=$(brew --prefix)/opt/portaudio/include
Raspberry Pi
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: 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" } ...
Having trouble using the AVS Device SDK on smart screens? The following sections show possible resolutions for common issues. The sections cover issues with all platforms, macOS, and Raspberry Pi.
If you run into a problem that's not listed here, create a new issue in our GitHub repo.
Issue: Missing libcrypto
(or other library) error from AVS Device SDK build
Symptoms
AVS Device SDK cmake
build command fails with the error, "can't find libcrypto
," or an error reporting another library as missing.
Try this
Install the required version of the missing library. For example, the AVS Device SDK requires libcrypto
version 1.1. To install it, use the following command.
To install version 1.1
- Use the following command.
sudo apt install libcurl4-openssl-dev libssl-dev
To update pkgconfig
- Check whether
pkgconfig
is correct.pkg-config --list-all | grep libcrypto
- Copy the contents of
pkgconfig
inopenssl@1.1
(or the current version being used) into/usr/local/lib/pkgconfig
.cp /usr/local/Cellar/openssl@1.1/1.1.1g/lib/pkgconfig/* /usr/local/lib/pkgconfig
- Check whether
pkgconfig
is now correct.pkg-config --list-all | grep libcryptosr/local/opt/openssl/lib
You should see the following command output.
PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
Related topics
- MacOS quick start guide
- Raspberry Pi quick start guide
- Ubuntu Linux quick start guide
- Smart Screen macOS Quick Start Guide
- Smart Screen Raspberry Pi Quick Start Guide
- Smart Screen Ubuntu Linux Quick Start Guide
Last updated: Oct 12, 2022