Access to cookie jar denied

I have the following as part of a pre-request script in the attempt to read cookies and transfer them so they are part of every request and I can automate testing of my APIs.

const jar = pm.cookies.jar();
jar.getAll('/', (error, cookies) =>
        if (error) {
        } else {

The problem is that I get an error with a message property ‘CookieStore: programmatic access to “” is denied’. I am running this Postman request on localhost and I have “whitelisted” localhost as defined in the documentation. What am I doing wrong?

Even I am getting the same error inspite whitelisting ip.

const jar = pm.cookies.jar();

jar.clear(pm.request.url, function (error, cookies) {;


message in console
CookieStore: programmatic access to “” is denied