Hello, I have run into a problem parsing from JSON on ubuntu.
I have a script to which I pass a .json file through an env variable as such k6 run --env MY_CONFIG_FILE=var.json pisp_car_test.js
.
Within the code it is used as such const variables = JSON.parse(open(__ENV.MY_CONFIG_FILE));
The content of a file is quite simply a small json object:
{
"baseURL": "https://sandbox-url.domain.eu/path/",
"clientId": "value",
"clientSecret": "secretValue"
}
On my mac, it works perfectly. On my remote ubuntu server I receive the following:
ERRO[0002] cannot parse json due to an error at line 1, character 2 , error: invalid character ‘e’ looking for beginning of value
contactsat reflect.methodValueCall (native)
at main (file:///home/ubuntu/k6-stress-tests/performance_tests/pisp_car_test.js:72:12(52)) executor=constant-arrival-rate scenario=contacts source=stacktrace
I can vouch for same file contents.
Perhaps somebody has faced the issue and has a workaround?