Script report a referenceError

Hi @bobobkb, welcome to the community forum :confetti_ball:

As the message points out Buffer is not defined, as it is a nodejs thing and k6 isn’t nodejs or based on it. I guess what you want is to base64encode stuff, in which case you can use the encoding package.

It does have some problems that you might run into, but they seem to be only with binary data, so hopefully, you won’t be affected :slight_smile:

edit: You can also see how to use ArrayBuffer to do the same here, although that isn’t needed if you have a string as the original form