vscode: showQuickPick return 'undefined' immediately without waiting for Promise is resolved.
- VSCode Version: 1.22.1 or 1.22.2
- OS Version: Windows
This issue could repro randomly (may be one tenth), and it usually happen when you just open VS Code.
Code to Reproduce:
Console log: /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:260 [Extension Host] ~~~[2018-04-28T03:13:48.936Z]loadIoTHubItems.start /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:260 [Extension Host] ~~~[2018-04-28T03:13:49.092Z]showQuickPick resolve: /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:260 [Extension Host] ~~~[2018-04-28T03:13:49.092Z]value:undefined /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:260 [Extension Host] ~~~[2018-04-28T03:13:50.683Z]loadIoTHubItems.length:3
Actual:
loadIoTHubItems.length:3 indicates the Promise (iotHubItems) is resolved. However, the showQuickPick return ‘undefined’ immediately before Promise is resolved.
Expect the showQuickPick should wait for Promise to be resolved.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (14 by maintainers)
This was reported as not reproducing reliably, so please run it a few times to verify.