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, 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

  1. Open your AlexaClientSDKConfig.json file.
  2. 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

  1. 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"

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

  1. 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.
  2. 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\"\;;

  3. Run the following command gst-launch-1.0 -m audiotestsrc ! alsasink
  4. 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");

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

  1. In your terminal, run the following command: sudo apt install gstreamer1.0-alsa.
  2. 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.

  1. Disable the onboard audio with a deny list: sudo echo "blacklist snd_bcm2835" > /etc/modprobe.d/alsa-blacklist.conf.
  2. 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.

  1. Uninstall the default version provided by the Ubuntu package manager. sudo apt-get purge cmake
  2. Download and extract the latest version of CMake from the official CMake webpage.
  3. 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
    
  4. 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

  1. In your terminal, run the following command: brew uninstall curl.
  2. Re-install curl as described in Set up your MacOS environment.

Raspberry Pi

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

  1. In your terminal, type arecord -l to list the correct card number and device number to record audio. Take note of the numbers that follow card and device, 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
    
  2. Open the .asoundrc file.
  3. In the capture.pcm object, find the slave.pcm value.
  4. 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 of 2 and a device number of 0. 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

  1. In your terminal, enter aplay -l to list the correct card number and device number for audio playback. Take note of the numbers that follow card and device, 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
        
    
  2. Open the .asoundrc file.
  3. In the playback.pcm object, find the slave.pcm value.
  4. 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 of 1 and a device number of 0. Note that different Raspberry Pi models might have different hardware numbers.

       ...
               playback.pcm {
                       type plug
                       slave.pcm "hw:1,0"
               }
       ...
    

Windows

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

  1. Delete INetCache in the registry.
  2. Restart the sample app. The Directsoundsink should reappear.

    For more details about this problem, see the following Gstreamer troubleshooting page.