Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google app engine 驱动器API文件修补方法失败,错误为;“前提条件失败”&引用;条件不满足“;_Google App Engine_Google Drive Api - Fatal编程技术网

Google app engine 驱动器API文件修补方法失败,错误为;“前提条件失败”&引用;条件不满足“;

Google app engine 驱动器API文件修补方法失败,错误为;“前提条件失败”&引用;条件不满足“;,google-app-engine,google-drive-api,Google App Engine,Google Drive Api,似乎一夜之间Google Drive API methods files().patch(,).execute()停止工作并引发异常。如果你“尝试一下”,这个问题也可以通过谷歌的参考页面看到 异常响应是: 500 Internal Server Error cache-control: private, max-age=0 content-encoding: gzip content-length: 162 content-type: application/json; charset

似乎一夜之间Google Drive API methods files().patch(,).execute()停止工作并引发异常。如果你“尝试一下”,这个问题也可以通过谷歌的参考页面看到

异常响应是:

500 Internal Server Error

cache-control:  private, max-age=0
content-encoding:  gzip
content-length:  162
content-type:  application/json; charset=UTF-8
date:  Thu, 22 Aug 2013 12:32:06 GMT
expires:  Thu, 22 Aug 2013 12:32:06 GMT
server:  GSE

    {
     "error": {
      "errors": [
       {
        "domain": "global",
        "reason": "conditionNotMet",
        "message": "Precondition Failed",
        "locationType": "header",
        "location": "If-Match"
       }
      ],
      "code": 500,
      "message": "Precondition Failed"
     }
    }

这确实影响了我们的应用程序。

我们也遇到了这种情况。一个快速解决方案是添加以下标题:
如果匹配:
(理想情况下,您应该使用实体的etag,但您现在可能没有解决冲突的逻辑)

谷歌开发人员,如果您计划部署突破性的更改,请提前通知我们。

此处重复

我记得一个开发人员视频中的评论说“使用更新而不是补丁,因为它在内部减少了一次服务器往返”。我由此推断,补丁会检查ETag,但更新不会。我已经改变了我的代码,用更新来代替补丁,此后问题就再也没有出现过


喜欢在移动的目标上发展;-)

看起来像是过去24小时内的某个时候,这些文件。补丁问题已经回到了8月22日以前的工作方式。 每当我们试图修补文件的最后修改时间戳时,我们也遇到了这个问题-请参阅下面的日志文件摘录:

20130826 13:30:45 - GoogleApiRequestException: retry number 0 for file patch of File/Folder Id 0B9NKEGPbg7KfdXc1cVRBaUxqaVk
20130826 13:31:05 - ***** GoogleApiRequestException: Inner exception: 'System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at Google.Apis.Requests.Request.InternalEndExecuteRequest(IAsyncResult asyncResult) in c:\code.google.com\google-api-dotnet-client\default_release\Tools\BuildRelease\bin\Debug\output\default\Src\GoogleApis\Apis\Requests\Request.cs:line 311', Exception: 'Google.Apis.Requests.RequestError
Precondition Failed [500]
Errors [
    Message[Precondition Failed] Location[If-Match - header] Reason[conditionNotMet] Domain[global]
]
'
20130826 13:31:07 - ***** Patch file request failed after 0 tries for File/Folder 0B9NKEGPbg7KfdXc1cVRBaUxqaVk
今天,只要修补文件时间戳,同一进程的运行就会成功,就像8月22日之前一样

由于这个4/5天的小故障,我们现在有数百(可能数千)个时间戳错误的文件


我知道API是测试版,但请,请谷歌开发人员“在任何‘试用修复’之前通知我们”,并至少在此论坛上发布帖子,以确认问题,从而节省我们查找用户程序故障的时间。

感谢您的提示,我将研究如何实施您的快速修复。您可能会认为Google会在部署更改之前运行单元测试。很明显,这里有些东西漏掉了。使用更新而不是补丁是更好的选择,到目前为止,这对我很有效。谢谢你的建议。谷歌没有关于修补补丁()或为什么它会崩溃的消息。