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

Unhandled promise rejections when changing branch with missing files #39

Open
kevinbeal opened this issue May 9, 2017 · 11 comments
Open

Comments

@kevinbeal
Copy link

This doesn't appear to be breaking any functionality, the "OUTPUT" log pops up with messages like this:

[Error - 10:32:01 AM] (node:32486) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[Error - 10:32:01 AM] (node:32486) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: ENOENT: no such file or directory, stat '/Users/kevin/engine/vars.less'

The file at /Users/kevin/engine/vars.less is on the branch I'm moving away from and not in the branch I'm moving to.

I'm on 1.12.1 of VSCode and 0.6.2 of vscode-less (if that matters).

I'm not really sure what upgrading to a new Node.js will do to the extension or the editor, but it sounds bad.

@mrmlnc mrmlnc self-assigned this May 9, 2017
@jkondela
Copy link

I'm getting similar error as above in the Output tab.
But my problem is not with switching branch or something with missing file, it's in general when I start vscode with less files in project.
And the last thing it breaks funkcionality, not sure if all, but some as variable/mixins completion, go to definition don't work anymore.

I'm not sure, but i have opinion the last update of vscode (April update) broke this plugin.

OUTPUT:
[Error - 8:03:44] (node:11068) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property '1' of null [Error - 8:03:44] (node:11068) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [Error - 8:03:44] (node:11068) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property '1' of null [Error - 8:04:13] (node:11068) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1) [Error - 8:04:13] (node:11068) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)

Less IntelliSense v0.6.2
VSCode v1.12.1

@mrmlnc
Copy link
Owner

mrmlnc commented May 11, 2017

Thanks for Issue. I'll work on this very soon.

@mrmlnc
Copy link
Owner

mrmlnc commented May 12, 2017

@kevinbeal, @jkondela, Please, try to use this version of plugin. I'm fix some problems and add debug parameters for catch errors. just try your cases and report the error to this issue.

https://github.com/mrmlnc/vscode-less/releases/tag/0.6.3 (*.vsix file)

How to install this version:

  • Remove previous version of this plugin.
  • Click on the plugins menu (three dots) and click on the "Install from VSIX" label.
  • Select .vsix file from link above and click "ok"
  • Follow the instructions of the editor.

This is not final fix for @kevinbeal issue. I'm just trying to get more information, before start work on this issue.

@jkondela
Copy link

jkondela commented May 12, 2017

@mrmlnc After reinstall from .vsix I'm getting the same error + some debug, but nothing more.
See below:

[Error - 9:35:21] (node:6716) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property '1' of null [Error - 9:35:21] (node:6716) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [Error - 9:35:21] (node:6716) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property '1' of null [Error - 9:35:46] (node:6716) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1) [Error - 9:35:46] (node:6716) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2) [Error - 9:35:46] [object Object]

New log: [Error - 9:35:46] [object Object]

Update:
Errors are generated when I started vscode and also when switching git branchs

@kevinbeal
Copy link
Author

@mrmlnc After installing the .vsix file, I am no longer getting the output console popping up with promise rejection errors as before.

It worked for me :) 👍

@kevinbeal
Copy link
Author

I spoke too soon. I'm also getting the [Error - 9:36:37 AM] [object Object] message.

I'm not sure exactly when it happened, but I had a .less file open. I think having a .less file open was necessary to reproduce the error..?

@mrmlnc
Copy link
Owner

mrmlnc commented May 13, 2017

Hello,

I'm will be work on this issue today. You can provide more detailed steps to reproduce your issue?

As I understand your steps:

  1. Create two files in the master branch: a.less and b.less and them commit their.
  2. Create switcher branch.
  3. Commit c.less to master branch
  4. Open c.less in the editor
  5. Switch to switcher branch

Also I think that the b.less file has @import for c.less? May be you can provide simple repository to reproduce?

@jkondela
Copy link

I have tried this on my personal computer with clean install vscode-less a it is working properly. Also when I have switched branches. That's so weird.

@mrmlnc
Copy link
Owner

mrmlnc commented May 14, 2017

Please, try to use 0.6.3 from the Marketplace.

@jkondela
Copy link

jkondela commented May 16, 2017

Ok, I tried to use new version from market and now I'm getting in OUTPUT tab 2 more lines
[vscode-less]: TypeError [vscode-less]: TypeError: Cannot read property '1' of null

And in developer console is this error. I hope it helps.

Language client is not ready yet: Error: Language client is not ready yet at LanguageClient.sendRequest (C:\Users\jaro\.vscode\extensions\mrmlnc.vscode-less-0.6.3\node_modules\vscode-languageclient\lib\main.js:585:19) at disposable.(anonymous function).vscode.window.onDidChangeActiveTextEditor (C:\Users\jaro\.vscode\extensions\mrmlnc.vscode-less-0.6.3\out\client.js:44:16) at e.invoke (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:4:30934) at e.fire (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:4:34741) at c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:4:346486 at e.invoke (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:4:30934) at e.fire (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:4:34741) at t.$acceptDocumentsAndEditorsDelta (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:4:300898) at t.e.handle (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:4:266428) at s (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:4:154931) e.onUnexpectedError @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:29

@mrmlnc
Copy link
Owner

mrmlnc commented May 16, 2017

Well, most likely now error related to one of providers (completion and etc.) or parser. You can provide GIF for your case or/and your file (for reproduce error)?

Also you can set less.showErrors to False to skip errors.

P.S.: In 1.0.0 version I'll add telemetry for this cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants