google appengine incapable of performing the reque

2019-08-18 03:05发布

I am using firebase admin module in my google app engine, Install all the modules but when I try to get user detail then it give me request error why?

from firebase_admin import auth as firebaseAuth
from firebase_admin import credentials

I am using this module and try to update user info

cred = credentials.Certificate('firebase-adminsdk.json')
default_app = firebase_admin.initialize_app(cred)
firebaseUser = firebaseAuth.get_user_by_email(username)
print(firebaseUser.uid)

geting error this

Traceback (most recent call last):
  File "/var/www/html/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "/var/www/html/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "/var/www/html/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/var/www/html/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/var/www/html/shipper-dashboard/src/lib/basehandler.py", line 241, in dispatch
    webapp2.RequestHandler.dispatch(self)
  File "/var/www/html/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/var/www/html/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/var/www/html/shipper-dashboard/src/utility/validation_api.py", line 51, in wrapped
    return f(self, *args)
  File "/var/www/html/shipper-dashboard/src/handler/user_management.py", line 269, in post
    firebaseUser = firebaseAuth.get_user_by_email(username)
  File "/var/www/html/shipper-dashboard/lib/firebase_admin/auth.py", line 252, in get_user_by_email
    response = user_manager.get_user(email=email)
  File "/var/www/html/shipper-dashboard/lib/firebase_admin/_user_mgt.py", line 397, in get_user
    response = self._client.request('post', 'getAccountInfo', json=payload)
  File "/var/www/html/shipper-dashboard/lib/firebase_admin/auth.py", line 513, in request
    resp = self.session.request(method, self.ID_TOOLKIT_URL + urlpath, **kwargs)
  File "/var/www/html/shipper-dashboard/lib/google/auth/transport/requests.py", line 198, in request
    self._auth_request, method, url, request_headers)
  File "/var/www/html/shipper-dashboard/lib/google/auth/credentials.py", line 122, in before_request
    self.refresh(request)
  File "/var/www/html/shipper-dashboard/lib/google/oauth2/service_account.py", line 322, in refresh
    request, self._token_uri, assertion)
  File "/var/www/html/shipper-dashboard/lib/google/oauth2/_client.py", line 145, in jwt_grant
    response_data = _token_endpoint_request(request, token_uri, body)
  File "/var/www/html/shipper-dashboard/lib/google/oauth2/_client.py", line 106, in _token_endpoint_request
    method='POST', url=token_uri, headers=headers, body=body)
  File "/var/www/html/shipper-dashboard/lib/google/auth/transport/requests.py", line 124, in __call__
    six.raise_from(new_exc, caught_exc)
  File "/var/www/html/shipper-dashboard/lib/six.py", line 737, in raise_from
    raise value
TransportError: ('Connection aborted.', error(13, 'Permission denied'))

0条回答
登录 后发表回答