You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARN[0000] Request Failed error="unknown request body type int64"
This was because we no longer were using common.Bind to translate arguments of functions, and are now using the pure goja logic of it. And goja tried to translate arrays that will match variadic arguments by assigning element to a variadic argument instead of just as a whole ot the first variadic argument. (in pseudo code):
func s(args ... interface{}) {}
s([1,2,3,4]) // this will result in `args[0] being `1`, `args[1]` being `2` etc.
This was reported (with a kind of different problem) and fixed independently of this issue.
After this was pulled in k6 in 77b5ac8 the error changes to:
WARN[0000] Request Failed error="unknown request body type *[]uint8"
This was also reported and fixed.
The upstream issue explains it in more details, but the problem comes from the fact that we get a pointer to the underlying []byte that is http.file.data instead of just a slice.
Note: byte is basically alias for uint8 in go which is why the error says *[]uint8 instead of *[]byte
Brief summary
After 3bcdabb it started to error with
This was because we no longer were using
common.Bind
to translate arguments of functions, and are now using the pure goja logic of it. And goja tried to translate arrays that will match variadic arguments by assigning element to a variadic argument instead of just as a whole ot the first variadic argument. (in pseudo code):This was reported (with a kind of different problem) and fixed independently of this issue.
After this was pulled in k6 in 77b5ac8 the error changes to:
This was also reported and fixed.
The upstream issue explains it in more details, but the problem comes from the fact that we get a pointer to the underlying
[]byte
that ishttp.file.data
instead of just a slice.Note:
byte
is basically alias foruint8
in go which is why the error says*[]uint8
instead of*[]byte
k6 version
0.36.0 and 0.37.0
OS
linux but applies to all
Docker version and image (if applicable)
No response
Steps to reproduce the problem
Expected behaviour
Sending request with a body
Actual behaviour
Error with strange types
The text was updated successfully, but these errors were encountered: