Skip to content

Mediapipe No Longer Compatible With Chrome Extensions  #4028

Description

@nskaiser

Hello,

We are unable to submit Chrome Extensions that use Mediapipe due to the new Manifest V3 requirement.

In manifest v3 the script-src directive in content_security_policy.extension_pages does not allow the use of "unsafe-eval" as mentioned here - https://developer.chrome.com/docs/extensions/mv3/mv3-migration/#content-security-policy

If "unsafe-eval" can't be specified for script-src then methods like eval() or Function(), which create functions from strings, are blocked as described here - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_eval_expressions

When we load https://cdn.jsdelivr.net/npm/@mediapipe/holistic/holistic_solution_wasm_bin.js there is a function called createNamedFunction() which uses new Function() to create functions by given name and body. Since "unself-eval" can't be specified for script-src directive then this method is blocked and an error is thrown.

I have spoken to the Google Chrome Store team and they will not make any exceptions to the Manifest V3 requirement.

Is this something that can be quickly addressed?

Metadata

Metadata

Labels

legacy:selfie segmentationIssues related to selfie segmentationplatform:javascriptMediaPipe Javascript issuestype:bugBug in the Source Code of MediaPipe Solution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions