Gatling recorder throwing Exceptions

Hi,

I’m trying to use the gatling recorder for tracking resquests send by an iPhone during the use of an application I’m testing.

I configure the iPhone for using same Wifi than my computer which host the gatling recorder and configure the proxy to the IP of my computer with ports 8000 (default).

But when I go to google with the iPhone I never get a response, multiples Exceptions come in the console of the recorder:

11:16:57.433 [ERROR] i.g.r.h.h.ClientHttpRequestHandler - Exception caught
java.lang.IllegalArgumentException: hostname can’t be null
at java.net.InetSocketAddress.checkHost(Unknown Source) ~[na:1.7.0_45]
at java.net.InetSocketAddress.(Unknown Source) ~[na:1.7.0_45]
at io.gatling.recorder.http.handler.ClientHttpRequestHandler.propagateRequest(ClientHttpRequestHandler.scala:56) ~[gatling-recorder-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
at io.gatling.recorder.http.handler.ClientRequestHandler.messageReceived(ClientRequestHandler.scala:60) ~[gatling-recorder-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
at org.jboss.netty.handler.codec.http.HttpContentEncoder.messageReceived(HttpContentEncoder.java:81) ~[netty-3.9.0.Final.jar:na]

[…]

Did I did something wrong ?

The recorder has been completely re-written in upcoming version.
Could you give the snapshot a try, please?
https://github.com/excilys/gatling/wiki/Continuous-Integration

Sorry if I don’t understand but I’m already on Snapshot 2.0.0 as you can see in the exception [gatling-recorder-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
I also try with the 1.5.X version but the same bug happend ><

Daydreaming, sorry.

Having a look.

I’ve just pushed a potential fix.
Build is under way: https://travis-ci.org/excilys/gatling
Once it’s done, you’ll be able to grad a new snapshot.
Please let me know if that did fix the problem, otherwise logs should be more specific.

I’ve grab the snapshot here: https://oss.sonatype.org/content/repositories/snapshots/io/gatling/highcharts/gatling-charts-highcharts/2.0.0-SNAPSHOT/

Is this the one you want me to try ?

Same errors output.

I've grab the snapshot here:
https://oss.sonatype.org/content/repositories/snapshots/io/gatling/highcharts/gatling-charts-highcharts/2.0.0-SNAPSHOT/
Is this the one you want me to try ?

yep

Same errors output.

Are you sure?
I was expecting this now:
https://github.com/excilys/gatling/blob/master/gatling-recorder/src/main/scala/io/gatling/recorder/http/handler/ClientHttpRequestHandler.scala#L57

Could you get me the full stacktrace, please?

GATLING_HOME is set to “C:\Users\Maxime TUAL\Downloads\testagain\testagain”

OK, so what happens is that you’re trying to perform an http request over the https port.

“I configure the iPhone for using same Wifi than my computer which host the gatling recorder and configure the proxy to the IP of my computer with ports 8000 (default).”

I suspect you used the same port 8000 for SSL while it should be 8001.

I try to configure the iPhone with differents parameters but it’s not working either !

waiting for you to accept invitations

If someone get there with the same issue maybe it will help you:

I’m afraid we find the cause of the problem:

  • I configure the iPhone to use the proxy on port 8000 but cannot configure the port for https (not possible on iPhone to specify both ports for http/https)
    → So my requests in https was sent on the port 443 and not listen at all by my computer

  • Then we try to configure the iPhone to use proxy on port 8001 (https gatling recorder) because my iPhone apps use only https

  • At this point https requests are now send to my computer
    → BUT for each https requests, the iPhone detect that my computer (the proxy server) don’t have the good certificate and ask me to accept the no-secure certificate for continue (when I go to google or facebook which are https website)
    → So, when I try to use the iPhone app, the requests are send (can see them on wireshark) but they got for response the warning for no-secure certificate (probably) and the apps do not continue from here.

In brief, it’s seem it’s not actually possible to test an iPhone apps which use https connection for web services through a proxy because the https protection not allowed it.
Our solution right now is to change the web service url in the app for point to are dev server which is in http and not https.