Skip to content
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

POST request with multipart/form-data missing in HAR conversion #1227

Closed
Sam7 opened this issue Nov 6, 2019 · 3 comments
Closed

POST request with multipart/form-data missing in HAR conversion #1227

Sam7 opened this issue Nov 6, 2019 · 3 comments

Comments

@Sam7
Copy link

Sam7 commented Nov 6, 2019

I was recording a session in Chrome and converting the HAR to JS using K6 and found that one crucial request was missing from my script I simplified it down for you to test:
https://gist.github.com/Sam7/a267e875d77981254fd2a206070c58cd

The request just get's completely ignored and is not showing up on the JS file file

This is the command I used:
k6 convert .\xxx.zoo.org.au_simplified.har -O xxx.zoo.org.au_simplified.js
Even verbose doesn't give me any more insight about what's going wrong.

Thanks.

@Sam7 Sam7 changed the title POST request with 302 response missing in HAR conversion POST request with multipart/form-data missing in HAR conversion Nov 6, 2019
@mstoykov
Copy link
Contributor

mstoykov commented Nov 6, 2019

The internal to k6 har converter is discontinued, predominantly because it's not the best code and because the scope is somewhat outside of what k6 should be doing. There is an external project which probably handles this (and a lot of other things) a lot better.

The code in question that breaks this is here. But we do actually intend on starting to tell people to stop using the k6 internal converter (#1124) . So at best we are going to add a warning that the request will be skipped ... which should've been there from the start ... 🤦‍♂️

I just tested with the har-to-k6 tool and I am getting an error but I don't know if the tool also doesn't support multipart/form-data (which works in some amounts in k6) or is your script too simplified. When you try it and if it doesn't work for the whole script as well please report an issue there.

$ npx har-to-k6 xxx.zoo.org.au_simplified.har  -o output.tar
Converting 'xxx.zoo.org.au_simplified.har'
Error converting archive:
Post data conflict (0): specify 1 of params or text
$

@Sam7
Copy link
Author

Sam7 commented Nov 6, 2019

Great. thanks I'll give that a whirl.

@na--
Copy link
Member

na-- commented Nov 11, 2019

Closing this, since even if we're discontinuing the k6 built-in HAR converter, the bug was already described in #747

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants