question

callmerockyli avatar image
callmerockyli asked

Getting "Illegal character in path at index" Error

Hi all, I am trying to get AVS to my android app. I followed the instruction to get LWA and create my own android app with LWA. Everything work fine with the official LWA SDK. But once I change the SDK to the AVS Beta SDK from "Authorizing Your Alexa-enabled Product from an Android or iOS Mobile App", my app crash and show "Illegal character in path at index 31: https://[ https://api.amazon.com]:443/user/profile" error. Is it cause by Beta SDK? I didn't change anything from my app but the SDK version. below is the whole error message: 09-02 13:14:13.733 11645-12672/linkboard.reindeer.com.linkboardavstesting E/AndroidRuntime﹕ FATAL EXCEPTION: AmazonAuthorzationLibrary#2 Process: linkboard.reindeer.com.linkboardavstesting, PID: 11645 java.lang.IllegalArgumentException: Illegal character in path at index 31: https://[ https://api.amazon.com]:443/user/profile at java.net.URI.create(URI.java:733) at org.apache.http.client.methods.HttpGet. (HttpGet.java:80) at com.amazon.identity.auth.device.endpoint.ProfileRequest.getRequest(ProfileRequest.java:123) at com.amazon.identity.auth.device.endpoint.AbstractTokenRequest.initializeHttp(AbstractTokenRequest.java:165) at com.amazon.identity.auth.device.endpoint.AbstractTokenRequest.submit(AbstractTokenRequest.java:228) at com.amazon.identity.auth.device.endpoint.ServerCommunication.getProfile(ServerCommunication.java:181) at com.amazon.identity.auth.device.authorization.ProfileHelper.getProfileRemote(ProfileHelper.java:125) at com.amazon.identity.auth.device.authorization.ProfileHelper.access$300(ProfileHelper.java:31) at com.amazon.identity.auth.device.authorization.ProfileHelper$1.onSuccess(ProfileHelper.java:67) at com.amazon.identity.auth.device.authorization.TokenHelper.getToken(TokenHelper.java:74) at com.amazon.identity.auth.device.authorization.ProfileHelper.getProfile(ProfileHelper.java:47) at com.amazon.identity.auth.device.authorization.api.AmazonAuthorizationManager$4.run(AmazonAuthorizationManager.java:514) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
alexa voice service
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

swasey@amazon avatar image
swasey@amazon answered
I'm sorry you had trouble with the Beta Mobile SDK we provided. This was a known bug we discovered internally and a fix has been created. We haven't updated the AVS documentation yet to point at the final release version, but the Login With Amazon team has released the new changes as non-Beta software. If you could go here: http://login.amazon.com/android and download the latest version and switch out the Jar, then you should be good to go. Please respond if there's any further issues with it.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

callmerockyli avatar image
callmerockyli answered
But "Authorizing Your Alexa-enabled Product from an Android or iOS Mobile App" said I need to "be sure to install the beta SDK instead of the production SDK when you get to the section called Install the Login with Amazon Library." Can I use that .Jar for AVS?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

swasey@amazon avatar image
swasey@amazon answered
The documentation you were looking at was out of date and has since been updated (within the last few minutes actually) to point to the non-Beta SDK provided on the LWA page. The AVS documentation linked to a Beta version of the LWA SDK because the LWA team was not ready to publicly release it to all their customers, but AVS customers (such as yourself) required some of the new features. Now that LWA has publicly released the final version of the SDK the AVS documentation no longer links to the Beta version. So please replace the Jar with the one provided from the LWA link above, and mark this thread as answered if it resolves your problem. Message was edited by: swasey@amazon
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.