Fixed
Status Update
Comments
is...@gmail.com <is...@gmail.com> #2
UPDATE:
1. The problem exists if non-latin name has atleast one capital letter! Checked for Cyrillic only.
2. The problem can be reproduced by means of HTTP request without of android SDK libs.
1. The problem exists if non-latin name has atleast one capital letter! Checked for Cyrillic only.
2. The problem can be reproduced by means of HTTP request without of android SDK libs.
os...@gmail.com <os...@gmail.com> #3
It seems using the 'contains' directive is fine now. I think this is a bug.
is...@gmail.com <is...@gmail.com> #4
You are right! Query
'root' in parents and title contains 'папкА' and trashed=false
returns correct answer!
'root' in parents and title contains 'папкА' and trashed=false
returns correct answer!
[Deleted User] <[Deleted User]> #5
I have the same issue with the version 3 of the API.
I'm trying to search for files containing umlauts in the name.
When the umlauts are capitalized (Ä, Ö, Ü) I don't get anything back.
If the umlauts are lower case it works without any problems.
I have two different objects within my google drive. The names are "Test ÄÖÜ" and "Test äöü".
drive.files().list().setQ("'root' in parents and name='Test ÄÖÜ' and trashed=false").execute()
doesn't give me anything back.
drive.files().list().setQ("'root' in parents and name='Test äöü' and trashed=false").execute()
gives me the right file.
If i change the "=" to "contains" it works fine.
I'm trying to search for files containing umlauts in the name.
When the umlauts are capitalized (Ä, Ö, Ü) I don't get anything back.
If the umlauts are lower case it works without any problems.
I have two different objects within my google drive. The names are "Test ÄÖÜ" and "Test äöü".
drive.files().list().setQ("'root' in parents and name='Test ÄÖÜ' and trashed=false").execute()
doesn't give me anything back.
drive.files().list().setQ("'root' in parents and name='Test äöü' and trashed=false").execute()
gives me the right file.
If i change the "=" to "contains" it works fine.
os...@gmail.com <os...@gmail.com> #6
Please, be sure that you program returns one or nothing values. Because "=" and "contains" don't return a single value. I make an exact comparison of the sample field for refinement. Here is an example on Google Apps Script:
function getFileByName(name) {
var files = DriveApp.searchFiles(Utilities.formatString('title contains "%s" and trashed=false', name));
var result = undefined;
while(files.hasNext()){
var file = files.next();
if(file.getName() === name){
result = file;
break;
}
}
return result;
}
function getFileByName(name) {
var files = DriveApp.searchFiles(Utilities.formatString('title contains "%s" and trashed=false', name));
var result = undefined;
while(files.hasNext()){
var file = files.next();
if(file.getName() === name){
result = file;
break;
}
}
return result;
}
ek...@google.com <ek...@google.com> #7
Thanks for alerting us to this issue. We've been able to reproduce it as well, and I've raised the issue with the engineering team. Unfortunately I can't provide any guidance on if or when it will be resolved.
ni...@gmail.com <ni...@gmail.com> #8
An rclone user has noticed this too: https://github.com/ncw/rclone/issues/1675
See the there for some HTTP traces if additional info is required.
See the there for some HTTP traces if additional info is required.
pa...@saw-office.net <pa...@saw-office.net> #9
I have the same Problem with DriveApp.getFilesByName(name)
If the name contains Ä,Ö or Ü the method has no results.
If the name contains Ä,Ö or Ü the method has no results.
ro...@gmail.com <ro...@gmail.com> #10
Hello,
I also have the same problem. As I use rclone program to sync on google drive it become almost impossible to sync large folders on drive. Others programs are also affected by this error: drive and gdrive.
https://github.com/odeke-em/drive/issues/955
https://github.com/prasmussen/gdrive/issues/357
As an example, there are a folder with 66 identical copies on drive due to this bug. From this example I can tell you that this bug appear since 2017 / 08
It will be very appreciated have this bug being treated as very severe
Thank you
Roberto
I also have the same problem. As I use rclone program to sync on google drive it become almost impossible to sync large folders on drive. Others programs are also affected by this error: drive and gdrive.
As an example, there are a folder with 66 identical copies on drive due to this bug. From this example I can tell you that this bug appear since 2017 / 08
It will be very appreciated have this bug being treated as very severe
Thank you
Roberto
vl...@gmail.com <vl...@gmail.com> #11
Yes, please do something about this issue. I think it's a major one, and it is lasting for many months already.
Adding Cyberduck to the list of impacted programs:https://trac.cyberduck.io/ticket/10191
Adding Cyberduck to the list of impacted programs:
br...@gmail.com <br...@gmail.com> #12
+1
API V3 also
API V3 also
ek...@google.com <ek...@google.com> #13
We recently pushed out a fix that should resolve this issue. Please let us know if you continue to see this problem.
vl...@gmail.com <vl...@gmail.com> #14
Thank you for investigating this.
Sadly, I have just tried with Cyberduck and the issue seems to still be present...
Sadly, I have just tried with Cyberduck and the issue seems to still be present...
vl...@gmail.com <vl...@gmail.com> #15
To give more information, I'm no longer encountering issues with accentuated uppercase, but it's still failing with single quotes in folder names.
vl...@gmail.com <vl...@gmail.com> #17
That's a nice way for easy reproducing, would you be able to adapt it to reproduce my issue? For folders that are non-empty and whose name contains a single quote.
vl...@gmail.com <vl...@gmail.com> #18
ek...@google.com, as noted in my messages just above, the issue is still partially present.
Description
Search for folder by means of
drive.files().list().setQ(query)
with non latin name gives nothing when such folder definitely exists!
What API version are you using ?
I am using V2 of Google Drive API by means of following libs:
com.google.apis:google-api-services-drive:v2-rev154-1.18.0-rc
com.google.api-client:google-api-client:1.18.0-rc
com.google.api-client:google-api-client-android:1.18.0-rc
com.google.http-client:google-http-client:1.18.0-rc
com.google.http-client:google-http-client-gson:1.18.0-rc
A small code sample that reliably reproduces the issue.
private IFile getChildByName(Drive drive, String childName){
IFile childFile = null;
String query = "'" + getMetaData().getId() + "' in parents and title='" + childName + "' and trashed=false";
Drive.Files.List request = null;
try {
request = drive.files().list().setQ(query);
} catch (IOException e) {
e.printStackTrace();
}
List<File> childList = new ArrayList<File>();
if (request != null) {
do {
try {
FileList children = request.execute();
childList.addAll(children.getItems());
request.setPageToken(children.getNextPageToken());
} catch (IOException e) {
System.out.println("An error occurred: " + e);
request.setPageToken(null);
}
} while (request.getPageToken() != null && request.getPageToken().length() > 0);
childFile = childList.isEmpty() ? null : new GoogleDriveFile(childList.get(0), this);
}
return childFile;
}
What steps will reproduce the problem?
1. Create Google Drive account and two folders in the root with latin ("Archive") and non latin (cyrillic - "Архив") names.
2. Make a search query
drive.files().list().setQ("'root' in parents and title='Archive' and trashed=false").execute()
and get metadata of "Archive" folder.
Then make other quey
drive.files().list().setQ("'root' in parents and title='Архив' and trashed=false").execute()
and get nothing!
Question:
Is it a bug or should I use some encoding for non latin characters in the searched name? If last where does Google mention it in their docs!?
Details are here