Storage: app_identity_service.GetAccessToken NOT_ALLOWED
See original GitHub issue- GAE standard env
- google-cloud-storage==1.9.0
steps to reproduce:
- create a long-lived Bucket object
- do some file operations, under the hood it will get an access_token from IdentityService for you
- keep your Bucket instance live for at least 1h (so that access token can expire)
- next time when you’ll try to get a fresh token from IdentityService it will raise
NotAllowed
exception
code example: https://github.com/zyzniewski/app_identity_service_bug/blob/master/main.py
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Interface AppIdentityService (2.0.0) | Google App Engine ...
The AppIdentityService allows you to sign an arbitrary byte array using a per app ... Most developers should use getAccessToken instead.
Read more >No 'Access-Control-Allow-Origin' header with resumable upload
Ran into this problem and discovered that it was due to a missing "origin" header in the initial POST request coming from App...
Read more >Google-cloud-storage CORS Setting - iTecNote
I've done the CORS set to bucket of google cloud storage, there is no Access-Control-Allow-Origin ... getScopes(); String accessToken = appIdentityService.
Read more >Diff - external/googleappengine/python - Google Git
+ # We are not allowed to begin fetching the response to this new + ... + See https://developers.google.com/storage/docs/xml-api-overview ...
Read more >com.google.appengine.api.appidentity.AppIdentityService ...
getAccessToken (scopes); ... AppIdentityService (Showing top 18 results out of 315) ... Uploading files to Google Cloud Storage using JSON API, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah there’s definitely a possibility that App Engine can’t do authentication outside of a request context, so I would suggest creating your client during your request.
Also, we don’t fully support App Engine standard yet in these libraries. See #1893.
I’m also running into this issue with the Firebase Admin SDK on GAE Python 2.7. I call
firebase_admin.initialize_app()
when the app starts up. I thought maybe that happens under/_ah/warmup
request. And it works fine, but then after an hour, when it needs to refresh during another request, it fails. But how is that out of “request context”? Or do you mean that a request can’t refresh a token that a different request originally generated?If I call
firebase_admin.initialize_app()
on every request where I need it, will that add latency? Are there any other throttles on # of access tokens generated?