question

Sparkacus avatar image
Sparkacus asked

Alexa homekit clear cache oauth

Hey,

My app logs are being filled with errors due to invalid oath attempts, but I cannot work out why as the device discovery actually works.

Upon looking at my access logs, I see a flood of attempts to get a token during a single device discovery. Is this normal? I don't see why more than one request is necessary:

54.240.197.107 - - [01/Mar/2017:08:12:36 +0000] "POST /oauth/token HTTP/1.1" 200 1850 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.100 - - [01/Mar/2017:08:12:43 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.100 - - [01/Mar/2017:08:12:43 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.100 - - [01/Mar/2017:08:12:43 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.6 - - [01/Mar/2017:08:12:43 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.6 - - [01/Mar/2017:08:12:43 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.6 - - [01/Mar/2017:08:12:43 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

In the end I got so fed up that I decided to delete the world and start again :). By delete I mean, deleted the skill, deleted my apps cache & sessions, reinstalled the alexa IOS app, switched of all Alexa devices......but when I ran discover devices (remember I deleted the skill so I don't have ANY skills linking to my app)..... Alexa is still sending POST oauth requests to my app...???

I have disabled/enabled multiple skills while testing the home kit api so I can only assume that somehow previous configs are being used, which is really annoying. How do I stop this?

alexa skills kitalexa smart hometestinglogin with 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.

Brian@Amazon avatar image
Brian@Amazon answered
We've identified the issue and we are working to resolve it. I'll post back on this thread as soon as I have further information.
10 |5000

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

Sparkacus avatar image
Sparkacus answered

Something is definitely wrong. Amazon are still sending POST requests even though I have no Alexa skills configured and am not even trying to discover devices.

Anyone know how to stop this?

54.240.197.71 - - [02/Mar/2017:01:26:04 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.71 - - [02/Mar/2017:01:26:04 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.71 - - [02/Mar/2017:01:26:04 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.107 - - [02/Mar/2017:01:32:24 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.107 - - [02/Mar/2017:01:32:24 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.107 - - [02/Mar/2017:01:32:24 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.79 - - [02/Mar/2017:02:39:32 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.79 - - [02/Mar/2017:02:39:32 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.79 - - [02/Mar/2017:02:39:33 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.67 - - [02/Mar/2017:02:56:03 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.67 - - [02/Mar/2017:02:56:03 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

54.240.197.67 - - [02/Mar/2017:02:56:03 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_72)"

10 |5000

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

Brian@Amazon avatar image
Brian@Amazon answered
We've seen this issue before and we're diving in to resolve it. I'll keep you posted.
10 |5000

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

Sparkacus avatar image
Sparkacus answered

Thanks for getting back to me. Ok that's fine. I was more worried at first I had done something wrong :).

I do plan to recreate the alexa app, so now I know it's not me, I'll continue.

10 |5000

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

Brian@Amazon avatar image
Brian@Amazon answered
Hi it looks like you've deleted it if I'm looking at the right account. As a result we won't be able to look into your case specifically. Let us know if you still have a skill live.
10 |5000

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

Sparkacus avatar image
Sparkacus answered

That's correct. I have no skill configured, yet POST requests to my app from Amazon continue to occur, e.g.: 54.240.197.107 - - [04/Mar/2017:17:52:19 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_112)"

54.240.197.107 - - [04/Mar/2017:17:52:19 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_112)"

54.240.197.107 - - [04/Mar/2017:17:52:20 +0000] "POST /oauth/token HTTP/1.1" 401 67 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_112)"

If no app is configured, Amazon shouldn't send any requests.

I'll recreate the skill now if it'll help.

10 |5000

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

Brian@Amazon avatar image
Brian@Amazon answered
Recreating is likely not helpful here if you're getting requests without anything being live. We've seen duplicate requests mentioned on the forums before, but not requests occurring after the deletion of a skill. I've forwarded this information on to our dev team.
10 |5000

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

Sparkacus avatar image
Sparkacus answered

Any news? I really want to stop these invalid requests as it's filling up my logs.

10 |5000

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