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

Just tried to upgrade but the new version will not work in a chrome extension #2587

Closed
richtera opened this issue Mar 14, 2023 · 7 comments
Closed

Comments

@richtera
Copy link

It looks like the latest minor upgrade uses @chainsafe/as-sha256 as a dependency which is not compatible with manifest 3 chrome extensions, because it loads the wasm using new Module() passing it as a string. This is equivalent to requiring the wasm-unsafe-eval permission which is not something that can be provided inside of manifest 3. We had to switch back. It's a bit unfortunate that this upgrade happened in a minor upgrade, because going back requires a bit of yarn.lock hacking.

@meeh0w
Copy link

meeh0w commented Mar 15, 2023

Encountered the same issue with @ethereumjs/util.

@chainsafe/ssz added as a dependency here depends on @chainsafe/as-sha256 which is a WebAssembly module.

It prevents the client apps from working in the extension realm (Chrome's manifest V3 does not allow wasm):
image
(no, you can't just override this particular part of the CSP, Chrome won't allow that)

@richtera
Copy link
Author

I think if the wasm was imported from a file instead of being passed as a string to new Module() it could possibly work

@acolytec3
Copy link
Contributor

Thanks for reporting. We're going to discuss with chainsafe on a way forward.

@meeh0w
Copy link

meeh0w commented Mar 15, 2023

I just found out that you can add script-src 'self' 'wasm-unsafe-eval'; to the CSP and it makes it work, Manifest v3 allows that. So it becomes a matter of wether it's something one wants to allow.

@paulmillr
Copy link
Member

ChainSafe/ssz#313

@holgerd77
Copy link
Member

Addressed right now in #2721

Release likely in 1-2 weeks

@holgerd77
Copy link
Member

This has been released, will close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants