Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate manifest content_security_policy error #11

Open
defghy opened this issue Jul 21, 2021 · 1 comment · May be fixed by #35
Open

validate manifest content_security_policy error #11

defghy opened this issue Jul 21, 2021 · 1 comment · May be fixed by #35

Comments

@defghy
Copy link

defghy commented Jul 21, 2021

content_security_policy needs string. It's different from doc.

[
{
keyword: 'type',
dataPath: '.content_security_policy',
schemaPath: '#/definitions/content_security_policy/type',
params: { type: 'string' },
message: 'should be string',
schema: 'string',
parentSchema: {
type: 'string',
description: 'This introduces some fairly strict policies that will make extensions more secure by default, and provides you with the ability to create and enforce rules governing the types of content that can be loaded and executed by your extensions and applications.',
default: "script-src 'self'; object-src 'self'"
},
data: { extension_pages: "script-src 'self'; object-src 'self'" }
}
]
[chrome-extension] There were problems with the extension manifest.
error during build:
ValidationError: There were problems with the extension manifest.
at validateManifest (/Users/huyu/project/tools/ks-dc-kwaibi-chrome-ext/node_modules/.pnpm/vite-plugin-chrome-extension@0.0.7/node_modules/vite-plugin-chrome-extension/lib/index-cjs.js:1578:11)
at ManifestProcessor.validateManifest (/Users/huyu/project/tools/ks-dc-kwaibi-chrome-ext/node_modules/.pnpm/vite-plugin-chrome-extension@0.0.7/node_modules/vite-plugin-chrome-extension/lib/index-cjs.js:2795:13)
at ManifestProcessor.generateBundle (/Users/huyu/project/tools/ks-dc-kwaibi-chrome-ext/node_modules/.pnpm/vite-plugin-chrome-extension@0.0.7/node_modules/vite-plugin-chrome-extension/lib/index-cjs.js:2740:14)
at async Object.generateBundle (/Users/huyu/project/tools/ks-dc-kwaibi-chrome-ext/node_modules/.pnpm/vite-plugin-chrome-extension@0.0.7/node_modules/vite-plugin-chrome-extension/lib/index-cjs.js:3284:13)
at async Bundle.generate (/Users/huyu/project/tools/ks-dc-kwaibi-chrome-ext/node_modules/.pnpm/rollup@2.50.5/node_modules/rollup/dist/shared/rollup.js:13340:9)
at async handleGenerateWrite (/Users/huyu/project/tools/ks-dc-kwaibi-chrome-ext/node_modules/.pnpm/rollup@2.50.5/node_modules/rollup/dist/shared/rollup.js:20719:23)
at async doBuild (/Users/huyu/project/tools/ks-dc-kwaibi-chrome-ext/node_modules/.pnpm/vite@2.4.0-beta.2/node_modules/vite/dist/node/chunks/dep-06e8fbb4.js:51040:20)
at async build (/Users/huyu/project/tools/ks-dc-kwaibi-chrome-ext/node_modules/.pnpm/vite@2.4.0-beta.2/node_modules/vite/dist/node/chunks/dep-06e8fbb4.js:50864:16)
at async CAC. (/Users/huyu/project/tools/ks-dc-kwaibi-chrome-ext/node_modules/.pnpm/vite@2.4.0-beta.2/node_modules/vite/dist/node/cli.js:13995:9)

image
https://developer.chrome.com/docs/extensions/mv3/mv3-migration-checklist/

@eselkin
Copy link

eselkin commented Jun 5, 2022

New schema for v3 is here: https://json.schemastore.org/chrome-manifest
Not sure if you can just replace the one in this library or you'd have to do some work. Right now I have a modification that converts my string (passing the checking here) to the object above.

@colearendt colearendt linked a pull request Nov 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants