Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes/No <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.69.2 OS Version: Steps to Reproduce: have developed an extension, the extension has some webview page, then I install on VSCodeit is ok, the webview is shown; I run it on code-server, my ip is 192.168.88.212, then I input http://127.0.0.1:3000, it is also ok, the webview page is shown; I input 192.168.88.212:3000, the webview page is not shown, and the error is "Can't compute sha-256" you help to fix it ? thank you very much
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.71.2. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding!
Thank you for reply very much, I have download the vscode-1.71.2, and then I install and run, the problem still exits, Can you help me?
Do other webviews work, such as the built-in markdown preview or release notes page?
It also not works
I investigated this a determined this is a limitation of how our webviews are implemented. To use them, the editor needs to be running in a This includes but would not include an ip such as . That is why works. This feature would also for other ips if you can use instead of Closing since this is by-designed, although I've a more clear error message in

Discussion:
export async function parentOriginHash(parentOrigin: string, salt: string): Promise<string> { // This same code is also inlined at `src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html` if (!crypto.subtle) { <del> throw new Error(`Can't compute sha-256`); </del> <ins> throw new Error(`'crypto.subtle' is not available so webviews will not work. This is likely because the editor is not running in a secure context (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).`); </ins> } const strData = JSON.stringify({ parentOrigin, salt }); const encoder = new TextEncoder(); const arrData = encoder.encode(strData);

<meta charset="UTF-8"> <meta http-equiv="Content-Security-Policy" <del> content="default-src 'none'; script-src 'sha256-j+I5FRqQBE2aQY6H/U/pjZI3buJy36yZ/upZTKZov3c=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> </del> <ins> content="default-src 'none'; script-src 'sha256-JLx+LG3LboPnZ7e91Q6dkbi50CHab+JYYk7+m6GKJxI=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> </ins> <!-- Disable pinch zooming --> <meta name="viewport"

if (!crypto.subtle) { // cannot validate, not running in a secure context <del> throw new Error(`Cannot validate in current context!`); </del> <ins> throw new Error(`'crypto.subtle' is not available so webviews will not work. This is likely because the editor is not running in a secure context (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).`); </ins> } // Here the `parentOriginHash()` function from `src/vs/workbench/common/webview.ts` is inlined