theia: Output of short-lived tasks is not shown
When executing a task that ends quickly, like:
{
"version": "2.0.0",
"tasks": [
{
"label": "A task",
"type": "shell",
"command": "echo",
"args": ["foo"]
}
]
}
The task ends quickly, before the terminal widget has time to initialize in the front-end. The results is that the terminal widget fall back on starting the default shell. This appears in the error console:
ERROR Error attaching to terminal id 11, the terminal is most likely gone. Starting up a new terminal instead.
cc @marechal-p who reported this to me
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 22 (21 by maintainers)
Commits related to this issue
- fix #2961: a workaround to show output and title of short-lived tasks. Signed-off-by: Cai Xuye <a1994846931931@gmail.com> — committed to a1994846931931/theia by a1994846931931 4 years ago
- fix #2961: a workaround to show output and title of short-lived tasks. Signed-off-by: Cai Xuye <a1994846931931@gmail.com> — committed to a1994846931931/theia by a1994846931931 4 years ago
- fix #2961: a workaround to show output and title of short-lived tasks. Signed-off-by: Cai Xuye <a1994846931931@gmail.com> — committed to a1994846931931/theia by a1994846931931 4 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to EstherPerelman/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to eclipse-theia/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to dna2fork/theia by EstherPerelman 3 years ago
- Fix #2961: Output of short-lived tasks is not shown Signed-off-by: Esther Perelman <Esther.Perelman@sap.com> — committed to ARMmbed/theia by EstherPerelman 3 years ago
I haven’t worked on Theia for a while, but from a quick glance I don’t thing that would be the right fix. Perhaps it happens to work by chance, because it makes it that some listener for this event is not called. Or, because
this._killedis not set (inhandleOnExit). I don’t really know.But just removing this one call, and leaving the other one (where
signalis set) seems strange.If this is a timing issue (which it likely is), you should be able to artificially add some delay somewhere to make it reproduce reliably.
@a1994846931931 there was some prerequisite work done to improve processes before the issue could be tackled, but it should be possible now. @marechal-p was the original author of the processes improvements, and has also shared his design idea for the issue https://github.com/eclipse-theia/theia/issues/2961#issuecomment-566217381 if you’d like to take a look. I don’t believe he has the bandwidth at the moment to take a look into the problem.
Do you have any updates on this? I just encountered the same issue, which looks critical to me. I wonder if I could help 🤔…
@vince-fugnitto I don’t have a clear picture of what could be done to fix this. Let’s talk about it in detail next Monday (Aug 5) in office. would it work for you ?