Chrome Content Security Policy error when executing storeEval


#1

Just a couple days back a page I routinely scrape with Chrome Kantu extension began to break. The following was in my log:

[info]
Executing:  | storeEval | var s="${amountTemp}"; Number.parseFloat(s.replace(/[$]/g,'')); | amount | 
[error]
Error in runEval code: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive....

I am not sure if I am getting this error because something changed on the page I am scraping or if the permissions granted to the Kantu extension changed. Is there any way to fix this in Kantu? My current workaround is using another extension that disables CSP, but I would rather not do that.


[Feature Request] [Issue #279] Error in runEval code: Refused to evaluate a string as JavaScript because 'unsafe-eval'
JSON.stringify error while looping input file
#2

because something changed on the page

Yes, most likely something has changed on the page. For example, on github.com we see the same problem.

Is there any way to fix this in Kantu?

I will get back to you about this part.


#4

Update: We found a solution for the CSP issue, and plan to release it with the Kantu (early) July update. Before that, we are releasing the June update in a few days with some amazing new commands :wink: