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

Theia with security connection unable to start inside iframe #5046

Closed
AndrienkoAleksandr opened this issue Apr 30, 2019 · 2 comments
Closed
Labels
bug bugs found in the application Team: Che-Editors issues regarding the che-editors team

Comments

@AndrienkoAleksandr
Copy link
Contributor

Description

Theia with security connection(https) unable to start inside iframe.

Reproduction Steps

To simple issue reproduction lets use little https node server. This server serves index.html with Theia iframe. And let's start Theia with https too.

  1. Clone little https server:
    $ git clone [email protected]:AndrienkoAleksandr/node-https-server.git
  2. Generate certificates:
    $ cd node-https-server && openssl req -nodes -new -x509 -keyout server.key -out server.cert
  3. Launch server:
    $ node index.js
  4. Launch theia with https and reuse generated certificates:
    yarn theia start --ssl --cert /path-to-projects/node-https-server/server.cert --certkey /path-to-projects/node-https-server/server.key
  5. Open:
    https://localhost:8888/

Actual result: Theia hangs with loader and dom exception:

  rejected @ frontend-application.ts:15
  Promise.then (async)    
  step @ frontend-application.ts:15
  (anonymous) @ frontend-application.ts:15
  ../../packages/core/lib/browser/frontend-application.js.__awaiter @ frontend-application.ts:15
  ../../packages/core/lib/browser/frontend-application.js.FrontendApplication.start @ frontend-application.ts:117
  start @ index.js:35

Expected result: Theia should be open in the iframe.

P.S. this issue was detected on the che.openshift.io.

OS and Theia version:
browser Version 74.0.3729.108 (Official Build) (64-bit)

@AndrienkoAleksandr
Copy link
Contributor Author

AndrienkoAleksandr commented Apr 30, 2019

Original error: InvalidStateError: getLayoutMap() must be called from a top-level browsing context. We lost original exception, because theia code has some code section without try-catch error handling.

@AndrienkoAleksandr AndrienkoAleksandr added the Team: Che-Editors issues regarding the che-editors team label Apr 30, 2019
@AndrienkoAleksandr
Copy link
Contributor Author

Second variant of the fix #5054

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application Team: Che-Editors issues regarding the che-editors team
Projects
None yet
Development

No branches or pull requests

1 participant