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

Exception on file watcher creation in VS Code with Node 14 #1392

Closed
qzmfranklin opened this issue Jun 3, 2021 · 11 comments
Closed

Exception on file watcher creation in VS Code with Node 14 #1392

qzmfranklin opened this issue Jun 3, 2021 · 11 comments

Comments

@qzmfranklin
Copy link

Same as this:

microsoft/vscode-python#16380

@github-actions github-actions bot added the triage label Jun 3, 2021
@jakebailey jakebailey changed the title NodeJs 14 breaks Pylance Exception on file watcher creation in VS Code with Node 14 Jun 3, 2021
@jakebailey
Copy link
Member

Copying the logs:

[Info  - 10:51:53 PM] Pylance language server 2021.6.0 (pyright 209c8040) starting
[Info  - 10:51:53 PM] Server root directory: /home/quzhongming/.vscode-server/extensions/ms-python.vscode-pylance-2021.6.0/dist
[Error - 10:51:54 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Error - 10:51:54 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Error - 10:51:54 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Error - 10:51:54 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Error - 10:51:54 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Error - 10:51:54 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js

This file watcher is broken anyway (#923), so this doesn't actually break things at the moment. The most recent version of Pylance is just better about reporting why the watcher failed to be registered.

@qzmfranklin
Copy link
Author

What can I do to solve / workaround this error?

Just verified that the node --version isv14.16.0.

If I manually downgrade it to node12, it worked fine.

@fukaf
Copy link

fukaf commented Jun 4, 2021

So this error won't cause Pylance launching failure? Then why my Pylance just doesn't work.

@jakebailey
Copy link
Member

jakebailey commented Jun 4, 2021

This definitely should not cause Pylance to not work. If it's not working, these messages are unrelated and a new issue with the template filled out would be appreciated.

@jakebailey jakebailey added fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed needs investigation Could be an issue - needs investigation labels Jun 9, 2021
@jakebailey
Copy link
Member

The next release changes this message to a warning; this will at least mean it's not shown in the default log level so people think something's gone wrong.

File watching outside the workspace is more generally covered in #923 and has yet to be fixed.

@jakebailey
Copy link
Member

This issue has been fixed in version 2021.6.1, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202161-9-june-2021

@Ezra
Copy link

Ezra commented Aug 7, 2021

I'm seeing this behavior on v2021.8.0.

[Info  - 11:16:30 AM] Pylance language server 2021.8.0 (pyright dfb796d8) starting
[Info  - 11:16:30 AM] Server root directory: /home/ezra_bradford/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.0/dist
Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js

VS Code 1.59.0
Windows 10 Home 20H2; WSL-remote-connected to Debian GNU/Linux 11 (bullseye)
Python extension v2021.8.1105858891
Pylance extension v2021.8.0

@jakebailey
Copy link
Member

Reopening; a recent refactor to this code has changed how we log it so that it's present again.

Again, I will assert that this does not affect anything negatively; we know that these specific watchers fail, but they do not actually cause any problems for the analysis except that #923 is not yet fixed.

@jakebailey jakebailey reopened this Aug 9, 2021
@jakebailey jakebailey added needs investigation Could be an issue - needs investigation and removed fixed in next version (main) A fix has been implemented and will appear in an upcoming version labels Aug 9, 2021
@jakebailey jakebailey added fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed needs investigation Could be an issue - needs investigation labels Aug 10, 2021
@jakebailey
Copy link
Member

I've re-fixed this for the next release.

@heejaechang heejaechang removed the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Aug 11, 2021
@heejaechang
Copy link
Contributor

fixed in 2021.8.1 release.

@CarlosDomingues
Copy link

I'm seeing those errors in my logs when using VS Code 1.63.2 + Pylance 2022.1.1 (pyright 4f61d443)

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

No branches or pull requests

7 participants