Recorder - export to HAR file unsucessful

Hi,

I try to create with the recorder a simulation from the har file “export.har” (in attachment), but the recorder rejects the har file with log error.

This har file has bean created with chrome dev.
I’ve done severals export har test from Chrome dev and firefox (firebug). all simulations are KO with the recorder.

I use Galting 2M3 version.

Have you an explanation ?

Thanks for your help.

Best regards,

Here the console error catchs on debug mode :

10:40:11.113 [DEBUG] i.g.r.c.RecorderController - Error while processing HAR file
java.nio.charset.UnmappableCharacterException: Input length = 1
at java.nio.charset.CoderResult.throwException(Unknown Source) ~[na:1.7.0_51]
at sun.nio.cs.StreamDecoder.implRead(Unknown Source) ~[na:1.7.0_51]
at sun.nio.cs.StreamDecoder.read(Unknown Source) ~[na:1.7.0_51]
at java.io.InputStreamReader.read(Unknown Source) ~[na:1.7.0_51]
at java.io.BufferedReader.fill(Unknown Source) ~[na:1.7.0_51]
at java.io.BufferedReader.readLine(Unknown Source) ~[na:1.7.0_51]
at java.io.BufferedReader.readLine(Unknown Source) ~[na:1.7.0_51]
at scala.io.BufferedSource$BufferedLineIterator.hasNext(BufferedSource.scala:67) ~[scala-library-2.10.2.jar:na]
at scala.collection.Iterator$class.foreach(Iterator.scala:727) ~[scala-library-2.10.2.jar:na]
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) ~[scala-library-2.10.2.jar:na]
at scala.collection.TraversableOnce$class.addString(TraversableOnce.scala:320) ~[scala-library-2.10.2.jar:na]
at scala.collection.AbstractIterator.addString(Iterator.scala:1157) ~[scala-library-2.10.2.jar:na]
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:286) ~[scala-library-2.10.2.jar:na]
at scala.collection.AbstractIterator.mkString(Iterator.scala:1157) ~[scala-library-2.10.2.jar:na]
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:288) ~[scala-library-2.10.2.jar:na]
at scala.collection.AbstractIterator.mkString(Iterator.scala:1157) ~[scala-library-2.10.2.jar:na]
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:290) ~[scala-library-2.10.2.jar:na]
at scala.collection.AbstractIterator.mkString(Iterator.scala:1157) ~[scala-library-2.10.2.jar:na]
at io.gatling.recorder.har.HarReader$.processHarFile(HarReader.scala:44) ~[gatling-recorder-2.0.0-M3a.jar:na]
at io.gatling.recorder.controller.RecorderController.startRecording(RecorderController.scala:72) ~[gatling-recor
der-2.0.0-M3a.jar:na]
at io.gatling.recorder.ui.RecorderFrontend.startRecording(RecorderFrontEnd.scala:68) [gatling-recorder-2.0.0-M3a
.jar:na]
at io.gatling.recorder.ui.swing.frame.ConfigurationFrame.io$gatling$recorder$ui$swing$frame$ConfigurationFrame$$
reloadConfigurationAndStart(ConfigurationFrame.scala:387) [gatling-recorder-2.0.0-M3a.jar:na]
at io.gatling.recorder.ui.swing.frame.ConfigurationFrame$$anonfun$8.apply$mcV$sp(ConfigurationFrame.scala:86) [g
atling-recorder-2.0.0-M3a.jar:na]
at scala.swing.Action$$anon$2.apply(Action.scala:60) [scala-swing-2.10.2.jar:na]
at scala.swing.Action$$anon$1.actionPerformed(Action.scala:78) [scala-swing-2.10.2.jar:na]
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) [na:1.7.0_51]
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) [na:1.7.0_51]
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) [na:1.7.0_51]
at javax.swing.DefaultButtonModel.setPressed(Unknown Source) [na:1.7.0_51]
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) [na:1.7.0_51]
at java.awt.Component.processMouseEvent(Unknown Source) [na:1.7.0_51]
at javax.swing.JComponent.processMouseEvent(Unknown Source) [na:1.7.0_51]
at java.awt.Component.processEvent(Unknown Source) [na:1.7.0_51]
at java.awt.Container.processEvent(Unknown Source) [na:1.7.0_51]
at java.awt.Component.dispatchEventImpl(Unknown Source) [na:1.7.0_51]
at java.awt.Container.dispatchEventImpl(Unknown Source) [na:1.7.0_51]
at java.awt.Component.dispatchEvent(Unknown Source) [na:1.7.0_51]
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) [na:1.7.0_51]
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) [na:1.7.0_51]
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) [na:1.7.0_51]
at java.awt.Container.dispatchEventImpl(Unknown Source) [na:1.7.0_51]
at java.awt.Window.dispatchEventImpl(Unknown Source) [na:1.7.0_51]
at java.awt.Component.dispatchEvent(Unknown Source) [na:1.7.0_51]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [na:1.7.0_51]
at java.awt.EventQueue.access$200(Unknown Source) [na:1.7.0_51]
at java.awt.EventQueue$3.run(Unknown Source) [na:1.7.0_51]
at java.awt.EventQueue$3.run(Unknown Source) [na:1.7.0_51]
at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_51]
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) [na:1.7.0_51]
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) [na:1.7.0_51]
at java.awt.EventQueue$4.run(Unknown Source) [na:1.7.0_51]
at java.awt.EventQueue$4.run(Unknown Source) [na:1.7.0_51]
at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_51]
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) [na:1.7.0_51]
at java.awt.EventQueue.dispatchEvent(Unknown Source) [na:1.7.0_51]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [na:1.7.0_51]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [na:1.7.0_51]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [na:1.7.0_51]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [na:1.7.0_51]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [na:1.7.0_51]
at java.awt.EventDispatchThread.run(Unknown Source) [na:1.7.0_51]

export.har (5.63 MB)

Hi,

The encoding issue is already fixed on the master … but still it doesn’t work.

The problem is that you HAR file actually contains some websocket related infos :

“headers”: [
{
“name”: “Date”,
“value”: “Thu, 06 Mar 2014 09:04:56 GMT”
},
{
“name”: “X-Content-Type-Options”,
“value”: “nosniff”
},
{
“name”: “Server”,
“value”: “Microsoft-IIS/8.0”
},
{
“name”: “X-Powered-By”,
“value”: “ASP.NET
},
{
“name”: “Upgrade”,
“value”: “Websocket”
},
{
“name”: “Cache-Control”,
“value”: “private, max-age=1800, s-maxage=60, must-revalidate, proxy-revalidate”
},
{
“name”: “Sec-WebSocket-Accept”,
“value”: “l3hr6P5ve9FICkbQQW69z6CtU84=”
},
{
“name”: “Connection”,
“value”: “Upgrade”
}
],
“cookies”: [],
“content”: {
“size”: 0,
“compression”: 0
},

This is currently not supported. I’ll read the HAR spec tomorrow to see what we shall do.

cheers
Nicolas

I just opened an issue: https://github.com/excilys/gatling/issues/1678

Hi Franck,

Sorry for the delay, but I just pushed a fix in the master.
After the next build, you can try it with a snapshot version from here: https://oss.sonatype.org/content/repositories/snapshots/io/gatling/highcharts/gatling-charts-highcharts/2.0.0-SNAPSHOT/

Does it work on your side ?

cheers
Nicolas

Hi Nicolas,

Sorry too for the delay of my answer…i was in vacation and busy after.

To conclude this topic, i got a snapshot after your fix, and it works fine on my side.
Great jobs !

I find the har recording feature very useful.

Others points i’ve noticed:

I’ve noticed on the last release 2M3 an issue on the html report when you have request’s name too long that shift ont the right the results’s grid.
=> I can say that now it well managed on snapshot.

on snapshot, if you record with proxy credentials and you put an “” on the username like username=toto\tutu, the recordedsimulation doesn’t double the “” character that provoke an error during the compilation or the execution (i dont remenber)
=> a little minor bug of the recorder ?

on snapshot with the recorder, i record an har file. This har generated by chrome dev contains some headers properties begin with “:” like “**:**host” (find with googleapi request).
In this case, we obtain on the recordedSimulation the normally follow header :

val headers_0 = Map(""":host""" → “”"""")

However, a header property 's name with “:” is not supported by gatling running.
It’s not a big deal for me because this property wasn’t important for me.
=> bug ? is header’s name with “:” should be supported or not ?

Thanks for your great tool and reactive support !

Cheers,

Franck

Hi Franck,

I could reproduce the :host stuff. Indeed, such a header is absolutely illegal from the RFC perspective.
It also seems like only Google Chrome sends this crap. Looks like one hell of a hack that Google implemented for tracking.

We’ll just filter them.

Thanks for reporting.

Here’s the issue: https://github.com/excilys/gatling/issues/1721
Will be fixed later today.

I confirm that I’ve also seen this “c…” :wink: only with Google Chrome. (no such header on firefox and IE for the same record)
I forgot to tell you.

Have a nice day

Franck

Fixed.

Have a nice week-end,
Nicolas