Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.100.2
- OS Version: Ubuntu 22.04 (5.15.0-139-fips)
Steps to Reproduce:
- Open vscode
- Open a file in the editor
- Change that file from outside the editor
- Editor contents should change
a. On NFS share it fails with EUNKNOWN error
b. Works fine opening directory on local disk
This was previously reported in #204466 but that reporter was not able to assist with debugging -- I'm not a javascript developer, but I should be able to run things locally.
I feel like this issue started after we switched to a FIPS-enabled kernel so it's likely that some weird security setting is getting in the way. The other reporter was on RHEL8 so they might also be on some strict corporate network.
I notice that the other reporter's error messages have File Watcher (parcel)
but mine only say File Watcher] Unexpected error: Invalid argument (EUNKNOWN) (path: /path/to/workspace)
.
I have ran the following code with the @parcel/watcher
package courtesy of ChatGPT:
const watcher = require('@parcel/watcher');
const path = require('path');
// Directory to watch
const directoryToWatch = '/disk2/dustin/watcher';
// Function to handle file changes
const handleFileChange = (err, events) => {
if (err) {
console.error('Error:', err);
return;
}
// Print out changes
events.forEach(event => {
console.log(`${event.type}: ${event.path}`);
});
};
// Watch the directory
watcher.subscribe(directoryToWatch, handleFileChange).then(subscription => {
console.log(`Watching for changes in ${directoryToWatch}...`);
}).catch(error => {
console.error('Failed to watch directory:', error);
});
It works fine and outputs file modification events whereas the vscode watcher does not. I tried to duplicate the vscode watcher... but I'm not a javascript developer.
If you have things I can try to flush out this issue, I can probably run them -- but I don't have administrative rights or the ability to bring brand new software in without a lengthy process, and it's on a disconnected network that I can only bring data out via typing it.
Note: I'm actually running 1.100.1 but I changed the .2 to make the bot happy. Given this issue has been around for awhile and it's likely related to a local configuration issue, I can't imagine .2 fixed it.