Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

lichess Learn/Puzzle Execution exception Error #25

Open
kubelancergitid opened this issue Jul 9, 2020 · 1 comment
Open

lichess Learn/Puzzle Execution exception Error #25

kubelancergitid opened this issue Jul 9, 2020 · 1 comment

Comments

@kubelancergitid
Copy link

After ran docker container, while access Learn --> Puzzle getting below error, please help to fix

[error] l.app.http.ErrorHandler -

! @7gd21c81p - Internal server error, for (GET) [/training] ->

play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[IllegalArgumentException: bound must be positive]]
at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:359)
at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:261)
at play.core.server.AkkaHttpServer$$anonfun$2.applyOrElse(AkkaHttpServer.scala:429)
at play.core.server.AkkaHttpServer$$anonfun$2.applyOrElse(AkkaHttpServer.scala:421)
at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:453)
at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:56)
at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:93)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94)
at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:93)
Caused by: java.lang.IllegalArgumentException: bound must be positive
at java.base/java.util.Random.nextInt(Random.java:388)
at scala.util.Random.nextInt(Random.scala:96)
at lila.puzzle.Selector.$anonfun$apply$2(Selector.scala:35)
at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:433)
at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:56)
at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:93)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94)
at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:93)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:48)

** on web browser **

[IllegalArgumentException: bound must be positive]
In /home/lichess/projects/lila/modules/puzzle/src/main/Selector.scala:35

31 // anon

32 case None =>

33 anonIdsCache flatMap { ids =>

34 puzzleColl {

35 _.byId[Puzzle, Int](ids(Random nextInt ids.size))

36 }

37 }

38 // user

39 case Some(user) =>

@vkostin
Copy link

vkostin commented Apr 22, 2021

It is so because there are no puzzles in the database

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants