-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
k6 Converter: Cannot unmarshal array into Go value of type map[string]interface {} #777
Comments
@san-ouadghiri sent me a sample file that triggered this and the issue is a wrong assumption in the k6 HAR converter. Here's a pared-down and edited version of the problematic HAR file: {
"log": {
"version": "1.1",
"creator": {
"name": "Firefox",
"version": "62.0"
},
"browser": {
"name": "Firefox",
"version": "62.0"
},
"pages": [
{
"startedDateTime": "2018-09-24T10:57:17.234+02:00",
"id": "page_3",
"title": "sample page",
"pageTimings": {
"onContentLoad": -1,
"onLoad": -1
}
}
],
"entries": [
{
"pageref": "page_3",
"startedDateTime": "2018-09-24T10:57:17.234+02:00",
"request": {
"bodySize": 2,
"method": "PATCH",
"url": "https://httpbin.org/anything",
"httpVersion": "HTTP/2.0",
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"queryString": [],
"postData": {
"mimeType": "application/json",
"params": [],
"text": "[]"
}
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/2.0",
"headers": [
{
"name": "content-type",
"value": "application/json; charset=utf-8"
}
],
"cookies": [],
"content": {
"mimeType": "application/json; charset=utf-8",
"size": 2,
"text": "{}"
},
"redirectURL": "",
"headersSize": 566,
"bodySize": 2
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 0,
"ssl": 0,
"send": 0,
"wait": 811,
"receive": 0
},
"time": 811,
"_securityState": "secure",
"connection": "443"
}
]
}
} The problem comes from the @san-ouadghiri - disabling |
Thanks! Good luck with your fix-expedition. In the meanwhile I'll use the given workaround :). |
The Use https://github.com/grafana/har-to-k6 as a better alternative. |
Hey everyone,
I'm using the .har converter, and on one files obtained an error message.
Step to reproduce
Convert line
san@computer:~/mypath$ k6 convert save.har -O save.js --enable-status-code-checks --correlate --no-batch (--skip url1 --skip url2...)
Error Message
ERRO[0000] json: cannot unmarshal array into Go value of type map[string]interface {}
File (.har)
The file is difficult to reduce (and still make it valid). And contains some data I'm not crazy to put here. So please contact me (I'm on k6 slack) to obtain it :).
The text was updated successfully, but these errors were encountered: