HTTPException: Deadline exceeded while waiting for HTTP response from URL: https://api.amazon.com/auth/o2/token #391

Closed
jerblack opened this Issue Aug 31, 2016 · 29 comments

Comments

Projects
None yet

Today I started getting the error below when I try to use acd_cli. I tried a sync and an init and they both give the same error.

HTTPException: Deadline exceeded while waiting for HTTP response from URL: https://api.amazon.com/auth/o2/token

I remove the oauth_data file in my cache and still get the same error. I am dead in the water at the moment. Any suggestions?

Also, I heard that Amazon switched over to make their Drive API invite only. I assume that affects acd_cli as well. Did you receive an invite, or is acd_cli shutting down now?


from https://tensile-runway-92512.appspot.com/?code=***********&scope=clouddrive%3Aread+clouddrive%3Awrite

Internal Server Error

The server has either erred or is incapable of performing the requested operation.

Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/apps/s~tensile-runway-92512/2.387559670694189735/main.py", line 88, in get
    resp = urllib.urlopen(AMAZON_OA_TOKEN_URL, urllib.urlencode(params))
  File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib.py", line 88, in urlopen
    return opener.open(url, data)
  File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib.py", line 205, in open
    return getattr(self, name)(url, data)
  File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib.py", line 433, in open_https
    errcode, errmsg, headers = h.getreply()
  File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/gae_override/httplib.py", line 623, in getreply
    response = self._conn.getresponse()
  File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/gae_override/httplib.py", line 526, in getresponse
    raise HTTPException(str(e))
HTTPException: Deadline exceeded while waiting for HTTP response from URL: https://api.amazon.com/auth/o2/token

I'm getting a new error now from https://tensile-runway-92512.appspot.com/

Error
    Over Quota
    This application is temporarily over its serving quota. Please try again later. 

Synopis commented Sep 1, 2016

I've been getting the same error too.

+1 here:

$ acdcli sync
Traceback (most recent call last):
  File "/usr/sbin/acdcli", line 9, in <module>
    load_entry_point('acdcli==0.3.1', 'console_scripts', 'acdcli')()
  File "/usr/bin/acd_cli.py", line 1567, in main
    acd_client = client.ACDClient(CACHE_PATH, SETTINGS_PATH)
  File "/usr/lib/python3.5/site-packages/acdcli/api/client.py", line 44, in __init__
    self.handler = oauth.create_handler(cache_path)
  File "/usr/lib/python3.5/site-packages/acdcli/api/oauth.py", line 28, in create_handler
    return AppspotOAuthHandler(path)
  File "/usr/lib/python3.5/site-packages/acdcli/api/oauth.py", line 167, in __init__
    self.load_oauth_data()
  File "/usr/lib/python3.5/site-packages/acdcli/api/oauth.py", line 99, in load_oauth_data
    self.get_auth_token(reload=False)
  File "/usr/lib/python3.5/site-packages/acdcli/api/oauth.py", line 117, in get_auth_token
    self.refresh_auth_token()
  File "/usr/lib/python3.5/site-packages/acdcli/api/oauth.py", line 210, in refresh_auth_token
    'Error refreshing authentication token: %s' % response.text)
acdcli.api.common.RequestError: RequestError: 1004, Error refreshing authentication token: 
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>503 Over Quota</title>
<style><!--
body {font-family: arial,sans-serif}
div.nav {margin-top: 1ex}
div.nav A {font-size: 10pt; font-family: arial,sans-serif}
span.nav {font-size: 10pt; font-family: arial,sans-serif; font-weight: bold}
div.nav A,span.big {font-size: 12pt; color: #0000cc}
div.nav A {font-size: 10pt; color: black}
A.l:link {color: #6f6f6f}
A.u:link {color: green}
//--></style>

</head>
<body text=#000000 bgcolor=#ffffff>
<table border=0 cellpadding=2 cellspacing=0 width=100%>
<tr><td bgcolor=#3366cc><font face=arial,sans-serif color=#ffffff><b>Error</b></td></tr>
<tr><td>&nbsp;</td></tr></table>
<blockquote>
<H1>Over Quota</H1>
This application is temporarily over its serving quota.  Please try again later.

<p>
</blockquote>
<table width=100% cellpadding=0 cellspacing=0><tr><td bgcolor=#3366cc><img alt="" width=1 height=4></td></tr></table>
</body></html>

Getting the same right now. Found an issue from September 2015 here where the same thing happened and it was due to something being down on amazon's end. Best bet now is to just wait.

Lets hope that's it.

okiwoki commented Sep 1, 2016

Ditto, getting the same thing.

Bump. If you try to do a re-initialization or browse to the page manually you get the same error. I'm now getting "over quota" instead of deadline exceeded so obviously something is broken on the Amazon side and they're probably fixing it?

Any chance they changed the system and https://tensile-runway-92512.appspot.com/ is not the correct address to get? That seems like a very specific server address and not something like acdthirdpartyauth.appspot.com that would go to a load balancer or something.

Same error good god lol this is crashing my whole system

Simply change it to an app that isnt rate limited acdcli

yea, same error https://tensile-runway-92512.appspot.com/ is overloaded. So our tokens are expiring and losing all ties to the back-end :/

thenoahcomputer commented Sep 1, 2016 edited

Happening for me as well. Storage went down before the authentication page did. The authentication page after entering credentials was DDoS for awhile as (I assume) everyone using acd_cli simultaneously tried to reauthenticate. Message switched to the quota exceeded after a few minutes.

jerblack commented Sep 1, 2016

The https://tensile-runway-92512.appspot.com/ is part of the acd_cli app, and is used to act as a go-between for handling oauth for ACD_CLI with Amazon. That's why it's not a familiar looking URL, or being load-balanced as was asked earlier.

Is anyone familiar with the process for creating a personal security profile on the Amazon developer portal to bypass this? I found documentation here, but it looks like that portal was updated and the documentation is no longer correct. If we could make this process work, then we could bypass the need to connect to the tensile-runway server.

Figured it out!!!

Load up this website - https://drivesink.appspot.com/

Click on "Or you can just get your access token right here."

Delete your oauth_data token and replace it with that Token Key
{
"access_token"


}

Run acd_cli sync
than acd_cli mount /yourshitson!@#!@#

epemetheus solution confirmed working for me

Did the work around by epemetheus till this gets sorted.

On Wed, Aug 31, 2016, 5:59 PM Jeremy Black notifications@github.com wrote:

The https://tensile-runway-92512.appspot.com/ is part of the acd_cli app,
and is used to act as a go-between for handling oauth for ACD_CLI with
Amazon. That's why it's not a familiar looking URL, or being load-balanced
as was asked earlier.

Is anyone familiar with the process for creating a personal security
profile on the Amazon developer portal to bypass this? I found
documentation here
http://acd-cli.readthedocs.io/en/latest/authorization.html, but it
looks like that portal was updated and the documentation is no longer
correct. If we could make this process work, then we could bypass the need
to connect to the tensile-runway server.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#391 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOjVUg7C2-xoFZmYGUSNus3Prje0yw0gks5qliL6gaJpZM4JyLrn
.

jerblack commented Sep 1, 2016

Back in business thanks to epemetheus! Thanks!

nonissue commented Sep 1, 2016

Cool, thanks for the work around @epemetheus. it is a little worrying though, does this mean amazon plans to ban (or has banned) acd_cli?

With this solution you're enabling CloudSync, a third-part application not related to ACD, to both:

  • Ability to read your Cloud Drive content.
  • Ability to modify your Cloud Drive content.

@epemetheus, @jerblack, @thenoahcomputer, @nonissue
Are you sure you all want to do this?

I think it's more that there is just a bug on the intermediary server and
yadayada hasn't seen this yet to go look and fix it. I wouldn't worry too
much.

On Wed, Aug 31, 2016 at 6:47 PM nonissue notifications@github.com wrote:

Cool, thanks for the work around @epemetheus
https://github.com/epemetheus. it is a little worrying though, does
this mean amazon plans to ban (or has banned) acd_cli?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#391 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOjVUsyQRqHyvn4B2q8o8UhKOhq64o8Lks5qli6rgaJpZM4JyLrn
.

Sure why not, all my shit is in AES-256bit encryption?

JustinGrote commented Sep 1, 2016 edited

Yeah for 1 I don't care it's all encrypted, for 2 this is a desktop application,
and his processing looks like it doesn't save the API keys on his server
(in fact the nature that he doesn't "get the key automatically" for you
means he probably can't, the same reason why you have to do it for acdcli)

On Wed, Aug 31, 2016 at 6:54 PM epemetheus notifications@github.com wrote:

Sure why not, all my shit is in AES-256bit encryption?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#391 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOjVUoOGcLza4It-jr-mTVv-WO5crI-iks5qljAOgaJpZM4JyLrn
.

Contributor

zmwangx commented Sep 1, 2016

The title of this issue is misleading considering developments since its creation. What about changing it to a more fitting description for discoverability?

thenoahcomputer commented Sep 1, 2016 edited

So it would appear epemetheus solution only works for 1 hour until the token needs to be refreshed and can't auto-refresh

Nutz, yeah it broke after an hour :/

@jerblack Unless I'm missing something, it appears that access to the Amazon Drive API is now invite-only. I went through the process of setting up the security profile but kept getting an invalid_scope error. With a little more digging I found an issue where @yadayada goes off on someone for not thoroughly reading the docs and whitelisting the app. However, on my profile I have no way of doing that.

Whitelisting Your App

You must be invited into the Amazon Drive API service to whitelist your app for Amazon Drive or you will not be able to send any node-related requests.

Source: https://developer.amazon.com/public/apis/experience/cloud-drive/content/getting-started

https://developer.amazon.com/cloud-drive
https://news.ycombinator.com/item?id=12273150

dany20mh commented Sep 1, 2016 edited

Can we setup a automatic script that get the oauth from that site and replace it in the cache?

Like this

curl https://drivesink.appspot.com/config?c=xxxxxx -fo /yourcachfolder/oauth_data

P.S It give you the specific address there.
P.S2 I guess it won't work cause the address changes and then you can't get it and you have to change the address again.

Owner

yadayada commented Sep 1, 2016 edited

I suggest to wait 3 hours until the quota is reset. Again, a note to the desperate: I think the backup authentication Appspot app may still be working, see #147 (comment).

jerblack commented Sep 1, 2016

Things have started working again! I can now authenticate again.

jerblack closed this Sep 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment