-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
got "incorrect header check" when invoke pako.inflate during websocket test #594
Comments
This seems like it may be an issue with the bower version of the import pako from './bower_components/pako/dist/pako.js';
export default function () {
let data = { ping: "12345678" };
let json = JSON.stringify(data);
console.log(json);
let binStr = pako.deflate(json);
console.log(binStr);
let text = pako.inflate(binStr);
console.log(text);
console.log(String.fromCharCode.apply(null, text));
} works as expected and gives me:
As soon as I try to add |
@na-- It works well here. Thanks a lot ! By the way, I got a reply message when I connected to a websocket server, and I printed it in console got a strang string code like "�V*��KW�245215�0145�0�����". How can I uncompress it? Would you please give me any idea? |
Sorry, I'm not sure what the reason is, maybe the server just uses the websockets to send some sort of binary data? In any case, that discussion is something that's more suited to the #support channel of the k6 slack, so I'm closing this issue for now. |
@na-- You are right. This issue is not a bug. Thanks for your reply. |
As seen here, it seems like this could indeed be a bug in the goja runtime or somewhere in the JavaScript stack (babel, core.js/etc.), so I'm reopening this issue. |
The error in StackOverflow would probably be as |
I am closing this as the error that was provided in the original report is no longer happening since k6 v0.26.2 but was present up to v0.25.1. This likely was fixed by a goja update at some point and we just didn't notice |
I am executing a websocket testing using K6.
when handling ws response, I need to inflate the content. and I tried to use pako to do that.
The following is my script. I found pako can't deflate string and inflate either.
I tried the same code in node.js, fount it worked well. Is there anything wrong?
the error message is
The text was updated successfully, but these errors were encountered: