Ошибка google drive 404

Learn how to resolve problems with Google Drive.

403 or 404 Errors

Users of Google Drive can sometimes see Error 403 (permission denied) or Error 404 (not found). There are a few common reasons for this:

  1. You may have inadvertently deleted the Google worksheet. You can recover the deleted Google worksheet as described in Recover a deleted Google file or worksheet. 
  2. You are not the owner of the document but this is a shared document owned by a different Google account. Check your document sharing permissions on Google.
  3. You have multiple Google accounts (let’s call them Acct1 and Acct2): your spreadsheet is owned by Acct1 but you sign into AppSheet using Acct2 to access the spreadsheet. Either use the same account or share the document across accounts. 
  4. You had access to the file at one point, but the access has been removed.
  5. This can sometimes occur if you have a corporate Google Docs account that has an admin policy that prohibits all users from enabling third-party software like AppSheet (so you may need to talk to your account admin).

See also Share files from Google Drive.

Google AppScript onEdit Triggers

If you use one of the AppSheet add-ons to integrate with Google Forms, Sheets, or Docs, see Use data from Google Sheets to learn more about specific limitations on those integrations. 

In particular, if you utilize Google AppScript onEdit triggers on your Google Sheet, or a third-party add on that utilizes these triggers, the triggers are not fired when AppSheet makes a change to the data in the spreadsheet. This is an unfortunate limitation imposed by Google on all third-party solutions like AppSheet. The best workaround is to utilize a timed AppScript trigger (or an onChange trigger) rather than an onEdit trigger.

Google Sheet filters

Also, do not use filters on your Google Sheets — it can make the filtered rows invisible to updates. Instead, use filter views (this is a Google Sheets feature that lets each user create and use their own filters without affecting other users of the sheet). See also: Use data from Google Sheets

Public Google Sheets

Make certain that your spreadsheet is not marked as Public. The Google spreadsheets API doesn’t enable updates against public spreadsheets.

Google worksheet names exceeding 31 characters in length

Make certain that your Google worksheet names do not exceed 31 characters in length. All characters in the name are counted including blanks and special characters.

Error: Unable to read spreadsheet: hexadecimal value 0xNN is an invalid character

 When AppSheet attempts to read your Google worksheet you may see an error like the following:

Unable to read the spreadsheet for '<worksheet name>' due to spreadsheet reader error: '', hexadecimal value 0x0C, is an invalid character. Line 9999, position 999

The actual hexadecimal value will vary and as will the line and position values. The line and position are not helpful for the reason described below.

AppSheet reads the Google Sheet by asking Google to export the worksheet as an Excel .xlsx document. Google converts the Google worksheet into an Excel .xlsx document file and returns this .xlsx file to AppSheet. AppSheet reads the .xlsx file and extracts all of the worksheet cell values, formulas, formatting, and other information from the Excel .xlsx document.

An invalid character error occurs when Google fails to export the Google worksheet as a valid Excel .xlsx document. Instead, the exported Excel .xlsx document contains invalid data that Excel cannot read. The line and position values in the error message are not useful because they refer to a location in the exported Excel .xlsx document. There is no easy way to use these values to locate the problem in your worksheet.

You may be able to locate the problem by doing the following:

  1. Open your workbook in Google Sheets.
  2. From the Google Sheets File menu select Download as… and then select Microsoft Excel (.xlsx). By doing this you are exporting the Google workbook to Excel in the same way that Google Sheets is exporting it to AppSheet.
  3. When the export finishes, you will see the exported .xlsx file name at the bottom left of your browser screen. 
  4. Click the ^ character to the right of the .xlsx file name and select Open. This will open the exported file in Excel. Excel is very likely to report an error when reading the exported file. The Excel error message may help you locate the problem.
  5. Return to Google Sheets and modify your workbook to eliminate the problem.
  6. Repeat the steps above until the you have eliminated the problem. 

Here are some things to check:

  • Ensure there are no invalid character values in your worksheet cell values. Invalid character values may be displayed in the form . You can use the Google Sheets search function to locate the invalid character. Open your worksheet in Google Sheet. From the Edit menu select Find and replace … Copy into the Find box to search for the invalid character.
  • One customer reported their problem was caused by an import range function in a cell of their Google worksheet. Replacing the import range with the actual data values eliminated the problem.
  • If you discover other causes for this problem, report them to us. We will add your information to this list to help other users.

Was this helpful?

How can we improve it?

I’m using google drive REST API V3 to access the file. The basic api url is:
https://www.googleapis.com/drive/v3/files/fileid

And the header contains key: Authorization with Bearer access token obtained from oauth.

However, if you create an normal google doc, this works. the response is:

{
"id": "1v3V0BWcWtYu_K9OLm1rffHA3vj5Bz8SY-0-JpU7CiEc",
"name": "test",
"mimeType": "application/vnd.google-apps.document",
"parents": [
    "0AP75Wn-e9WDqUk9PVA"
]
}

But if I created a google doc from google template, this returns 404. see below:

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

asked Jul 23, 2018 at 23:07

cairabbit's user avatar

cairabbitcairabbit

551 silver badge9 bronze badges

2

2021 answer here, in my case the issue (404 for some files) existed because the Google project number I was using was wrong.

And to make it harder, some accounts did work perfectly, and some did not using just this scope:

https://www.googleapis.com/auth/drive.file

As it is indicated in the google docs of the picker:

// Replace with your own project number from console.developers.google.com.
// See "Project number" under "IAM & Admin" > "Settings"
const appId = "1234567890";

After the project number was fixed, everything started working flawlessly (No need for https://www.googleapis.com/auth/drive scope as its a free-for-all scope that gives permissions for everything).

Cheers.

answered Apr 30, 2021 at 13:49

Josep Vidal's user avatar

Josep VidalJosep Vidal

2,5602 gold badges16 silver badges27 bronze badges

1

I did a bit test and found that the «drive.file» scope actually has some problem with getting file metadata/content. From the documentation, the «drive.file» allow the app to access the file that created by this app, or user explicitly open the file with this app, from from drive or from google doc. When I testing this, actually this doesn’t work as expect. I upload a few files, one of the files can be accessed by my app, but the others not. I remembered when I publish my app, the google drive team reviewed my app and rejected a few times with the scope, finially the app passed review with «drive.file» scope only.

Did anyone encounter same issue?

answered Aug 21, 2018 at 4:43

cairabbit's user avatar

cairabbitcairabbit

551 silver badge9 bronze badges

Filling this in here for posterity: when using the drive.file permission with a file picker, the url/token you receive will only work if the picker was hosted on the same domain as is configured in the Google Developer Console Drive SDK configuration page (https://console.developers.google.com/apis/api/drive.googleapis.com/drive_sdk).

If you are hosting it on any other domain, you’ll get a 404 if you try and use the URL to directly download the file: you’ll need to use drive.readonly or drive permissions.

answered Jun 18, 2019 at 8:12

Femi's user avatar

FemiFemi

64.2k8 gold badges118 silver badges148 bronze badges

Somehow this is not the case. I created a google doc using the resume template. I obtained the fileID and run it against files.get. I got a 200 response:

{
 "kind": "drive#file",
 "id": "1y1h2vHYwrb57O-ein7VhqMwwJKtr4pP4N4bBow7-vus",
 "name": "resumeTemplate",
 "mimeType": "application/vnd.google-apps.document"
}

BTW, the URI requst for files.get is

https://www.googleapis.com/drive/v3/files/fileId

not

https://www.googleapis.com/drive/v3/files/

answered Jul 24, 2018 at 14:27

ReyAnthonyRenacia's user avatar

1

After I requested more permissions, the problem solved. Nothing changed.

answered Nov 30, 2018 at 3:50

cairabbit's user avatar

cairabbitcairabbit

551 silver badge9 bronze badges

In my case it was about setting Drive.files().get(googleId).setSupportsAllDrives(true) to gain access to files on shared drives.

answered Dec 7, 2020 at 16:25

palisade's user avatar

palisadepalisade

4763 silver badges6 bronze badges

As the documentation says drive.file scope is used to view and manage Google Drive files and folders that you have opened or created with this app.

I also encouraged 404 Error and I finally found the solution, In my case, I used Google Drive Picker in the front-end for selecting files, and then I send the file-ids to the backend for downloading them and I had the same 404 File not found Error on the backend when I try to download files.

I see the error because I did not set appId in my picker API.
so when I try to instantiate googlePicker I set the app key and then everything is fixed.

// Replace with your own project number from console.developers.google.com.
// See "Project number" under "IAM & Admin" > "Settings"
var appId = "1234567890";

var picker = new google.picker.PickerBuilder()
            ...
            .setAppId(appId)
            ...
            .build(); 

Now both backend and front-end use the same application in google and when the user selects a file from picker API it is available in all applications.

More info: https://developers.google.com/picker/docs/

answered Feb 4, 2022 at 10:03

Jhkcia's user avatar

JhkciaJhkcia

2852 silver badges8 bronze badges

We are getting since yesterday an error each time we try to execute any Drive Method from Javascript Library, such as:

  • gapi.client.drive.files.get({‘fileId’: RootFolderID});
  • gapi.client.drive.children.list({‘folderId’ : FolderGUID, ‘q’: ‘trashed = ‘ + trashed});

Or any other.

When we execute this code code:

    var RootFolderID = "0Bz9GhmOJPXaDMmlnc1UtNmFKb28";
    var GetFileInfo = gapi.client.drive.files.get({'fileId': RootFolderID});
    GetFileInfo.execute(function(GetFileInfoResp){
        log("RootFolderID", RootFolderID);
        log("GetFileInfoResp", GetFileInfoResp);
    });

We get the following error

RootFolderID — 0Bz9GhmOJPXaDMmlnc1UtNmFKb28

GetFileInfoResp- Object {code: 404, message: «Not Found», data: Array[1], error: Object}
code: 404

data: Array[1]

error: Object

message: «Not Found»

proto: Object

Two days ago the same code was working fine.

Anyone has the same problem? do you have any clue?

When we try to execute the same method from the Drive SDK help, it works.

Like this post? Please share to your friends:
  • Ошибка grbl error 9
  • Ошибка google chrome 0xc0000142
  • Ошибка graphics device removed
  • Ошибка google captcha что это
  • Ошибка graphics accelerator