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

TerminalWidget prints Error for quickly finished Tasks #9350

Open
tsmaeder opened this issue Apr 14, 2021 · 1 comment
Open

TerminalWidget prints Error for quickly finished Tasks #9350

tsmaeder opened this issue Apr 14, 2021 · 1 comment
Labels
bug bugs found in the application tasks issues related to the task system

Comments

@tsmaeder
Copy link
Contributor

Bug Description:

When creating a shell task with a command that is finished very quickly (I did dir on Windows), the TerminalWidget prints an error message to the log:

root ERROR Request getCwdURI failed with error: terminal "4" does not exist Error: terminal "4" does not exist
    at ShellTerminalServer.<anonymous> (C:\Users\thomas\code\chedev\theia\packages\terminal\lib\node\base-terminal-server.js:158:27)
    at step (C:\Users\thomas\code\chedev\theia\packages\terminal\lib\node\base-terminal-server.js:60:23)
    at Object.next (C:\Users\thomas\code\chedev\theia\packages\terminal\lib\node\base-terminal-server.js:41:53)
    at C:\Users\thomas\code\chedev\theia\packages\terminal\lib\node\base-terminal-server.js:35:71
    at new Promise (<anonymous>)
    at __awaiter (C:\Users\thomas\code\chedev\theia\packages\terminal\lib\node\base-terminal-server.js:31:12)
    at ShellTerminalServer.BaseTerminalServer.getCwdURI (C:\Users\thomas\code\chedev\theia\packages\terminal\lib\node\base-terminal-server.js:153:16)
    at JsonRpcProxyFactory.<anonymous> (C:\Users\thomas\code\chedev\theia\packages\core\lib\common\messaging\proxy-factory.js:213:73)
    at step (C:\Users\thomas\code\chedev\theia\packages\core\lib\common\messaging\proxy-factory.js:48:23)
    at Object.next (C:\Users\thomas\code\chedev\theia\packages\core\lib\common\messaging\proxy-factory.js:29:53)

Debugging through the scenario, I found that there is no real problem happening: it's just the process gets unregistered from the ProcessManager when it ends and the above request happens afterwards. The exception does not seem to have any negative effects on system behavior. I can see the stdout output from the process correctly.

Steps to Reproduce:

  1. Add a 'shell' task to tasks.json just doing dir
  2. Execute it
  3. Observe the exception in the back end log

Additional Information

  • Operating System: Windows.
  • Theia Version:
@RomanNikitenko
Copy link
Contributor

There is an issue #2961
Maybe they both have the same cause.

@colin-grant-work colin-grant-work added tasks issues related to the task system bug bugs found in the application labels Apr 14, 2021
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 tasks issues related to the task system
Projects
None yet
Development

No branches or pull requests

3 participants