thrown MalformedInputException: Input length = 1

Hi, thanks gatling support.

I’m recording and gatling, thrown exception.
But test result is not error.

why meet this exception? so I mistake?

thanks.

Script ::

class InHouseCheck3Simulation extends Simulation {

val httpProtocol = http
.baseURL(“http://localhost:1234”)
.headers(Map(
“Accept-Language” → “ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN”,
“User-Agent” → “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36”
))
.disableAutoReferer
.inferHtmlResources(BlackList("""..js""", “”"..css""", “”"..gif""", “”"..jpeg""", “”"..jpg""", “”"..ico""", “”"..woff""", “”"..(t|o)tf""", “”".*.png"""), WhiteList())

val headers_6 = Map(
“Accept” → “text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8”,
“Referer” → “…”,
“Upgrade-Insecure-Requests” → “1”)

val scn = scenario(“InHouseCheck3Simulation”)

.exec(http(“request_6”)
.get("/work/schedule/scheduleView?paramKey=489")
.headers(headers_6))

setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)

Exception trace ::

00:49:34.015 [ERROR] i.g.h.a.AsyncHandlerActor - AsyncHandlerActor crashed on message Some(OnCompleted(HttpTx(Session(InHouseCheck3Simulation,1,Map(gatling.http.cookies → CookieJar(Map(CookieKey(jsessionid,localhost:1234,/) → StoredCookie(JSESSIONID=60668E88A4381C8224642114383205B4; path=/; HTTPOnly,true,false,1446392957867), CookieKey(current_menu,localhost:1234,/) → StoredCookie(current_menu=1003; path=/,true,false,1446392967386)))),1446392957698,16,OK,List(),),HttpRequest(request_6,http://localhost:1234/work/schedule/scheduleView.mvc?current_menu=489 GET headers: Upgrade-Insecure-Requests:1 Referer:http://localhost:1234/default_main.mvc Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8 Accept-Language:ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36,HttpRequestConfig(List(HttpCheck(CheckBase(,,,None),Status,None)),None,None,None,false,None,true,true,HttpComponents(HttpProtocol(List(http://localhost:1234),Some(http://gatling.io),HttpProtocolEnginePart(true,false,6,false,None,None),HttpProtocolRequestPart(Map(Accept-Language → , User-Agent → ),None,false,true,false,None,false,None),HttpProtocolResponsePart(true,None,false,true,None,List(),None,true,Some(Filters(BlackList(List(..js, ..css, ..gif, ..jpeg, ..jpg, ..ico, ..woff, ..(t|o)tf, ..png)),WhiteList(List())))),HttpProtocolWsPart(List(),false,None),HttpProtocolProxyPart(None,List())),io.gatling.http.ahc.HttpEngine@4332939c,io.gatling.http.cache.HttpCaches@1bdd23c4),List())),,Actor[akka://GatlingSystem/user/pause-51#1900369221],true,0,),HttpResponse(http://localhost:1234/work/schedule/scheduleView.mvc?current_menu=48GET headers: Upgrade-Insecure-Requests:1 Referer:http://localhost:1234/default_main.mvc Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/*;q=0.8 Accept-Language:ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36,None,None,Some(org.asynchttpclient.netty.NettyResponseStatus@7b994b42),“Date=Sun, 01 Nov 2015 15:49:50 GMT”; “Server=Apache/2.4.17 (Unix)”; “X-Application-Context=bootstrap:prod”; “Set-Cookie=current_menu=1003; Expires=Thu, 01-Jan-1970 00:00:10 GMT, current_menu=489; Path=/”; “Content-Type=text/html;charset=UTF-8”; “Content-Language=ko-KR”; “Vary=Accept-Encoding”; “Keep-Alive=timeout=60, max=992”; “Connection=Keep-Alive”; “Transfer-Encoding=chunked”,io.gatling.http.response.InputStreamResponseBody@4c18f012,Map(),67673,UTF-8,ResponseTimings(1446392973947,1446392973999)))), forwarding user to the next action
java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:281) ~[na:1.8.0_45]
at io.gatling.http.util.BytesHelper$$anonfun$byteBuffersToString$1.apply(BytesHelper.scala:78) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.util.BytesHelper$$anonfun$byteBuffersToString$1.apply(BytesHelper.scala:75) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at scala.collection.Iterator$class.foreach(Iterator.scala:742) ~[scala-library-2.11.7.jar:na]
at scala.collection.AbstractIterator.foreach(Iterator.scala:1194) ~[scala-library-2.11.7.jar:na]
at io.gatling.http.util.BytesHelper$.byteBuffersToString(BytesHelper.scala:75) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.util.BytesHelper$.byteArraysToString(BytesHelper.scala:61) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.response.InputStreamResponseBody.string$lzycompute(ResponseBody.scala:117) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.response.InputStreamResponseBody.string(ResponseBody.scala:113) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.fetch.ResourceFetcher$class.inferredResourcesRequests$1(ResourceFetcher.scala:81) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.fetch.ResourceFetcher$class.inferPageResources(ResourceFetcher.scala:105) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.fetch.ResourceFetcher$class.resourceFetcherActorForFetchedPage(ResourceFetcher.scala:172) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.ahc.HttpEngine.resourceFetcherActorForFetchedPage(HttpEngine.scala:42) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.ahc.AsyncHandlerActor.executeNext(AsyncHandlerActor.scala:147) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.ahc.AsyncHandlerActor.logAndExecuteNext(AsyncHandlerActor.scala:177) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.ahc.AsyncHandlerActor.checkAndProceed$1(AsyncHandlerActor.scala:299) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.ahc.AsyncHandlerActor.io$gatling$http$ahc$AsyncHandlerActor$$processResponse(AsyncHandlerActor.scala:329) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at io.gatling.http.ahc.AsyncHandlerActor$$anonfun$receive$1.applyOrElse(AsyncHandlerActor.scala:78) ~[gatling-http-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at akka.actor.Actor$class.aroundReceive(Actor.scala:467) ~[akka-actor_2.11-2.3.14.jar:na]
at io.gatling.core.akka.BaseActor.aroundReceive(BaseActor.scala:24) ~[gatling-core-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) ~[akka-actor_2.11-2.3.14.jar:na]
at akka.actor.ActorCell.invoke(ActorCell.scala:487) ~[akka-actor_2.11-2.3.14.jar:na]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) ~[akka-actor_2.11-2.3.14.jar:na]
at akka.dispatch.Mailbox.run(Mailbox.scala:220) ~[akka-actor_2.11-2.3.14.jar:na]
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) [akka-actor_2.11-2.3.14.jar:na]
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [scala-library-2.11.7.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [scala-library-2.11.7.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [scala-library-2.11.7.jar:na]
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [scala-library-2.11.7.jar:na]

I re-try with 2.1.7 release version, but not thrown exception!!

2015년 11월 2일 월요일 오전 1시 12분 52초 UTC+9, chanwook park 님의 말:

Reproducer please.