-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Creating a terminal in a basic (Hello World) Theia app hangs the app #12733
Comments
It seems to work fine both when I generate a new |
12734 is a separate issue that I opened; I very much doubt they are related (other than they might both be Windows-only issues) Let me try on Linux. This could be a Windows-only issue. |
Yeah. Works fine for me on Linux. We'll need someone else to try on Windows and see if it's a "me" issue or a general one. |
@jcortell68 |
@vladarama Thanks. That got me thinking. I tried to reproduce the issue, but this time closed the workspace in the Theia app. Sure enough, it works now. I tried opening a different workspace. Still works. So I'm guessing there was something funky in the workspace that Theia was opening earlier. Unfortunately, I don't remember what directory that was. But needless to say, we can close this ticket. Thanks guys! |
@vince-fugnitto BTW, I retried 12734 and that one is still reproducible. So confirmed that issue and this one are unrelated. |
Uh oh. The plot thickens. The hang suddenly and unexpectedly started happening for me, and without being able to workaround it by closing the workspace. After a lot of head-scratching, I realized what was going on. The problem reproduced for me only when I launch the app via the VS Code's launch configuration ( If I launch the app at the terminal using @vladarama Can you try using the launch configuration? Curious to see if you reproduce the issue that way. |
Thanks for confirming! I'll adjust the ticket title and description and reopen it |
@vladarama Quick side question: what tool do you use to create your GIF screen recordings? |
@jcortell68 |
@jcortell68 I believe the issue is pretty specific to the theia-extension-generator (might even be fixed by eclipse-theia/generator-theia-extension#173). Also note that the |
@vince-fugnitto Yeah. I just realized the issues with the setup a little while ago. I tried building from a fresh git clone and ran into them. I'm sorting that out now. But I don't think the issue is fixed by the pull request you mention, as I have that change in other branches in my repo and I think I can reproduce the problem there. Anyway, let me clean this all up and I'll post and update here shortly |
OK. I've pushed a new commit which resolves all the setup issues. I also added a missing step in the description that only made itself obvious in a clean environment (I added I git clone'd to a new location and tested the reproducibility steps. Everything went smooth, and the problem still reproduces. I can also confirm it reproduces only on Windows. |
I have a very different environment, but the exact same Problem. If i restart the backend and open with a browser that "remembers" the open terminal tab i see a warning in the Logs: Not sure if realated or complete different Problem. |
@Gerd-Augsburg That second scenario also happens for me in the Electron case. I.e., if when I launch the app, it already has a terminal open, then the app hangs right away. I suspect we are running into the same underlying problem. |
An update: |
So I debugged into this on Windows and I believe we are a victim of this bug: microsoft/node-pty#532. If I manually pause before line
during debugging then everything works. It seems that there is something not ready yet to connect but I couldn't find any stack trace or error. I tried several versions to see if the problem might be resolved in any of them:
Unfortunately, for me they all have the same issue so I think we may need to wait for this bug to be fixed on the node-pty side or we could try to artifically introduce some delay somehow. |
Nice sleuthing. It's unfortunate that node-pty ticket was opened 18 months ago and has had no meaningful activity. I guess waiting it out is reasonable given that it's a bit of a specialized scenario (hang happens on Windows only, only if launched via VS Code launch config, only when opening a terminal). I guess if we see more people pile on to this ticket, we can consider an ugly sleep hack. Thanks for investigating this! |
Bug Description:
A basic Theia app hangs when you try to create a terminal on Windows...but only if you launch the app via the VS Code launch configuration.
Start Electron Backend
. Don't start a debug session; useRun Without Debugging
Terminal > New Terminal
Note that a terminal seems to appear (without a prompt) but the Theia app/UI is completely hung at that point.
Interestingly, the problem does not happen if you launch the app from the terminal using
yarn start:electron
Additional Information
The text was updated successfully, but these errors were encountered: