artillery
artillery copied to clipboard
worker error, id: 1 Error: Cookie failed to parse
Version info:
docker image artilleryio/artillery:2.0.0-23
Running this command:
docker run --rm -it -v ${PWD}:/scripts artilleryio/artillery run /scripts/front.yml
I expected to see this happen:
Load testing for my website.
Instead, this happened:
Files being used:
hi @MMaximus111 👋 thank you for the bug report. Is your scenario (the part that's not in the screenshot) sending a cookie anywhere? (with cookie
attribute on a request - https://www.artillery.io/docs/guides/guides/http-reference#cookies)
No, I didn't add a special attribute for cookies in my file. What is not included in the screenshot is similar. All methods differ only in the URL.
The site itself returns some cookies, but for me they do not matter, I would even ignore them during load testing. In this scenario, unfortunately, because of them, something breaks.
If I can help you in any other way in finding a bug - let me know.
Hey, nice catch!
Managed to reproduce the error by targeting a server that returned a malformed Set-Cookie header like:
Set-Cookie: abcdef //or =abcdef or empty
They should be ignored as per RFC6265:
If the name-value-pair string lacks a %x3D ("=") character,
ignore the set-cookie-string entirely.
//...
If the name string is empty,
ignore the set-cookie-string entirely.
Going to go ahead and draft something that:
- ignore malformed cookies
- let user know, somehow
- continue with the scenario
Can you confirm this is what you are seeing on your end? If not, please share your findings!
This is an example what i get in response about cookies. Maybe it can help you.
Response sent 0 bytes of Cookie data:
Set-Cookie:
Response sent 387 bytes of Cookie data:
Set-Cookie: e964dd5ed2621a4fbda894145=i%sV7N8nI%3DAI%2F4APEV6GHvA%3DQZpfEd32jvM%3DxBRf22PhnIMyEflL%2FY%3Dw66I7Riekd0sHxo8niM%3DJe7J2ChPK0k%3D12H622f6QJdGc%3DZXUux%5BbDg%3DHriElN6vvrrA%3Ddg%2BocwaZcqQ%3DD3gi97M7Dvpw%3D2W4wjkDUYA4%3DZLOxhtt0%3DW0BC4WgMEmg%3D; expires=Mon, 15-Aug-2022 09:05:21 GMT; Max-Age=1728000; path=/; domain=example.com; httponly
Excellent! That's exactly the test case I used in the PR (empty cookie header), so it should be fixed once we merge it
Hey, this should be fixed and released Related prs: https://github.com/artilleryio/artillery/pull/1492 (better default behavior) and https://github.com/artilleryio/artillery/pull/1581 (allow customization of toughCookie props)