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

Terminal is empty on Firefox #13736

Closed
sunix opened this issue Mar 18, 2019 · 17 comments
Closed

Terminal is empty on Firefox #13736

sunix opened this issue Mar 18, 2019 · 17 comments
Assignees
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template. status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it.

Comments

@sunix
Copy link
Contributor

sunix commented Mar 18, 2019

Eclipse Che | cheTheia-in-che - Mozilla Firefox_194

TypeError: n.rules is undefined[Learn More] theia.db35f996195e938bb4b2.js:1:1937593
Content Security Policy: The page’s settings blocked the loading of a resource at data:image/svg+xml;base64,PHN2ZyBmaWxsPS… (“img-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at ws://server6pjgqy1m-ws-che-machine-exec-server-4444.192.168.99.100.nip.io/connect (“default-src”).
Error: Failed to create terminal server proxy. Cause: [Exception... "<no message>"  nsresult: "0x805e0006 (<unknown>)"  location: "JS frame :: https://assets.openshift.net/che/theia_artifacts/vendors.49255968b10295ada657.js :: w :: line 1"  data: no]
@AndrienkoAleksandr
Copy link
Contributor

I did some little investigation of this issue. And I see that Firefox blocs not only terminal. It also blocks some svg images(close icons for example, or icons with file type) and maybe some scripts:

Content Security Policy: The page’s settings blocked the loading of a resource at data:image/svg+xml;base64,PHN2ZyBmaWxsPS… (“img-src”).

TypeError: n.rules is undefined[Learn More] theia.fc4330f36128a73453e5.js:1:1878010
    setRules https://assets.openshift.net/che/theia_artifacts/theia.fc4330f36128a73453e5.js:1
    onLoad https://assets.openshift.net/che/theia_artifacts/theia.fc4330f36128a73453e5.js:1
    o https://assets.openshift.net/che/theia_artifacts/theia.fc4330f36128a73453e5.js:1
    setHTML https://assets.openshift.net/che/theia_artifacts/theia.fc4330f36128a73453e5.js:1

This issue is reproducible on the Theia with CDN artifact. Theia which was build without cdn modification works fine.
So, Firefox detects that Theia tried to get some resources or launch scripts by external web links and Firefox block it by Content-Security-Policy(https://content-security-policy.com/)
As I understood, like workaround we could try to patch Theia index.html and apply meta tag with Content-Security-Policy rules and apply cdn links to this role...
@davidfestal I am not security expert, Could you help with this one issue? Maybe you could provide some good solution?

@davidfestal
Copy link
Contributor

@AndrienkoAleksandr I'll look with our CDN / Akamai account contact if he can add the required headers in the files responses returned by the CDN. And will come back to you as soon as I have an answer.

@davidfestal
Copy link
Contributor

OTOH when, in Firefox, I disable CSP (with security.csp.enable to false), I don't have the CSP errors anymore, but I still have the setRules TypeError.

Additionally, even with CSP enabled (=> having the CSP errors on image resources), I'm able to open a working terminal in the theia-ide container.

That makes me think that there might be several problems at the same time here.

@AndrienkoAleksandr Could you also test again in Firefox with security.csp.enable to false, in order to check if there would be any other underlying bug ?

@AndrienkoAleksandr
Copy link
Contributor

@davidfestal I will take a look with security.csp.enable=false and will write result of testing.

@AndrienkoAleksandr
Copy link
Contributor

@davidfestal I tested terminal with security.csp.enable=false. Terminal works nice.

About this one:

Additionally, even with CSP enabled (=> having the CSP errors on image resources), I'm able to open a working terminal in the theia-ide container.

I don't think so. Terminal creation is broken, but if you refresh page - it begin work... So security.csp.enable=true really breaks terminal.

@davidfestal
Copy link
Contributor

@sunix @AndrienkoAleksandr Could you add in this issue the version of Firefox that produces the errors ?

@davidfestal
Copy link
Contributor

My firefox version is 60.6.2esr

@davidfestal
Copy link
Contributor

@amisevsk could you confirm what is the precise version of your more recent Firefox, with which you don't seem to have any such problem ?

@benoitf benoitf transferred this issue from eclipse-che/che-theia Jul 5, 2019
@benoitf benoitf added area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template. labels Jul 5, 2019
@johnmcollier
Copy link
Contributor

I can reproduce on Firefox 67.0.4. Seems to also affect the CSS on the Che-Theia welcome page:
Screen Shot 2019-07-08 at 5 26 40 PM

@slemeur slemeur changed the title che-theia terminal is empty on Firefox Terminal is empty on Firefox Jul 25, 2019
@slemeur slemeur mentioned this issue Jul 25, 2019
7 tasks
@esubah1989
Copy link

I also got this error in Chrome.

@sunix
Copy link
Contributor Author

sunix commented Aug 14, 2019

still have the issue @davidfestal

Selection_391

Selection_392

@sunix sunix added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Aug 14, 2019
@ibuziuk ibuziuk added status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Aug 23, 2019
@ibuziuk ibuziuk modified the milestones: 7.x, 7.2.0 Aug 23, 2019
@ibuziuk
Copy link
Member

ibuziuk commented Aug 23, 2019

moving to 7.2.0 according to the firefox related epic - #14015

@kameshsampath
Copy link
Contributor

kameshsampath commented Sep 4, 2019

I was able open the terminal in FF 69, but i do see some errors in the developer console. I was able to get onto terminal prompt which I was not able to previous versions of FF.

image

@sunix sunix modified the milestones: 7.2.0, 7.3.0 Sep 18, 2019
@ibuziuk ibuziuk removed this from the 7.3.0 milestone Sep 25, 2019
@sunix
Copy link
Contributor Author

sunix commented Oct 29, 2019

guys,
Looks like i can now open a terminal magically with firefox
Eclipse Che | raffle-k972n - Mozilla Firefox_430

@kameshsampath
Copy link
Contributor

yes it has been @sunix with firefox latest.

@AndrienkoAleksandr
Copy link
Contributor

AndrienkoAleksandr commented Oct 30, 2019

It is working with Che 7.3.0. For Che 7.2.0 and 7.1.0 issue is reproducible for fiirefox 56, 60.4esr, 68.2esr

@AndrienkoAleksandr
Copy link
Contributor

Che 7.3.0 I tested with 56, 60.4esr, 68.2esr(latest esr) and latest firefox 70.0, forks fine, so I close issue. Feel free to reopen if it is reproducible with latest Che.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template. status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it.
Projects
None yet
Development

No branches or pull requests

8 participants