Chrome-extension: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script

350 views Asked by At

waveform.js

I am trying to add the above js file in my chrome extension and getting this error: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval'"

and here is my manifests settings:

"version": "0.6.2", "manifest_version": 3, "content_security_policy": { "extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self';", "sandbox": "sandbox allow-scripts allow-forms allow-popups allow-modals; script-src 'self' 'unsafe-inline' 'unsafe-eval'; child-src 'self';" },

how to tackle this problem.

I tried stackoverflow/question, in this I remove eval/new Function from my js file but it did't work.

0

There are 0 answers