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

rejected promise not handled with latest insiders #100577

Closed
badsyntax opened this issue Jun 19, 2020 · 5 comments
Closed

rejected promise not handled with latest insiders #100577

badsyntax opened this issue Jun 19, 2020 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders tasks Task system issues verified Verification succeeded
Milestone

Comments

@badsyntax
Copy link
Contributor

badsyntax commented Jun 19, 2020

  • VSCode Version: 1.47.0-insiders (Commit: 8cd3fe0 Date: 2020-06-19T05:44:44.062Z)
  • OS Version: macos catalina

Steps to Reproduce:

I cannot reproduce with a simple case. It seems like a race condition again, similar to #98080

I get this error in my CI tests (and local) when running vscode.tasks.executeTask(task):

rejected promise not handled within 1 second: Error: [object Object]

stack trace: Error: [object Object]
	at /home/runner/work/vscode-gradle/vscode-gradle/extension/.vscode-test/vscode-insiders/VSCode-linux-x64/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:889:991
	at processTicksAndRejections (internal/process/task_queues.js:85:5)

Although that error message is not very helpful, I was able to debug extensionHostProcess.js to see the actual error, which is:

code:5
message:'Task to execute is undefined'
severity:1

I believe it's a bug in vscode, as I cannot catch this error. I was not getting this error with the previous insiders version.

Does this issue occur when all extensions are disabled?: Yes

cc @alexr00

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug tasks Task system issues labels Jun 19, 2020
@alexr00 alexr00 added this to the June 2020 milestone Jun 19, 2020
badsyntax added a commit to badsyntax/vscode-executetask-test-example that referenced this issue Jun 19, 2020
@badsyntax
Copy link
Contributor Author

badsyntax commented Jun 19, 2020

Hi @alexr00 After a bit of tinckering I have figured out how to reproduce this bug.

Using the latest insiders:

  1. Clone/download this repo: https://github.com/badsyntax/vscode-executetask-test-example
  2. npm i
  3. npm run compile
  4. code .
  5. Run the Run Extension launch configuration
  6. Note a custom terminal is not created

In your debug console, you should see:

rejected promise not handled within 1 second: Error: [object Object]
extensionHostProcess.js:3842
stack trace:  Error: [object Object]
	at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:3459:39
	at processTicksAndRejections (internal/process/task_queues.js:85:5)

I've added some comments to extension.ts. It looks like the bug occurs when the task has a vscode.CustomExecution and when you retrieve the task via vsode.tasks.fetchTasks to execute it.

@alexr00
Copy link
Member

alexr00 commented Jun 22, 2020

@badsyntax thanks for the repro! I tracked it down to two separate problems, and I've added a test for this.

@badsyntax
Copy link
Contributor Author

Awesome thanks! Will verify with the next insiders build.

@badsyntax
Copy link
Contributor Author

I have verified this fix is working with the latest insiders.

@alexr00
Copy link
Member

alexr00 commented Jun 23, 2020

Thanks for verifying!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders tasks Task system issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@badsyntax @jrieken @alexr00 and others