#Tauri 2.0.1-rc10 on Windows - Refused to execute inline script

7 messages · Page 1 of 1 (latest)

stark ice
#

Running the latest RC of Tauri version 2 on Windows with isolation mode active results in an error like Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'nonce-16386336672808645265' 'sha256-Ptr6AdEVRnAzjWNLKfOsbSdF0wBZquJ8JC9yowI7oUU=' 'sha256-BimfdWigiGKqCgqYSKsBLTLCR4WMW0TQcnrCL0CsVCM=' 'sha256-Ptr6AdEVRnAzjWNLKfOsbSdF0wBZquJ8JC9yowI7oUU='". Either the 'unsafe-inline' keyword, a hash ('sha256-zTUpprM6DaX+a1WejnBsJRGhqeeHrm1DViGQwA5rHK8='), or a nonce ('nonce-...') is required to enable inline execution.

Somehow that only happens in isolation mode. Not quite sure how that makes sense. Is CSP only active / configured in isolation mode or is it the isolation mode that violates the CSP?

distant python
#

Is CSP only active / configured in isolation mode
No, unless you have csp configured to null and the isolation overwrites that and configures the csp regardless.
is it the isolation mode that violates the CSP?
That could be. Do you think you can create a minimal reproduction repo for us to check out?

stark ice
#

@distant python I think so, yes. Where do you want me to put the sample?

distant python
#

Ideally on github or any alternative

stark ice
#

Hope that does the trick, at least on my Windows 10 machine it does when running "npx tauri dev" and inspecting the webview instance --> console

distant python
#

Thank you! I don't feel too fancy rn so i won't be able to look at it today. It's also not reallyyy my area anyway so would you mind opening a small issue in our github repo for the team? 🙏