Internal Server Error when generating report
omgMath opened this issue · comments
Nicola G commented
Hi
We receive an Internal Server Error when trying to generate a report:
The request is sent to /api/v1/report/activity-report/foo?dateFrom=2020-06-25&dateTo=2022-06-15
.
The server logs show the following:
play.api.UnexpectedException: Unexpected exception[NoSuchElementException: head of empty list]
at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:347)
at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:267)
at play.core.server.AkkaHttpServer$$anonfun$1.applyOrElse(AkkaHttpServer.scala:448)
at play.core.server.AkkaHttpServer$$anonfun$1.applyOrElse(AkkaHttpServer.scala:446)
at scala.concurrent.Future.$anonfun$recoverWith$1(Future.scala:417)
at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:92)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
Caused by: java.util.NoSuchElementException: head of empty list
at scala.collection.immutable.Nil$.head(List.scala:430)
at scala.collection.immutable.Nil$.head(List.scala:427)
at models.eventhistory.InputEvent$.isEventForSolrIndex$1(InputEvent.scala:311)
at models.eventhistory.InputEvent$.$anonfun$allChangedInputIdsForSolrIndexIdInPeriod$1(InputEvent.scala:317)
at models.eventhistory.InputEvent$.$anonfun$allChangedInputIdsForSolrIndexIdInPeriod$1$adapted(InputEvent.scala:317)
at scala.collection.TraversableLike.allIn$1(TraversableLike.scala:320)
at scala.collection.TraversableLike.noneIn$1(TraversableLike.scala:307)
at scala.collection.TraversableLike.filterImpl(TraversableLike.scala:372)
at scala.collection.TraversableLike.filterImpl$(TraversableLike.scala:284)
at scala.collection.AbstractTraversable.filterImpl(Traversable.scala:108)
If I select a shorter time window, e.g. /api/v1/report/activity-report/brackDE?dateFrom=2022-06-01&dateTo=2022-06-15
, the request works, but returns
{
"items": []
}
We're using SMUI version v3.13.1. Are we missing some configuration? Couldn't find anything on reports in the docs.
Thanks for looking into that.