Quantcast
Channel: Grafana k6 - Grafana Labs Community Forums
Viewing all articles
Browse latest Browse all 339

Convert base64 string to bytes array

$
0
0

Hello, I am working on creating performance tests using K6. I wanted to convert a base64 string to a byte array but it’s not working as I am getting below error:
ERRO[0002] Uncaught (in promise) GoError: unable to serialise request object to protocol buffer: proto: (line 1:22): invalid value for bytes type: {
I am using below code from here to do so. Can someone please take a look?

const decBin = new Uint8Array(encoding.b64decode(enc));

Thanks for your time.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 339

Trending Articles