'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive

66 views
Skip to first unread message

mouricef

unread,
Dec 9, 2021, 1:04:41 AM12/9/21
to zotero-dev
Hi All,

We have integrated zotero in our mobile app(React Native) to sync the library.  

We have oAuth flow(https://www.zotero.org/oauth/authorize) implemented using react native webview  to import the data.

We are observing below issue on our crash reporting dashboard. Some users are experiencing this issue but we are not sure actually why and when this is happening as
once we launch the oAuth flow inside the web view we do not have control over what operation user is performing on that link.

Error in evaluationEvaluation: status: 13 value: {message=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' https://api.zotero.org 'nonce-myviflcr11' https://www.recaptcha.net/recaptcha/api.js https://www.gstatic.com".
} hasMessage: true message: 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' https://api.zotero.org 'nonce-myviflcr11' https://www.recaptcha.net/recaptcha/api.js https://www.gstatic.com".

Need help to understand and fix this issue.

Thanks,
Mourice
Reply all
Reply to author
Forward
0 new messages