Vscode: TS/JS: rejected promise not handled within 1 second

Created on 3 Dec 2016  路  8Comments  路  Source: microsoft/vscode

  • VSCode Version: latest insiders
  • OS Version: macOS

Steps to Reproduce:

  1. open any TS or JS file

=>

image

/cc fyi @dbaeumer (might be TS lint or JS lint update related?) though I also see this when running out of sources without extensions and I only see it since maybe a couple of days.

bug javascript typescript verified

Most helpful comment

And then a very complex search revealed this: Promise.reject<void>(null)

All 8 comments

I have also seen this message, it caused my pull request build to fail I think:

https://travis-ci.org/Microsoft/vscode/jobs/181022070#L2924

I just spent 30 minutes thinking this was me, and I still don't know where it comes from. 馃槧 I kept refreshing the workbench, while a JS file was open and saw it always.

We need two fixes here:

  • Fix the rejected promise problem
  • Improve this specific error reporting to be able to catch the culprit...

This message means that a promise got rejected and no-one has attached a reject-handler to it.

Yeah but where does it come from? Could we somehow do a better job figuring that out?

Yesterday I spent quite some time trying to figure out if my new git code was the culprit. Having found this out, I figured it wasn't. @bpasero suspects it is somewhere in TypeScript code. Yet, no one knows for sure, it is speculation.

Rephrasing my previous question: can we, as Code, provide a better message to indicate where that promise came from?

No, you cannot and that is in the nature of a promise/async code. In contrast to throwing an error a promise can be rejected anytime without a meaningful stack trace. Worst, that in this case the promise is rejected without a reason

And then a very complex search revealed this: Promise.reject<void>(null)

Was this page helpful?
0 / 5 - 0 ratings