scientist-softserv / adventist_knapsack

Apache License 2.0
1 stars 0 forks source link

Error when attempting catalog search #176

Closed KatharineV closed 2 months ago

KatharineV commented 2 months ago

Since the Knapsack upgrade, about 3/4 of the time I enter a term in the catalog search box on production (either tenant, and from any location--home page, a work page, a collection page, etc.), the site fails to load and I get a "Sorry, something went wrong" error message. Below are screenshots on ADL prod of a search from the homepage and from a work page.

Image

https://adl.b2.adventistdigitallibrary.org/catalog?utf8=%E2%9C%93&locale=en&search_field=all_fields&q=Spectrum Image

Image

https://adl.b2.adventistdigitallibrary.org/catalog?utf8=%E2%9C%93&parent_query=The+First+Report+of+the+General+Conference+of+Christians+Expecting+the+Advent+of+the+Lord+Jesus+Christ%2C+Held+in+Boston%2C+Oct.+14%2C+15%2C+1840&search_field=all_fields&q=cardinal Image

SDAPI example, to show it's happening on multiple tenants:

https://sdapi.b2.adventistdigitallibrary.org/catalog?utf8=%E2%9C%93&locale=en&search_field=all_fields&q=spectrum Image

ShanaLMoore commented 2 months ago

Confirmed I am seeing this issue with the link provided. There are no sentry errors logged due to rate limits.

adventist-knapsack-production-hyrax-57856cd456-tv97m_hyrax.log

ERROR seen in rancher logs

ActionView::Template::Error (undefined method `any_highlighting?' for #<Hash:0x00007eff34d812a8>):

This method should come from iiif print

perhaps it's because we're using include instead of prepend here.

Error seen locally: Image

No code change was needed after we upgraded the app's iiif print (work done in another ticket).

ShanaLMoore commented 2 months ago

QA: PASS ✅

Searched for the word "minute" returned results.

Image

Searched for "spectrum" correctly did not return results (because the test tenant doesn't have this data):

Image

Empty search:

Image

KatharineV commented 2 months ago

Friends, I still get the "We're sorry but something went wrong" error message about 1/3rd of the time when I attempt a catalog search. :( I can't always replicate the behavior, but it happens seemingly at random during attempted searches of all kinds. Screenshots below show one example search URL that failed to load in multiple tests.

I can confirm the catalog search is erroring on ADL production. It errors in multiple browsers (tested Edge, Chrome, and Firefox). It errors when I am logged in and when I am logged out.

Prod search, logged in, using Firefox. Term was "medical." I searched from the homepage and from the search bar on a work page and got the same error message result.

Image

Prod search, logged out, using Edge. Term was "medical."

Image

This term has consistently failed to return a result. Three times in a row, I've reloaded the ADL homepage, searched "medical," and gotten the error message. I hope this information is helpful.

ShanaLMoore commented 2 months ago

@KatharineV I understand your frustration. Perhaps our demo caught it on a "good" time since it appears to be intermittent. I'm able to consistently recreate this issue too, with the term "medical", so thanks for finding that example. Moving this ticket back for rework.

Sentry error

Image

orangewolf commented 2 months ago

@KatharineV the "Something went wrong" pages on these searches should all be resolved now. Certain types of documents were triggering this if they appeared in the results. So some results had the error where others did not. I am fairly confident that I've now covered all the different kinds of results (different work types, collections, etc) and we won't see this specific error again.

KatharineV commented 2 months ago

I tested the three search terms that used to throw an error message on ADL prod (Spectrum, cardinal, & medical). The catalog search worked for all three terms and returned results as expected. Thank you!