eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

File editor will not open in Che on Codenvy #9360

Closed terrywbrady closed 6 years ago

terrywbrady commented 6 years ago

Description

I am attempting to edit a README.md file in Che (on Codenvy).

When I double click the file it does not open. I have tried a number of things to trick the editor into opening the file without success.

Interestingly, I can cat the file to another file (test.txt) and that opens fine.

If I cat that file back to the original file name, it still does not open.

Do you have any advice on this issue? Where does the Che editor write error logs?

image

Note: I have posted the same question on Stack Overflow

Reproduction Steps

I have seen this behavior at other times within Che, but the error does not seem to consistently apply to the same file. I just wish I knew how to work around this issue.

OS and version:

I am running Codenvy on with the following dev-machine image: https://hub.docker.com/r/dspace/dspace-codenvy-tomcat/

Diagnostics:

ghost commented 6 years ago

A screenshot with a browser dev console may give some clues. Are there any errors when you double click the file? Does it happen to this particular .md or all .md files?

terrywbrady commented 6 years ago

@eivantsov , some messages appear in the dev console when I load the initial page, but no messages appear when I double click the file. This behavior is consistent in both Chrome and Firefox.

Would the editor log error messages anywhere on the dev-machine?

Here is what appears in the log when I refresh the workspace tab in my browser.

image

ghost commented 6 years ago

Does it happen to this particular .md or all .md files? I mean, what's the best way for me to try to reproduce it?

And yes, ws agent logs can be heplful too. There's dev machine tab in consoles panel. It shows ws agent logs when a workspace starts.

You can also exec into a ws container and get logs at /home/user/che/ws-agent/logs

terrywbrady commented 6 years ago

I took a look at those log files, and it appears that my attempts to open the editor return a 200.

image

I do not see any info in the catalina.log file.

I recommend that you open a project and then start creating new files in the project directory. I have seen this issue occur with both .txt and .md files. Create a handful of new files and see if you experience the issue. If that does not work, try touching a few files in the project directory and then try opening them.

This bug has become fairly common for me. In my description above, I described the workspace image that I am using. Could my dev-machine image be at fault?

shawnr commented 6 years ago

This is the same problem I have been encountering with my students, which I reported on the Codenvy repo. I'm happy to provide additional information if I can.

terrywbrady commented 6 years ago

I wonder if the issues that I experienced with my .md files have been due to eol settings. I initially created these files on windows and did not consider my eol configuration.

Here is a repeatable set of steps that will solve the problem.

So, the file properties of the empty file appear to be incompatible with the original file.

I suspect that the issues with my markdown file kept getting reset as the file was refreshed from git. I suspect the issue was due to end of line characters and/or character encodings.

ghost commented 6 years ago

@terrywbrady I have just realized you are talking about Codenvy which is in maintenance mode now.

Can you reproduce this issue using Eclipse Che 6.x version?

terrywbrady commented 6 years ago

@eivantsov , Codenvy is the only version of Che that I run.

ghost commented 6 years ago

@terrywbrady this is repository for Eclipse Che. If you can reproduce this bug with the latest version of Eclipse Che, I can then label it as a bug and assign to a team

terrywbrady commented 6 years ago

I will close the issue. Should I have posted this issue as a codenvy issue?

shawnr commented 6 years ago

I have installed Eclipse Che on a Digital Ocean Droplet and can see that this issue does NOT happen on vanilla Che. I suppose that means that the issue lies with either the version of Che that Codenvy is using or the way it is configured. Regardless, I suppose this means it's better to take care of this in the Codenvy repos. /cc @terrywbrady @eivantsov

terrywbrady commented 6 years ago

I recreated the issue over in the Codenvy repo.