'Deleting (latest) revision of file on Google Drive gives 500 Internal Error - How to fix?
Because of a malware attack a lot of files on our Google Drives got corrupted. Luckily it should be able to revert these files to the revision prior to the attack.
Using v3 or v2 of the Drive API, I list the revisions of each affected file. Again using the API, I delete the latest revision (the one that is corrupt) using a call like DELETE https://www.googleapis.com/drive/v3/files/11uTTqqrNErTglRGjqfWxwl0TnuoIVPQ3/revisions/0Bwt_TcYWSupqRDZiUDhDRVQ0cWF0RTBSQnNkMk5vbDg3TWowPQ.
Even using the "Try this API" on the Google reference page, I get 500 Internal Error. I tried multiple binary files. I can't imagine an overflow of server requests.
EDIT: Using the same workflow it works perfectly for a bunch of files, but for some (.BAK files, though other .BAK files don't give the error) the response code is consistently 500.
What might be causing this error? Is it not possible to delete the latest revision?
Solution 1:[1]
Since what you are describing seems to be in fact related to your specific domain and situation, the best thing to do is to contact Google Workspace Support.
Depending on the subscription you have, I suggest you choose one of the options from this link here.
Solution 2:[2]
I'm having exactly the same problem.
I run a Python script to delete specific versions from about 79,000 files and got errors for more than 2,200 of them. From the Python exception I get the following error message:
<HttpError 500 when requesting https://www.googleapis.com/drive/v3/files/.../revisions/...? returned "Internal Error". Details: "[{'domain': 'global', 'reason': 'internalError', 'message': 'Internal Error'}]">
I tried the method in its page and got the same results for a bunch of those same files.
I tried to delete those versions in the Google Drive web interface and I succeeded every time. But I can't do it by hand 2,000 times. ;)
I opened a case with Google but I was instructed to use StackOverflow... So, understood the proposed "solution" but it really is more like a workaround. I'd like to know what is causing the errors and how they can be avoided in the first place.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ale13 |
| Solution 2 | Gnustavo |
