You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add a lottie animation to my chrome web extension, but it fails because the CSP policy does not allow for the web assembly module to be loaded. This is the error output I'm seeing:
Primary WASM load failed from https://cdn.jsdelivr.net/npm/@lottiefiles/[email protected]/dist/dotlottie-player.wasm. Error: Aborted(CompileError: WebAssembly.instantiate(): Refused to compile or instantiate WebAssembly module because neither 'wasm-eval' nor 'unsafe-eval' is an allowed source of script in the following Content Security Policy directive: "script-src 'self'"). Build with -sASSERTIONS for more info.
However, when I add the recommended CSP specifications to my extension manifest, chrome will not allow it to be compiled due to insufficient security standards:
Failed to load extension
File
~/dev/browser_extension/dist/chrome
Error
'content_security_policy.extension_pages': Insecure CSP value "wasm-unsafe-eval" in directive 'script-src'.
Could not load manifest.
Is there a Lottie solution that doesn't use WebAssembly to load a player? Are there any workarounds for this use case?
The text was updated successfully, but these errors were encountered:
maxwelljmckee
changed the title
Cannot load DotLottieReact play inside a web extension due to WASM CSP policy
Cannot load DotLottieReact player inside a web extension due to WASM CSP policy
Dec 18, 2024
Overview
I'm trying to add a lottie animation to my chrome web extension, but it fails because the CSP policy does not allow for the web assembly module to be loaded. This is the error output I'm seeing:
However, when I add the recommended CSP specifications to my extension manifest, chrome will not allow it to be compiled due to insufficient security standards:
Is there a Lottie solution that doesn't use WebAssembly to load a player? Are there any workarounds for this use case?
The text was updated successfully, but these errors were encountered: