Below migrate error for Mainfest version 3

1,097 views
Skip to first unread message

mukund patel

unread,
Nov 30, 2022, 9:05:57 AM11/30/22
to Chromium Extensions
How to migrate  below Mainfest v2 CSP  to Mainfest v3 in chrome plugin...

Mainfest V2:
"content_security_policy": "script-src 'self' 'unsafe-eval' https://ssl.google-analytics.com; object-src 'self'",

when i have try this for v3

Mainfest V3:
"content_security_policy": {
       "extension_pages": "script-src 'self', 'unsafe-eval' https://ssl.google-analytics.com,object-src 'self'",
       "sandbox": "..."
    },

getting below error :
'content_security_policy.extension_pages': Insecure CSP value "'unsafe-eval'" in directive 'script-src'. Could not load manifest



Stefan Van Damme

unread,
Nov 30, 2022, 9:45:59 AM11/30/22
to Chromium Extensions, mukund patel
Hi there,

You can not use remote scripts in Manifest V3 Chrome extension:
Manifest V3:
"content_security_policy": {
       "extension_pages": "script-src 'self' 'unsafe-eval' https://ssl.google-analytics.com; object-src 'self'",
 },

If you want to use Google Analytics, try the answer on this StackOverflow post:

Thanks,
Reply all
Reply to author
Forward
0 new messages