recorded scenario error url format

Hi
I generated a simulation with the recorder using 2.0.0-M3a version

when i try to run it using gatling.bat i have this error :

01:17:33.232 [ERROR] i.g.h.a.HttpRequestAction - Action HttpRequestAction crashed, forwarding user to next one
java.lang.IllegalArgumentException: The URI scheme, of the URI myRestUrl, must be equal (ignoring case) to ‘ht
tp’, ‘https’, ‘ws’, or ‘wss’
at com.ning.http.util.AsyncHttpProviderUtils.validateSupportedScheme(AsyncHttpProviderUtils.java:148) ~[async-http-client-1.7.19.20130706.jar:na]
at com.ning.http.client.RequestBuilderBase$RequestImpl.toURI(RequestBuilderBase.java:173) ~[async-http-client-1.7.19.20130706.jar:na]
at com.ning.http.client.RequestBuilderBase$RequestImpl.getURI(RequestBuilderBase.java:156) ~[async-http-client-1.7.19.20130706.jar:na]
at com.ning.http.client.RequestBuilderBase$RequestImpl.getUrl(RequestBuilderBase.java:142) ~[async-http-client-1.7.19.20130706.jar:na]
at io.gatling.http.cache.CacheHandling$.isCached(CacheHandling.scala:46) ~[gatling-http-2.0.0-M3a.jar:na]
at io.gatling.http.action.HttpRequestAction.io$gatling$http$action$HttpRequestAction$$sendRequest$1(HttpRequestAction.scala:68) ~[gatling-http-2.0.0-M3a
.jar:na]
at io.gatling.http.action.HttpRequestAction$$anonfun$executeOrFail$1$$anonfun$apply$2.apply(HttpRequestAction.scala:84) ~[gatling-http-2.0.0-M3a.jar:na]

at io.gatling.http.action.HttpRequestAction$$anonfun$executeOrFail$1$$anonfun$apply$2.apply(HttpRequestAction.scala:81) ~[gatling-http-2.0.0-M3a.jar:na]

at io.gatling.core.validation.Success.map(Validation.scala:27) ~[gatling-core-2.0.0-M3a.jar:na]
at io.gatling.http.action.HttpRequestAction$$anonfun$executeOrFail$1.apply(HttpRequestAction.scala:81) ~[gatling-http-2.0.0-M3a.jar:na]
at io.gatling.http.action.HttpRequestAction$$anonfun$executeOrFail$1.apply(HttpRequestAction.scala:80) ~[gatling-http-2.0.0-M3a.jar:na]
at io.gatling.core.validation.Success.flatMap(Validation.scala:28) ~[gatling-core-2.0.0-M3a.jar:na]
at io.gatling.http.action.HttpRequestAction.executeOrFail(HttpRequestAction.scala:80) ~[gatling-http-2.0.0-M3a.jar:na]
at io.gatling.core.action.Failable$class.execute(Actions.scala:82) ~[gatling-core-2.0.0-M3a.jar:na]
at io.gatling.http.action.HttpRequestAction.execute(HttpRequestAction.scala:54) ~[gatling-http-2.0.0-M3a.jar:na]
at io.gatling.core.action.Action$$anonfun$receive$1.applyOrElse(Actions.scala:42) ~[gatling-core-2.0.0-M3a.jar:na]
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:166) ~[scala-library-2.10.2.jar:na]
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:425) ~[akka-actor_2.10-2.1.4.jar:na]
at akka.actor.ActorCell.invoke(ActorCell.scala:386) ~[akka-actor_2.10-2.1.4.jar:na]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:230) ~[akka-actor_2.10-2.1.4.jar:na]
at akka.dispatch.Mailbox.run(Mailbox.scala:212) ~[akka-actor_2.10-2.1.4.jar:na]
at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:506) [akka-actor_2.10-2.1.4.jar:na]
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [scala-library-2.10.2.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [scala-library-2.10.2.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [scala-library-2.10.2.jar:na]
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [scala-library-2.10.2.jar:na]

Hi,

The problem is that neither the protocol configuration (baseUrl) or your defined request defines the host :myRestUri alone means nothing,
However I wonder how the Recorder could have produced this : it either either defines the host in the protocol configuration or at the request level, but it should be there.
What did you use to generate this simulation ? Proxy mode ? HAR export ?

Excuse me in my previous post I replaced the true URL by this keyword.
Here is the complete generated simulation (http proxy mode)

import io.gatling.core.Predef._
import io.gatling.core.session.Expression
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.http.Headers.Names._
import io.gatling.http.Headers.Values._
import scala.concurrent.duration._
import bootstrap._
import assertions._

class RecordedSimulation extends Simulation {

val httpProtocol = http
.baseURL("")
.proxy(“192.168.1.1”,8082)
.disableFollowRedirect

.acceptHeader(“application/json,application/json”)
.authorizationHeader(“Basic dGVzdF9wYXJ0bmVyOlBhc3N3b3JkQA==”)
.connection(“keep-alive”)
.userAgentHeader(“Java/1.7.0_09”)

val headers_1 = Map(""“Content-Type”"" → “”“application/json”"")

val scn = scenario(“Scenario Name”)
.exec(http(“request_1”)
.get("""/public/services/v1/features""")
.headers(headers_1)
.basicAuth(""“user”"",""“password”""))

setUp(scn.inject(atOnce(1 user))).protocols(httpProtocol)
}

It looks like a bug with the proxy handling.
Could you try current snapshot please? https://oss.sonatype.org/content/repositories/snapshots/io/gatling/highcharts/gatling-charts-highcharts/2.0.0-SNAPSHOT/

I still have the same problem with :
https://oss.sonatype.org/content/repositories/snapshots/io/gatling/highcharts/gatling-charts-highcharts/2.0.0-SNAPSHOT/gatling-charts-highcharts-2.0.0-SNAPSHOT-bundle.zip

I can’t reproduce: both proxy and baseurl are properly filled.

Could you paste what you got with snapshot please?

Resolved my problem :
In the generated code :

val httpProtocol = http
.baseURL("/public/services/v1/features")
.proxy(Proxy(“ip”, port).httpsPort(port))
.authorizationHeader(""“Basic dGVzdF9wYXJ0bmVyOlBhc3N3b3JkQA==”"")
.connection(""“Keep-Alive”"")
.contentTypeHeader(""“Application/json”"")
.userAgentHeader(""“Apache-HttpClient/4.2.1 (java 1.5)”"")

I changed it to :

val httpProtocol = http
.baseURL(“http://ip:port/public/services/v1/features”)
.authorizationHeader(""“Basic dGVzdF9wYXJ0bmVyOlBhc3N3b3JkQA==”"")
.connection(""“Keep-Alive”"")
.contentTypeHeader(""“Application/json”"")
.userAgentHeader(""“Apache-HttpClient/4.2.1 (java 1.5)”"")

And it works

But how did the recorder generate a proxy block if you didn’t specify an outgoing proxy in the GUI???
And why do you get a relative baseURL???