toast-tk / toast-tk-engine

The core automation framework for your acceptance tests
http://toast-tk.io
Other
12 stars 5 forks source link

[WebApp] Scenario creation sended by the Agent #116

Open NathCoco opened 8 years ago

NathCoco commented 8 years ago

There is an issue when the Agent post a WebEvent

NathCoco commented 8 years ago

Logs of the issue on the WebApp :

[info] application - New incoming websocket connection -> ArrayBuffer((Host,localhost:9000), (Connection,Upgrade), (Pragma,no-cache), (Cache-Control,no-cache), (Upgrade,websocket), (Origin,http://localhost:9000), (Sec-WebSocket-Version,13), (User-Agent,Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36), (Accept-Encoding,gzip, deflate, sdch), (Accept-Language,fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4), (Sec-WebSocket-Key,SkEBXw3fjEuXB89rRMh5AA==), (Sec-WebSocket-Extensions,permessage-deflate; client_max_window_bits)) [info] application - New incoming websocket connection <- token -> undefined [+] updating user information : 57da99f5817b6d5e006080f6 [error] p.c.s.n.PlayDefaultUpstreamHandler - Cannot invoke the action java.util.NoSuchElementException: None.get at scala.None$.get(Option.scala:347) ~[scala-library-2.11.8.jar:na] at scala.None$.get(Option.scala:345) ~[scala-library-2.11.8.jar:na] at controllers.mongo.users.UserCollection$$anonfun$saveUser$1$$anonfun$2.apply(UserCollection.scala:89) ~[classes/:na] at controllers.mongo.users.UserCollection$$anonfun$saveUser$1$$anonfun$2.apply(UserCollection.scala:89) ~[classes/:na] at scala.Option.getOrElse(Option.scala:121) ~[scala-library-2.11.8.jar:na] at controllers.mongo.users.UserCollection$$anonfun$saveUser$1.apply(UserCollection.scala:89) ~[classes/:na] at controllers.mongo.users.UserCollection$$anonfun$saveUser$1.apply(UserCollection.scala:70) ~[classes/:na] at scala.util.Success$$anonfun$map$1.apply(Try.scala:237) ~[scala-library-2.11.8.jar:na] at scala.util.Try$.apply(Try.scala:192) ~[scala-library-2.11.8.jar:na] at scala.util.Success.map(Try.scala:237) ~[scala-library-2.11.8.jar:na] [error] application -

! @71h6hp6cm - Internal server error, for (POST) [/user] ->

play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[NoSuchElementException: None.get]] at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:265) ~[play_2.11-2.4.3.jar:2.4.3] at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:191) ~[play_2.11-2.4.3.jar:2.4.3] at play.api.GlobalSettings$class.onError(GlobalSettings.scala:179) [play_2.11-2.4.3.jar:2.4.3] at boot.AppBoot$.onError(AppBoot.scala:46) [classes/:na] at play.api.http.GlobalSettingsHttpErrorHandler.onServerError(HttpErrorHandler.scala:94) [play_2.11-2.4.3.jar:2.4.3] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3.applyOrElse(PlayDefaultUpstreamHandler.scala:273) [play-netty-server_2.11-2.4.3.jar:2.4.3] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3.applyOrElse(PlayDefaultUpstreamHandler.scala:269) [play-netty-server_2.11-2.4.3.jar:2.4.3] at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:346) [scala-library-2.11.8.jar:na] at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:345) [scala-library-2.11.8.jar:na] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) [scala-library-2.11.8.jar:na] Caused by: java.util.NoSuchElementException: None.get at scala.None$.get(Option.scala:347) ~[scala-library-2.11.8.jar:na] at scala.None$.get(Option.scala:345) ~[scala-library-2.11.8.jar:na] at controllers.mongo.users.UserCollection$$anonfun$saveUser$1$$anonfun$2.apply(UserCollection.scala:89) ~[classes/:na] at controllers.mongo.users.UserCollection$$anonfun$saveUser$1$$anonfun$2.apply(UserCollection.scala:89) ~[classes/:na] at scala.Option.getOrElse(Option.scala:121) ~[scala-library-2.11.8.jar:na] at controllers.mongo.users.UserCollection$$anonfun$saveUser$1.apply(UserCollection.scala:89) ~[classes/:na] at controllers.mongo.users.UserCollection$$anonfun$saveUser$1.apply(UserCollection.scala:70) ~[classes/:na] at scala.util.Success$$anonfun$map$1.apply(Try.scala:237) ~[scala-library-2.11.8.jar:na] at scala.util.Try$.apply(Try.scala:192) ~[scala-library-2.11.8.jar:na] at scala.util.Success.map(Try.scala:237) ~[scala-library-2.11.8.jar:na] [info] application - New incoming websocket connection -> ArrayBuffer((Host,localhost:9000), (Connection,Upgrade), (Pragma,no-cache), (Cache-Control,no-cache), (Upgrade,websocket), (Origin,http://localhost:9000), (Sec-WebSocket-Version,13), (User-Agent,Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36), (Accept-Encoding,gzip, deflate, sdch), (Accept-Language,fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4), (Sec-WebSocket-Key,IdC4ST7odrhlx01tNIsoWQ==), (Sec-WebSocket-Extensions,permessage-deflate; client_max_window_bits)) [info] application - New incoming websocket connection <- token -> undefined java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:270) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:461) at org.jboss.netty.channel.socket.nio.SocketSendBufferPool$UnpooledSendBuffer.transferTo(SocketSendBufferPool.java:203) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.write0(AbstractNioWorker.java:201) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromUserCode(AbstractNioWorker.java:146) at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:99) at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:36) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:779) at org.jboss.netty.channel.Channels.write(Channels.java:725) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:71) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59) at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784) at org.jboss.netty.channel.SimpleChannelHandler.writeRequested(SimpleChannelHandler.java:292) at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:254) at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.handleDownstream(HttpPipeliningHandler.java:106) at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582) at org.jboss.netty.channel.Channels.write(Channels.java:704) at org.jboss.netty.channel.Channels.write(Channels.java:671) at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:348) at play.core.server.netty.WebSocketHandler$$anon$1.closeWebSocket(WebSocketHandler.scala:140) at play.core.server.netty.WebSocketHandler$$anon$1.messageReceived(WebSocketHandler.scala:107) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:64) at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:138) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536) at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

skokaina commented 8 years ago

Are you sending the token when pushing new actions to the webapp ? it currently reports that it's undefined as provided logs

NathCoco commented 8 years ago

I only send the token when using the functions :

Do we need to do it for other functions ?

skokaina commented 8 years ago

could you please try again with the last version on the master ?

skokaina commented 7 years ago

issue found and fixed, /api/* prefix was causing the regression #156