code-server: Webview related errors with SSH FS Addon. Blank tabs.

OS/Web Information

  • Web Browser: Firefox
  • Local OS: Homeassistant OS
  • Remote OS:
  • Remote Architecture:
  • code-server --version:

Steps to Reproduce

  1. Install SSH FS Addon from marketplace
  2. Open SSH FS configuration and add new connection
  3. Blank tab appears

Expected

A tab with SSH FS settings should appear

Actual

Just a blank tab appears, and some webview related errors in Firefox console.

InkedScreenshot 2021-09-28 at 08-00-52 Visual Studio Code - Home Assistant_LI

Logs

Not able to provide logs right now. See all information about this in link below. https://github.com/SchoofsKelvin/vscode-sshfs/issues/279

Screenshot

Notes

All information can be found here: https://github.com/SchoofsKelvin/vscode-sshfs/issues/279 I’m not sure if it’s OK to open a bug report and just refer to another topic. But this is all I can do right now. Just trying to help out to get this bug sorted out. At least to start somewhere.

This issue can be reproduced in VS Code: Yes/No

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 27 (13 by maintainers)

Most upvoted comments

Looked into it and explained some stuff on the other issue. Looks like it might be a Firefox bug. It’s probably up to Firefox to fix it, or have VS Code change their webview code to account for this bug (if there’s even a way to bypass it).

Hmm…I guess we wait to see if the extension author chimes in then? I’m not sure what else we can do to help 😦

I have the same Problem with Firefox. With Chrome the Extensions works fine.

I think the Problem is from the Extension and not from code-server, because i got the same csp error when i’m using the “vscode server” https://github.com/SchoofsKelvin/vscode-sshfs/issues/279#issuecomment-943548921

Version: 3.12.0 b37ff28a0a582aee84a8f961755d0cb40a4081db I’m using Apache 2.4.48 with ssl

@flaektrem guessing you saw @SchoofsKelvin’s debugging in the other issue. Since this is a Firefox issue (most likely), do you mind if we close this?

I saw that, it’s ok. 🙂

I have the same Problem with Firefox. With Chrome the Extensions works fine.

I think the Problem is from the Extension and not from code-server, because i got the same csp error when i’m using the “vscode server”

Version: 3.12.0 b37ff28 I’m using Apache 2.4.48 with ssl

Everything working great in Chrome for me too.

Latest Firefox. Same problem with Microsoft Edge. Also same through Home Assistant app.

Edit: Seems like it works when using app remotely Screenshot_20211005-192326

Actually I should have read your logs more carefully since they indicate you are already using HTTPS.

Your browser seems to be missing some features. Are you using an old version of Firefox?

I understand. But what I don’t understand is why this blank tab never appeared before, without HTTPS. This is so strange.

Anyway, I appreciate your help 🙏🏻

I think I have missed some breaking change or something lately.

Nope, not a breaking change on our side (you would have known due to major version bump). But hey, maybe browsers made CSPs and/or service worker policies more strict? I’m not sure 🤷‍♂️

Hmm… those logs are different but I’m not sure if it helps.

Let’s call in an expert - @code-asher any ideas how to help them?

Thank you very much for that beautiful instruction.

Got the logs from when I press “Add new configuration” I’m on remote access via Nabu Casa right now as you can see in the logs. It doesn’t matter if I’m doing this locally, the tab is blank anyway.

08:10:45.532 Feature Policy: Skipping unsupported feature name “clipboard-read”. webviewElement.ts:84:10
08:10:45.532 Feature Policy: Skipping unsupported feature name “clipboard-write”. webviewElement.ts:84:10
08:10:45.536 Feature Policy: Skipping unsupported feature name “clipboard-read”. webviewElement.ts:117:16
08:10:45.536 Feature Policy: Skipping unsupported feature name “clipboard-write”. webviewElement.ts:117:16
08:10:45.537 Feature Policy: Skipping unsupported feature name “clipboard-read”. webviewElement.ts:130:10
08:10:45.537 Feature Policy: Skipping unsupported feature name “clipboard-write”. webviewElement.ts:130:10
08:10:45.600 GEThttps://xxxx.ui.nabu.casa/api/hassio_ingress/WtaX-gg53dk1GeSkD5WUAKEQDCtkRyj-evGkjQTShZg/webview/index.html?id=ad398544-4049-4be9-9088-25cdd9aa35f7&swVersion=2&extensionId=Kelvin.vscode-sshfs&vscode-resource-base-authority=vscode-resource.vscode-webview.net
[HTTP/1.1 200 OK 240ms]

08:10:45.610 GEThttps://xxxx.ui.nabu.casa/api/hassio_ingress/WtaX-gg53dk1GeSkD5WUAKEQDCtkRyj-evGkjQTShZg/vscode-remote-resource?path=/data/vscode/extensions/kelvin.vscode-sshfs-1.22.0/resources/icon.svg&tkn=
[HTTP/1.1 200 OK 245ms]

08:10:46.016 GEThttps://xxxx.ui.nabu.casa/api/hassio_ingress/WtaX-gg53dk1GeSkD5WUAKEQDCtkRyj-evGkjQTShZg/webview/host.js
[HTTP/1.1 200 OK 90ms]

08:10:46.167 GEThttps://xxxx.ui.nabu.casa/api/hassio_ingress/WtaX-gg53dk1GeSkD5WUAKEQDCtkRyj-evGkjQTShZg/webview/main.js
[HTTP/1.1 200 OK 119ms]

08:10:46.449 Feature Policy: Skipping unsupported feature name “clipboard-read”. main.js:677:12
08:10:46.449 Feature Policy: Skipping unsupported feature name “clipboard-write”. main.js:677:12
08:10:46.449 Feature Policy: Skipping unsupported feature name “clipboard-read”. main.js:682:36
08:10:46.449 Feature Policy: Skipping unsupported feature name “clipboard-write”. main.js:682:36
08:10:46.449 Feature Policy: Skipping unsupported feature name “clipboard-read”. main.js:685:17
08:10:46.449 Feature Policy: Skipping unsupported feature name “clipboard-write”. main.js:685:17
08:10:46.474 GEThttps://xxxx.ui.nabu.casa/api/hassio_ingress/WtaX-gg53dk1GeSkD5WUAKEQDCtkRyj-evGkjQTShZg/webview/fake.html?id=ad398544-4049-4be9-9088-25cdd9aa35f7
[HTTP/1.1 200 OK 85ms]

08:10:46.722 GEThttps://vscode-remote+xxxxx.ui.nabu.casa.vscode-resource.vscode-webview.net/data/vscode/extensions/kelvin.vscode-sshfs-1.22.0/webview/build/static/js/runtime-main.bundle.js
CSP

08:10:46.722 Content Security Policy: The page’s settings blocked the loading of a resource at https://xxxx.ui.nabu.casa/api/hassio_ingress/WtaX-gg53dk1GeSkD5WUAKEQDCtkRyj-evGkjQTShZg/webview/service-worker.js?id=ad398544-4049-4be9-9088-25cdd9aa35f7&swVersion=2&extensionId=Kelvin.vscode-sshfs&vscode-resource-base-authority=vscode-resource.vscode-webview.net (“script-src”).
08:10:46.722 Loading failed for the <script> with source “https://vscode-remote+xxxx.ui.nabu.casa.vscode-resource.vscode-webview.net/data/vscode/extensions/kelvin.vscode-sshfs-1.22.0/webview/build/static/js/runtime-main.bundle.js”. index.html:116:1
08:10:46.739 Content Security Policy: The page’s settings blocked the loading of a resource at https://xxxx.ui.nabu.casa/api/hassio_ingress/WtaX-gg53dk1GeSkD5WUAKEQDCtkRyj-evGkjQTShZg/webview/service-worker.js?id=ad398544-4049-4be9-9088-25cdd9aa35f7&swVersion=2&extensionId=Kelvin.vscode-sshfs&vscode-resource-base-authority=vscode-resource.vscode-webview.net (“script-src”).
08:10:46.740 GEThttps://vscode-remote+xxxxx.ui.nabu.casa.vscode-resource.vscode-webview.net/data/vscode/extensions/kelvin.vscode-sshfs-1.22.0/webview/build/static/js/269.bundle.js
CSP

08:10:46.740 Loading failed for the <script> with source “https://vscode-remote+xxxxx.ui.nabu.casa.vscode-resource.vscode-webview.net/data/vscode/extensions/kelvin.vscode-sshfs-1.22.0/webview/build/static/js/269.bundle.js”. index.html:116:1
08:10:46.740 Content Security Policy: The page’s settings blocked the loading of a resource at https://xxxxx.ui.nabu.casa/api/hassio_ingress/WtaX-gg53dk1GeSkD5WUAKEQDCtkRyj-evGkjQTShZg/webview/service-worker.js?id=ad398544-4049-4be9-9088-25cdd9aa35f7&swVersion=2&extensionId=Kelvin.vscode-sshfs&vscode-resource-base-authority=vscode-resource.vscode-webview.net (“script-src”).
08:10:46.741 GEThttps://vscode-remote+xxxxx.ui.nabu.casa.vscode-resource.vscode-webview.net/data/vscode/extensions/kelvin.vscode-sshfs-1.22.0/webview/build/static/js/main.bundle.js
CSP

08:10:46.741 Loading failed for the <script> with source “https://vscode-remote+xxxxx.ui.nabu.casa.vscode-resource.vscode-webview.net/data/vscode/extensions/kelvin.vscode-sshfs-1.22.0/webview/build/static/js/main.bundle.js”. index.html:116:1