Getting "googleapi: Error 404: File not found:" error only for some files in a remote

Thank you for that.

I'll post the most important parts redacted here.

Firstly, yes google really does return a 404 message

2022/05/12 14:09:28 DEBUG : GET /drive/v3/files/0B15NJBKtA97odkgyZTVIMjhvMnZMWEFrRk9KdTlLNnhpT0Vz?alt=media HTTP/1.1
Host: www.googleapis.com
User-Agent: rclone/v1.58.1
Authorization: XXXX
Accept-Encoding: gzip
2022/05/12 14:09:28 DEBUG : HTTP RESPONSE (req 0xc000784c00)
2022/05/12 14:09:28 DEBUG : HTTP/1.1 404 Not Found
Content-Length: 338
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: private, max-age=0
Content-Type: application/json; charset=UTF-8
Date: Thu, 12 May 2022 12:09:28 GMT
Expires: Thu, 12 May 2022 12:09:28 GMT
Server: UploadServer
Vary: Origin
Vary: X-Origin
X-Guploader-Uploadid: ADPycduOOR8JUz_ihnqNdOTt4zyh9E0KZSrDruWrhi4_8xIeSQ0xebU3dgBIxlZIv6E7sO-MoNIhI0YLtM0705buo3RSBg

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "notFound",
    "message": "File not found: 0B15NJBKtA97odkgyZTVIMjhvMnZMWEFrRk9KdTlLNnhpT0Vz.",
    "locationType": "parameter",
    "location": "fileId"
   }
  ],
  "code": 404,
  "message": "File not found: 0B15NJBKtA97odkgyZTVIMjhvMnZMWEFrRk9KdTlLNnhpT0Vz."
 }
}

There is a bit more detail in the error message, but nothing really interesting.

Let's look at the file in the listing

    {
      "id": "0B15NJBKtA97odkgyZTVIMjhvMnZMWEFrRk9KdTlLNnhpT0Vz",
      "name": "PORTADAS.pdf",
      "mimeType": "application/pdf",
      "trashed": false,
      "explicitlyTrashed": false,
      "parents": [
        "..."
      ],
      "webViewLink": "...",
      "createdTime": "2016-10-13T22:22:56.000Z",
      "modifiedTime": "2016-10-14T06:47:44.952Z",
      "md5Checksum": "0665a097cd9a5a203f62f9cadc5d5304",
      "size": "159789"
    }

There is absolutely nothing unusual I can see about that.

What might be useful is to see the complete info about the file - rclone only asks for a small portiion of the info.

You can try this here in the Google API explorer: Files: get  |  Drive API  |  Google Developers

You'll need to auth with the same user that you are trying to use with rclone, then put the id of the file in the fileID field and send the request. You could see a similar JSON blob but with more info. What each field means is explained in the API docs but I'm particularly interested in the capabilities section which shows what the user you are using can do to the file. The other things in there may give you a clue also, but are likely to contain sensitive details about users / usernames so you may want to edit them first if you post them here.

1 Like