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
I have been working on Bruno couple of weeks now and I really like it.
Currently I'm facing a problem for importing a specific external library 'cose-js'. I managed to import and use others like "@peculiar/webcrypto' or 'jose" by following this discussion.
But for the "cose-js" I have the following error: Error invoking remote method 'send-http-request': VMError: Operation not allowed on contextified object.
Hello, I'm just beginning to use Bruno and I run into the same issue, with 2 other libraries. I whitelisted it but nothing seems to work. Did you find any solution ?
Hello,
I have been working on Bruno couple of weeks now and I really like it.
Currently I'm facing a problem for importing a specific external library 'cose-js'. I managed to import and use others like "@peculiar/webcrypto' or 'jose" by following this discussion.
But for the "cose-js" I have the following error: Error invoking remote method 'send-http-request': VMError: Operation not allowed on contextified object.
My script looks like this:
`const { TextDecoder, TextEncoder } = require('node:util');
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
// Library to base64 encoding
const btoa = require('btoa');
// External lib for COSE signature
const { Cose } = require('cose-js');
const cose = new Cose();
const { Crypto } = require("@peculiar/webcrypto");
const crypto = new Crypto();
const keys = await crypto.subtle.generateKey(
{
name: "ECDSA",
namedCurve: "P-256", // P-256, P-384, or P-521
},
false,
["sign", "verify"],
);
//... rest of the pre-script ...`
and the bruno.json:
{ "version": "1", "name": "myCollection", "type": "collection", "scripts": { "moduleWhitelist": [ "cose-js", "crypto", "process", "buffer" ], "filesystemAccess": { "allow": true } }, "ignore": [ "node_modules", ".git" ] }
The error occurs right when I try to import the library
const { Cose } = require('cose-js');
I went through this discussion, but couldn't find a solution for my problem.
The text was updated successfully, but these errors were encountered: