Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[che-theia] - open http preview in separate browser tab #18002

Closed
sparkoo opened this issue Sep 30, 2020 · 7 comments
Closed

[che-theia] - open http preview in separate browser tab #18002

sparkoo opened this issue Sep 30, 2020 · 7 comments
Assignees
Labels
area/plugins kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@sparkoo
Copy link
Member

sparkoo commented Sep 30, 2020

Is your enhancement related to a problem? Please describe.

This issue #17840 will introduce option to expose user applications on subdomains in single-host mode. As we typically don't have certificate for such subdomains, so we're exposing those ports on HTTP only. As a result of that, che-theia can't show the preview, because HTTP content can't be loaded from HTTPS page.

20200930_190031_1920x2160_scrot

Bonus task/question (is this for separate issue?):
In case of endpoint with attribute protocol: 'https', it's exposed on HTTPS, but without valid certificate (we don't have one for subdomains in single-host). In that case, the "Potential security issue" browser page is shown. However, you can't "accept the risk" from the preview directly (I guess some browser security feature). You have to again open the URL in separate tab, then you can click the "accept the risk" button, and only then you can load the page in che-theia preview again. Can we do anything here to improve the user experience?
20200930_184744_1920x2160_scrot

Describe the solution you'd like

Che-theia should open HTTP URLs in new browser tab, instead of in-editor preview. In theory, when che-theia is on HTTP as well, it will work, but I guess we don't support that anymore.

Describe alternatives you've considered

n/a

Additional context

#17840

@sparkoo sparkoo added kind/enhancement A feature request - must adhere to the feature request template. area/editor/theia Issues related to the che-theia IDE of Che area/editors labels Sep 30, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Sep 30, 2020
@azatsarynnyy
Copy link
Member

In theory, when che-theia is on HTTP as well, it will work, but I guess we don't support that anymore

I'm not sure if we still support HTTP, but anyway it's not recommended as Che Theia WebView Plugin API works in secure contexts only, eclipse-theia/theia#6465 (comment).

@azatsarynnyy
Copy link
Member

I see the following ways how Preview URL UX can be improved for single-host mode ⬇️

The Preview URL feature is configurable in Che Theia through user preferences:
image

A user can choose in which mode an application's preview URL should be opened, by default (embedded/detached).
For a new Workspace, it asks a user to choose a preferred mode once a corresponding Task is running.

There's the detailed description of all the possible modes:
https://github.com/eclipse/che-theia/tree/master/plugins/task-plugin#theia---che-task-plug-in

But this preference is respected by Task Plugin only. So that it works for the user applications that were run with Tasks only.
For the applications whose ports are autodetected by Ports Plugin, the only variant ATM is to preview its URLs in an embedded mini-browser widget.

There are two areas where it can be improved for single-host mode:

  1. Make Ports Plugin respect Preview URL mode user's preference. So, for the autodetected apps (ports), the preview URL mode can be configured as well.
  2. Detect we're running in a single-host mode and set a preview URL mode as alwaysGoTo, by the default.

@azatsarynnyy azatsarynnyy added area/plugins and removed area/editor/theia Issues related to the che-theia IDE of Che area/editors labels Oct 1, 2020
@azatsarynnyy
Copy link
Member

I'm moving the issue to area/plugins as it depends on Task and Ports Plugins.

@azatsarynnyy azatsarynnyy removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Oct 1, 2020
@azatsarynnyy
Copy link
Member

ATM, there's a way to work it around by opening a preview URL in a separate browser's tab manually.
However, for non-experienced users, it might be not obvious how to do it. So, setting P1. Feel free to reprioritize it.

@azatsarynnyy azatsarynnyy added the severity/P1 Has a major impact to usage or development of the system. label Oct 1, 2020
@ericwill ericwill mentioned this issue Feb 18, 2021
35 tasks
@ericwill ericwill added this to the 7.27 milestone Feb 18, 2021
@vitaliy-guliy
Copy link
Contributor

Is this issue relevant?
Today I have installed CRC and deployed Che in single host mode.
Played a lot with go and node workspaces which are on Get Started pahe.
I haven't found any sample, which starts HTTP! server.
Every preview works on HTTPS.
Could it be such, that HTTP is exposed as HTTPS?

@vitaliy-guliy
Copy link
Contributor

vitaliy-guliy commented Mar 1, 2021

Even when I installed http-server by hands, it works over HTTPS
Screenshot from 2021-03-01 18-36-15

@sparkoo could you check the issue again?

@vitaliy-guliy
Copy link
Contributor

I'm closing it as non relevant. Feel free to open it if the problem is still present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

5 participants