geobtaa / geomg

BTAA administrative UI for GeoBlacklight. Built on Kithe.
MIT License
10 stars 0 forks source link

Notifications page 500 error #227

Open karenmajewicz opened 2 years ago

karenmajewicz commented 2 years ago

The Notifications page for GEOMG is throwing a 500 error and not letting me download anything.

The last action I did before this behavior was to search for "Chinese Exclusion in New Jersey" in the general text search box. (I don't usually do searches of full phrases like this in GEOMG). The results appeared fine in the interface, but I got a backend AppSignal error of

RSolr::Error::Http - 500 Internal Server Error
Error: input automaton is too large: 1001

After that, the Notifications page stopped working. Did the server get overloaded somehow?

mberkowski commented 2 years ago

Notifications screen was breaking with a view error, getting a hash where a string was expected

# app/views/notifications/_notification.html.haml
- # Split message "Download Type|Row Count|Button Label"
- message = notification.to_notification.params[:message].split("|")
[555b84ba-dd4f-4056-9e07-ae210851a822] ActionView::Template::Error (no implicit conversion of Hash into String):
[555b84ba-dd4f-4056-9e07-ae210851a822]     1: - # Split message "Download Type|Row Count|Button Label"
[555b84ba-dd4f-4056-9e07-ae210851a822]     2: - message = notification.to_notification.params[:message].split("|")
[555b84ba-dd4f-4056-9e07-ae210851a822]     3: 
[555b84ba-dd4f-4056-9e07-ae210851a822]     4: %tr
[555b84ba-dd4f-4056-9e07-ae210851a822]     5:   %td

Sticking a .to_s in there was enough to get Notifications to render again. Possibly a Puma restart helped because it stopped erroring even with the to_s removed afterward.

karenmajewicz commented 1 year ago

This seems to be occurring again.

mberkowski commented 1 year ago

similar cause

no implicit conversion of Hash into String
  app/views/notifications/_notification.html.haml:2

Leaving open because this does need a real fix. The workaround I tried last time was temporary.