" Wasm code generation disallowed by embedder)" error
ilovepumpkin opened this issue · comments
I am getting the error " Wasm code generation disallowed by embedder)" recently. It could be fixed by add "unsafe-eval" based on https://stackoverflow.com/questions/48523118/wasm-module-compile-error-in-chrome-extension , but according to our company security requirement, 'unsafe-eval' is not allowed in 'script-src'. Is there any chance that this issue could be fixed in d3-graphviz itself?
I'm sorry, but I don't know much about WASM really. Do you have an example that I can try? Do you mean that this worked before, but no longer doesn't? If so, what have you changed?
Perhaps @GordonSmith has some ideas?
@ilovepumpkin can you confirm if the following link works (or doesn't): https://observablehq.com/@gordonsmith/graphviz?
Looking at your error message it looks like its failing in an "embedder" instance - is your scenario "special" in anyway (like a chrome extension or electron app)?
@ilovepumpkin you also have the option to allow:
"content_security_policy": "script-src 'self' 'wasm-eval'; object-src 'self'"
Which is more specific, but may still get vetoed by your security policies...
@GordonSmith @magjac Thanks for your response! For some unknown reasons, today I found I can not reproduce it anymore. Sorry to interrupt you. I am going to close this issue for now, will reopen it if it happens again. Sorry again.