Occasional Login Error

Once in a while, when we try to login or check to see if the token is valid for a user, we get this error. When we try it again it works but it should work the first time. this is using backendless 4 and the iOS SDK.

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}
span.Apple-tab-span {white-space:pre}

‘Server.Processing’ [java.time.temporal.UnsupportedTemporalTypeException: Unit is too large to be used for truncation] <java.time.temporal.UnsupportedTemporalTypeException: Unit is too large to be used for truncation

at java.time.Instant.truncatedTo(Instant.java:754)

at com.backendless.old.security.authorization.UserAnalyticService.saveUserAnalytic(UserAnalyticService.java:70)

at com.backendless.old.security.authorization.UserAnalyticService.saveUserAnalytic(UserAnalyticService.java:49)

at com.backendless.old.security.authorization.AuthorizationUserManager.resumeSession(AuthorizationUserManager.java:108)

at com.backendless.old.security.Authorization.resumeSession(Authorization.java:100)

at com.backendless.types.v3.RequestMessage.execute(RequestMessage.java:73)

at weborb.dispatch.V3Dispatcher.dispatch(V3Dispatcher.java:43)

at controllers.WebORB.handleAMFRequest(WebORB.java:95)

at router.Routes$$anonfun$routes$1$$anonfun$applyOrElse$426$$anonfun$apply$426.apply(Routes.scala:11768)

at router.Routes$$anonfun$routes$1$$anonfun$applyOrElse$426$$anonfun$apply$426.apply(Routes.scala:11768)

at play.core.routing.HandlerInvokerFactory$$anon$4.resultCall(HandlerInvoker.scala:157)

at play.core.routing.HandlerInvokerFactory$$anon$4.resultCall(HandlerInvoker.scala:156)

at play.core.routing.HandlerInvokerFactory$JavaActionInvokerFactory$$anon$14$$anon$3$$anon$1.invocation(HandlerInvoker.scala:136)

at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:73)

at play.http.HttpRequestHandler$1.call(HttpRequestHandler.java:54)

at com.backendless.old.security.ValidateApplication.call(ValidateApplication.java:64)

at com.backendless.TimeOutAction.call(TimeOutAction.java:26)

at com.backendless.SimultaneousApiCallLimitAction.call(SimultaneousApiCallLimitAction.java:22)

at com.backendless.CloseEntityManagerAction.call(CloseEntityManagerAction.java:29)

at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:108)

at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:108)

at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)

at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)

at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:56)

at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:70)

at play.core.j.HttpExecutionContext.execute(HttpExecutionContext.scala:48)

at scala.concurrent.impl.Future$.apply(Future.scala:31)

at scala.concurrent.Future$.apply(Future.scala:494)

at play.core.j.JavaAction.apply(JavaAction.scala:108)

at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5$$anonfun$apply$6.apply(Action.scala:112)

at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5$$anonfun$apply$6.apply(Action.scala:112)

at play.utils.Threads$.withContextClassLoader(Threads.scala:21)

at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5.apply(Action.scala:111)

at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5.apply(Action.scala:110)

at scala.Option.map(Option.scala:146)

at play.api.mvc.Action$$anonfun$apply$2.apply(Action.scala:110)

at play.api.mvc.Action$$anonfun$apply$2.apply(Action.scala:103)

at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:253)

at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)

at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36)

at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)

at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91)

at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91)

at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91)

at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)

at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90)

at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39)

at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415)

at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)

at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)

at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)

at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

We tried to reproduce the problem and could not. Please let us know what field mappings you use and what values Facebook returns for those fields (if the data is sensitive, please send it via email to support@backendless.com)

Regards,
Mark

This is not happening on Facebook login. This is happening on just general
“backendless?.userService.isValidUserToken”

There is no field mapping.

Again, I would say 9/10 times everything works fine. It is just that one time that it does not work and we get this error.

Please capture the user token when it fails and let us know what it is.

Is this in 4.0 or 3.x?

You can get the user token value like this:
NSString *userToken = [backendless.headers valueForKey:BACKENDLESS_USER_TOKEN];

It is in 4.0. The next time it fails, I will send you the user token.

I just sent you an email with the user token.

Hello Nevin,

I’ve tried to reproduce this issue under load but everything works fine and this error never occurs. Are you still facing the issue you’ve described?

Regards, Olga

We were able to get a server stack trace, so we should be able to fix it.

We are still facing the issue. Let me know if there is any other information I can provide.

Perfect. Thanks a lot, Mark!

Unfortunately, you will be experiencing the issue until the fix is deployed to the servers. It is currently in QA, should be deployed early next week.

No problem at all! That is perfectly fine as long as you were able to recreate the issue.

Hi Nevin,

the problem has been fixed and the fix is now deployed to the servers.

Regards,
Mark

Perfect. Thanks!