library
library copied to clipboard
Search Returns 500 Error
Thanks for building this and providing it to the world for free.
Context (Environment)
Heroku
Expected Behavior
Get some search results
Actual Behavior
We get the standard app 500 page.
The logs just say:
error: Error when searching for test, Error: <HTML>
<HEAD>
<TITLE>Bad Request</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Bad Request</H1>
<H2>Error 400</H2>
</BODY>
</HTML>
To Reproduce
You'd have to login to our site, but I'm happy to do any debugging you suggest.
Additional Information
We use a shared folder, not a team drive. Everything else seems to work. I didn't setup the indexes (the optional step) I searched around and couldn't find any info anywhere about this.
Hi @sixcircuit, thanks for the bug report! A few questions: Is the error page being shown for all searches on your site, or just specific queries?
That 400 looks like it may be being returned from the Google API — could you check your GCP API console and see if there are any 4xx errors being reported?
Thanks!
Thanks for the help. Seems like all searches. I checked the console, no 400 errors, which is weird. I checked the logs on GCP too, and they don't seem to have anything relevant. I don't know if the API errors get logged though.
Any other thoughts?
On Mon, Aug 26, 2019, 07:41 Andrew Fischer [email protected] wrote:
Hi @sixcircuit https://github.com/sixcircuit, thanks for the bug report! A few questions: Is the error page being shown for all searches on your site, or just specific queries?
That 400 looks like it may be being returned from the Google API — could you check your GCP API console https://console.cloud.google.com/apis and see if there are any 4xx errors being reported?
Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nytimes/library/issues/59?email_source=notifications&email_token=AACITZNXWADWXNA5EQJCPMTQGPTQVA5CNFSM4IPLYBU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5ESNWQ#issuecomment-524887770, or mute the thread https://github.com/notifications/unsubscribe-auth/AACITZME664RPX72DAU3QATQGPTQVANCNFSM4IPLYBUQ .
Hi Again.
My boss did some debugging:
I played with it today. I took everything out and added it back in one folder at a time. I didn’t have any search problems until I added the last two folders. I played around with what folders were in vs out and it didn’t seem like any one folder was causing problems with search. The problem arose when all 8 folders were in. There were some words that I could search and other words that I couldn’t search when 7 of the 8 folders were in. I didn’t encounter any search issues when adding folders 1-6. Are you aware of any capacity constraints that could be causing the search problem?
Thanks for any help.
Interesting... Would you mind sharing what those search terms/folder names were? Do those folders or files have any special characters in them?
It would be great to create a reproducible way of triggering this error.
My Library has 8 folders. When all 8 of the folders are in, I cannot search the four terms below. When any combination of 7 folders are in, I can search the terms with no problem. I only have 7 folders in at the moment so that I can use it, but I can add the 8th if it'd be helpful for recreating the issue.
Invisalign Composite Style guide SPP
We have a similar problem. The search function lists all folders and adds these to the final query as:
(
'1234567890ABCDEFGHIJKLMNOP' in parents or
'134567890ABCDEFGHIJKLMNOPQ' in parents or
'14567890ABCDEFGHIJKLMNOPQR' in parents or
'1567890ABCDEFGHIJKLMNOPQRS' in parents or
'167890ABCDEFGHIJKLMNOPQRST' in parents
)
https://github.com/nytimes/library/blob/master/server/search.js#L93
When the number of folderIds grows too large, this error comes from the Drive API:
status: 413,
statusText: 'Request Entity Too Large'
The limit seems to be around 100 folderIds
We are also seeing this with a lot of folder ids, same situation as @MennoTammens