【问题标题】:Google provisioning api returning apparently bogus error for account creationGoogle 配置 api 返回明显虚假的帐户创建错误
【发布时间】:2012-11-16 20:58:31
【问题描述】:

我们使用 Google Python API 创建帐户。从太平洋标准时间 2012 年 11 月 8 日下午 1 点开始,我们 已经开始收到这些间歇性错误消息:

errorCode="1301" invalidInput="loginname" reason="EntityDoesNotExist"

当我们检查 Google 仪表板时,实际上已经创建了帐户,但其余的 由于 google 发回的错误消息,我们的帐户创建任务未完成。

有没有其他人注意到这个问题和/或知道为什么会发生这种情况?

我们的帐户配置代码非常强大,在 11 月 8 日之前已经创建了 50,000 多个帐户。

这里是sn-p的代码:

r = client.CreateUser(act.localpart, family_name, given_name, password, suspended='false', quota_limit=25600, password_hash_function="SHA-1",change_password=None )

这是完整的回溯:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 105, in _run
    self.main()
  File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 254, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in create_accountgmail
  File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 348, i  expose
    output = database.run_with_transaction(
  File "<string>", line 5, in run_with_transaction
  File "/usr/lib/python2.4/site-packages/turbogears/database.py", line 376, in s _rwt
    retval = dispatch_exception(e, args, kw)
  File "/usr/lib/python2.4/site-packages/turbogears/database.py", line 357, in s _rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 365, i  <lambda>
    mapping, fragment, args, kw)))
  File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 393, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File "/usr/lib/python2.4/site-packages/turbogears/errorhandling.py", line 72, in try_call
    return func(self, *args, **kw)
  File "<string>", line 3, in create_accountgmail
  File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 182, in validate
    return errorhandling.run_with_errors(errors, func, *args, **kw)
  File "/usr/lib/python2.4/site-packages/turbogears/errorhandling.py", line 115, in run_with_errors
    return func(self, *args, **kw)
  File "<string>", line 3, in create_accountgmail
  File "/usr/lib/python2.4/site-packages/turbogears/identity/conditions.py", line 235, in require
    return fn(self, *args, **kwargs)
  File "/usr/local/MYA/mya/account_controllers.py", line 1893, in create_accountgmail
    raise Exception('Could not create gmail account, %s: %s'%(result, act.format_address()))
Exception: Could not create gmail account, RequestError: Server responded with: 400, <?xml version="1.0" encoding="UTF-8"?>
<AppsForYourDomainErrors>
  <error errorCode="1301" invalidInput="LOGIN" reason="EntityDoesNotExist" />
</AppsForYourDomainErrors>: LOGIN@berkeley.edu

【问题讨论】:

    标签: google-provisioning-api


    【解决方案1】:

    另一个有同样问题的人向谷歌提交了一张票并得到了这个回复:

    我们从 Google Enterprise 支持部门收到了以下关于 “EntityDoesNotExist”配置错误:

      It seems that it's the request to retrieve the user that is
      returning this exception. It's most likely due to a propagation
      delay in our servers: the user is correctly provisioned but the
      information isn't propagated quickly enough and the call to
      retrieve the user is made on a server where the user isn't
      provisioned yet so you get the error EntityDoesNotExist.
    
      As a temporary workaround until additional specialists can
      resolve the propagation issue, I suggest you ignore the requests
      that are failing with the error EntityDoesNotExist. I have added
      your case to an issue report and will be sure to update you with
      additional updates as they transpire.
    

    【讨论】:

      【解决方案2】:

      我在使用他们的 .NET 库时遇到了同样的问题,Google 支持告诉我停止使用客户端登录并使用 OAuth2.0。客户端登录已弃用:https://developers.google.com/accounts/docs/AuthForInstalledApps

      我目前正在与 OAuth 搏斗,所以我无法报告它是否工作得更好。然而这个问题在此期间自行消失了。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-08-10
        • 2012-01-19
        • 1970-01-01
        • 2015-01-18
        • 2021-10-02
        • 2014-07-19
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多