Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drive file update error 500

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"
}

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

Update
An excellent workaround proposed by Jon Skeet from:answer to this question

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?

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


like image 827
Raviprakash Avatar asked May 19 '14 09:05

Raviprakash


1 Answers

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.

like image 85
Eric Koleda Avatar answered Oct 16 '22 08:10

Eric Koleda