驱动器文件更新错误500 [英] Drive file update error 500

查看:88
本文介绍了驱动器文件更新错误500的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用在appdata文件夹中保留了一些特定于应用的文件。但是,当文件试图更新Drive应用程序数据中的文件时,从Drive服务器反复获取内部错误。我正在使用Objective-c客户端调用Drive API。
您能否帮助解决这些问题?至少几个建议找出导致这个错误的原因。



以下是记录的请求和响应:

My app keeps few app specific files in appdata folder. But when file tries to update the file in Drive app data repeatedly getting internal error from the Drive server. I am using Objective-c client to call Drive APIs. Could you please help what is wrong in these. At least give few suggestion to find out the cause for this error.

Below is the logged request and response:

drive.files.update (bytes 0-40318/40319)

2014-05-19 09:23:44 +0000
Request: PUT https://www.googleapis.com/upload/rpc?uploadType=resumable&prettyPrint=false&upload_id=AEnB2Uo8yrae46aQQ-HYEtQgmXt2qNppZmkBYnPa8iXF4L6xdNYaVij6u3xLTT5kRIeH1mbPUUfUuEDEvYoouZheVwwWT6iw_A
Request headers:
  Content-Length: 40319
  Content-Range: bytes 0-40318/40319
  Content-Type: binary/octet-stream
  User-Agent: com.mycompanyname.appname/1.4.0 google-api-objc-client/2.0 MacOSX/10.8.5 (gzip)

Request body: (40319 bytes)
<<40319 bytes>>

Response: status 200
Response headers:
  Alternate-Protocol: 443:quic
  Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  Content-Length: 144
  Content-Type: application/json; charset=UTF-8
  Date: Mon, 19 May 2014 09:23:44 GMT
  Expires: Fri, 01 Jan 1990 00:00:00 GMT
  Pragma: no-cache
  Server: HTTP Upload Server Built on May 15 2014 11:06:48 (1400177208)

Response body: (144 bytes)
{
  "error" : {
    "message" : "Internal Error",
    "data" : [
      {
        "reason" : "internalError",
        "message" : "Internal Error",
        "domain" : "global"
      }
    ],
    "code" : 500
  },
  "id" : "gtl_20"
}



----------------- ------------------------------------------



更新

Jon提出的极佳解决方法Skeet 来自:对此的回答问题


I已经设法重现该问题。没有setNewRevision(false)它
的作品 - 我意识到这可能在所有情况下都不可行,但对于你来说这是一个
合理的解决方法吗?

I've managed to reproduce the issue. Without setNewRevision(false) it works - I realize that may not be feasible in all cases, but is it a reasonable workaround for you for the moment?

但是,我现在将暂时搁置这种解决方法。我们倾向于使用 setNewRevision(false),以防止导致用户数据存储配额的使用增加 - http://developers.google.com/drive/v2/reference/files/update

However, I will on hold on such workaround at this moment. We prefer to have setNewRevision(false), to prevent from causing increased use of the user's data storage quota - http://developers.google.com/drive/v2/reference/files/update

推荐答案

此错误是由于文件的200个固定版本的未记录限制。正如您所提到的,解决方法是不要在上传时创建新版本,或者取消固定一些现有版本。

This error is due to an undocumented limit of 200 pinned revisions for a file. As you mentioned, the workaround is either to not create a new revision on upload, or alternatively unpin some of your existing revisions.

这篇关于驱动器文件更新错误500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆