menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team

Using vscode:extension/MS-SarifVSCode.sarif-viewer in local docker fails

January 15, 2020 at 1:31pm

Using vscode:extension/MS-SarifVSCode.sarif-viewer in local docker fails

January 15, 2020 at 1:31pm
Hi I want to test vscode:extension/MS-SarifVSCode.sarif-viewer in a local docker instance of Theia. It's working on gitpod and VSCode but for Theia it says "server adress could not be found" for a webview. Might this be related to me not accessing theia over https?
Show previous messages

January 16, 2020 at 11:18am
Also replacing with THEIA_WEBVIEW_EXTERNAL_ENDPOINT=localhost is not necessary, if you can access the page from localhost. Theia will be able to figure it from the default pattern, i.e. the default pattern is {{uuid}}.webview.{{hostname}}, since Theia is served from localhost, at runtime it will be computed to someid.webview.localhost.
like-fill
1
replacing THEIA_WEBVIEW_EXTERNAL_ENDPOINT with localhost can also cause security issues
And this is what my browser is telling me about the response:

January 17, 2020 at 2:00am
request URL looks bogus, hostname is %7b%7Blocalhost%7B%7B, please remove {{ and }}, they are for placeholders
request URL looks bogus, hostname is %7b%7Blocalhost%7B%7B, please remove {{ and }}, they are for placeholders

January 17, 2020 at 9:03am
I see! So I changed the endpoint to THEIA_WEBVIEW_EXTERNAL_ENDPOINT=localhost and I get "Not Found The requested URL was not found on this server." in the extension view. I started Theia with "--hostname=0.0.0.0". I guess the url cannot be found since now the webview and Theia are running on different hosts? (localhost vs 0.0.0.0)
So I guess to get this working, I need to get Theia running on localhost, right? Any ideas why localhost:3000 is not working at all?
And thanks a lot for your help!
Failed to enable webview caching: ReferenceError: caches is not defined
it would mean that you don't run in secure context, i.e. not on localhost or https
there one can access it on localhost
If I set both Theia and webview endpoint to 0.0.0.0 I get the following view:
It's communicating to 0.0.0.0:80 might the port be the problem here?
If I set the webview endpoint to {{hostname}} I get an empty view and the following resposone:
Port and ip are the same as for Theia here...
Still I do not get why I cannot run theia on 127.0.0.1

January 20, 2020 at 1:42am
Surprise that it all tries to download anything on http, web caches and service workers should not work on http without localhost
Show more messages