-
Notifications
You must be signed in to change notification settings - Fork 9
Troubleshooting
Having trouble with the AVS Sample App? Here's a list of solutions to some common problems reported by AVS developers.
Don't see what you're looking for? Let us know! Click here to open a new issue.
The following issues are specific to the AVS Sample App.
The first step is to review the logs. Run this command and keep an eye out for errors and failures:
mvn -X exec:exec
If java -version
outputs another version than 1.8.0_xxx the Oracle Java installation failed, then run the following commands.
If there is no version of Java installed, skip the first line in the following, or if the version is not 1.7.x you will have to find and remove the correct package.
sudo apt-get remove openjdk-7-jre-headless
sudo apt-get install oracle-java8-set-default
sudo apt-get install maven
Now you should have java 1.8._xxx installed, you will have to recompile the javaclient now.
Open /samples/javaclient/
and run the command mvn install
- If you see
MalformedConfig
orJsonParsing
exceptions, it is likely that your config file is broken. Open/samples/javaclient/config.json
and verify that JSON is valid.
It's likely that mvn install
failed. See if the output of mvn -X install
provides any clues. Note: It's important that you make sure all dependencies were downloaded.
Raspberry Pi
- Re-run
automated_install.sh
and keep an eye on the outputs for any errors or failures.
Linux/Mac/Windows
- Run the following commands and keep an eye on the outputs for any errors or failures:
mvn clean
mvn validate
mvn -X install
- It is possible that the values provided for the CompanionService and the Java client don't match. Open
/samples/javaclient/config.json
and/samples/companionService/config.js
and confirm theProductID
andDSN
values match.
If you encounter Unable to load library 'vlc': Native library (linux-arm/libvlc.so) not found in resource path
, check the following:
- Make sure the
VLC_PATH
environment variable is set (ask for the output of 'env' - it will give you all environment variables set in the terminal). - Make sure the JNA Library was downloaded correctly. On Raspberry Pi, make sure the
pom.xml
contains the following:<dependency> <groupId>net.java.dev.jna</groupId> <artifactId>jna</artifactId> <version>4.1.0</version> <scope>compile</scope> </dependency>
-
Open
pom.xml
and locate the ALPN version. Make sure it matches your version of Java. Use this list to locate the correct ALPN version: http://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html#alpn-versions.NOTE: If your Java version isn't listed in the table, use the latest ALPN version available.
Next, verify that the certificates have generated correctly by running
automated_install.sh
.
If you see We're sorry: An error occurred...
, here are a few things to check:
- Make sure that your
ProductID
andDSN
match across config files./samples/javaclient/config.json
/samples/companionService/config.js
- Make sure the
ProductID
in your config files match the listed Device Type ID for your product on developer.amazon.com. - Make sure you've included redirect URLs in your security profile. For instructions, see Create a Security Profile.
- Re-associate a security profile with your product. Go to developer.amazon.com, locate your product and click Edit. Select Security Profile from the left-nav, then locate the Security Profile drop-down and select your security profile, then click Next.
If you encounter a CertValidation Exception
, here are a few things to check:
- Make sure you've run
automated_install.sh
orgenerate.sh
to generate your certificates. - Make sure you start the Java client before starting the Android companion app.
If these solutions aren't working, then try manually copying the certificates from /samples/javaclient/certs/ca
to /samples/androidCompanionApp/app/src/main/res/raw/
.
The following are solutions to common client issues.
If you're having issues establishing a downchannel stream in your HTTP/2 connection, here are a few things to check:
- Your client is making each request in a separate connection instead of in a new stream in the same connection. AVS requires your client to create a single, persistent connection. For complete details, see Managing and HTTP/2 Connection with AVS.
- The client is intermixing HTTP/2 and HTTP/1.1 requests.
If you receive a timeout exception, you may be attempting to access AVS in an unsupported country. VPNs can also cause this issue. If you are accessing AVS from a supported country, first try at a different time. If you are still encountering this problem, create an issue.
If you encounter a closed channel exception, make sure that the timezone on your machine matches what's listed at alexa.amazon.com.