How to fix bad file descriptor error in VS Code? "File changes watcher stopped unexpectedly. "

I have vsc version 1.66. I'm getting the following notification:

File changes watcher stopped unexpectedly. A reload of the window may enable the watcher again unless the workspace cannot be watched for file changes.

there's  nrf connect:generate Support Information :

IMPORTANT: The data below could contain sensitive or confidential information about your environment.
If you do not wish this to be seen by others, please make sure to remove it before sharing.

For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/.

{
  "platform": {
    "os": "win32",
    "osVersion": "Windows 10 Pro for Workstations",
    "osKernel": "10.0.22000",
    "vscode": "1.66.0",
    "electron": "17.2.0",
    "node": "v16.13.0"
  },
  "system": {
    "date": "2022-04-01T08:06:47.304Z",
    "vscodeRoot": "c:\\Microsoft VS Code\\resources\\app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:01:48",
    "osUptime": "24:45:07",
    "cpu": {
      "model": "Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz",
      "speed": "2112 MHz",
      "count": 4
    },
    "memory": {
      "total": "15.84 GB",
      "free": "6.84 GB"
    }
  },
  "workspace": {
    "name": "Untitled (Workspace)",
    "workspaceFile": "1648727226399",
    "folders": [
      "d:\\ncs\\myapps\\myfirstapp",
      "d:\\ncs\\myapps\\mysecondapp"
    ]
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2022.3.104",
        "path": "c:\\Users\\AK_firmware\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2022.3.104",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2022.3.31",
        "path": "c:\\Users\\AK_firmware\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2022.3.31",
        "isActive": true
      },
      "nordic-semiconductor.devicetree": null,
      "nordic-semiconductor.kconfig": null
    },
    "external": {
      "marus25.cortex-debug": "1.4.4",
      "ms-vscode.cpptools": "1.9.7",
      "ms-vscode-remote.remote-wsl-recommender": "0.0.15",
      "ms-vscode.js-debug": "1.66.1",
      "ms-vscode.js-debug-companion": "1.0.16",
      "ms-vscode.references-view": "0.0.86",
      "ms-vscode.vscode-js-profile-table": "1.0.0",
      "cschlosser.doxdocgen": "1.4.0",
      "jeff-hykin.better-cpp-syntax": "1.15.13",
      "MS-CEINTL.vscode-language-pack-zh-hans": "1.66.1",
      "ms-vscode-remote.remote-containers": "0.231.1",
      "ms-vscode-remote.remote-ssh": "0.78.0",
      "ms-vscode-remote.remote-ssh-edit": "0.78.0",
      "ms-vscode-remote.remote-wsl": "0.66.0",
      "ms-vscode.cpptools-extension-pack": "1.1.0",
      "ms-vscode.cpptools-themes": "1.0.0",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "twxs.cmake": "0.0.17"
    }
  },
  "tools": {
    "C:\\Program Files\\SEGGER\\JLink\\JLink.exe": "7.58b",
    "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.15.4",
    "nrfutil": "Not found",
    "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\cmake.exe": "3.20.5",
    "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\Scripts\\west.exe": "0.12.0",
    "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\python.exe": "3.8.2",
    "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\ninja.exe": "1.9.0",
    "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\gperf.exe": "3.1",
    "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\dtc.exe": "1.4.7",
    "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\arm-none-eabi-gcc.exe": "9-2019-q4-major",
    "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\gn.exe": "1977",
    "d:\\ncs\\v1.9.1\\toolchain\\mingw64\\bin\\git.exe": "2.26.2.windows.1"
  },
  "sdks": [
    {
      "version": "1.9.1",
      "path": "d:\\ncs\\v1.9.1"
    }
  ],
  "toolchains": [
    {
      "version": "1.9.1",
      "path": "d:\\ncs\\v1.9.1\\toolchain"
    }
  ],
  "connectedDevices": [
    {
      "serialNumber": "960129880"
    }
  ],
  "deviceProviders": [
    "nrfjprog"
  ],
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "${nrf-connect.sdk:1.9.1}",
      "toolchain": {
        "path": "${nrf-connect.toolchain:1.9.1}"
      },
      "ozonePath": "",
      "applications": [
        "${workspaceFolder}",
        "d:\\ncs\\myapps\\mysecondapp"
      ],
      "kconfig": {
        "interface": "kconfig"
      },
      "welcome": {
        "showOnStartup": true
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [],
      "enableTelemetry": true
    },
    "nordic-semiconductor.nrf-terminal": {
      "terminalMode": "character"
    },
    "nordic-semiconductor.devicetree": {
      "modules": [
        "${zephyrBase}",
        "${zephyrBase}/../nrf",
        "."
      ],
      "zephyr": "",
      "ctxFile": "",
      "defaultBoard": ""
    },
    "nordic-semiconductor.kconfig": {
      "root": "",
      "env": {},
      "cfiles": true,
      "disable": false,
      "zephyr": {
        "base": ""
      },
      "python": "",
      "liveValue": true
    },
    "marus25.cortex-debug": {
      "armToolchainPath": null,
      "armToolchainPrefix": "arm-none-eabi",
      "gdbPath": null,
      "objdumpPath": null,
      "JLinkGDBServerPath": null,
      "openocdPath": null,
      "pyocdPath": null,
      "PEGDBServerPath": null,
      "stutilPath": null,
      "stlinkPath": null,
      "stm32cubeprogrammer": null,
      "enableTelemetry": true,
      "flattenAnonymous": false,
      "registerUseNaturalFormat": true,
      "variableUseNaturalFormat": true,
      "dbgServerLogfile": null,
      "showRTOS": false,
      "showDevDebugOutput": "none"
    }
  },
  "environment": {
    "westExe": "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\Scripts\\west.exe",
    "westEnv": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\AK_firmware",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\AK_firmware",
      "Path": "d:\\ncs\\v1.9.1\\toolchain\\mingw64\\bin;d:\\ncs\\v1.9.1\\toolchain\\mingw64\\libexec\\git-core;d:\\ncs\\v1.9.1\\toolchain\\opt\\bin;d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\Scripts;C:\\Python310\\Scripts\\;C:\\Python310\\;C:\\Windows\\System32\\HWAudioDriverLibs;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Users\\AK_firmware\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;D:\\Program Files\\TortoiseSVN\\bin;D:\\Program Files\\cmder;C:\\Program Files\\dotnet\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\CMake\\bin;C:\\Program Files\\Git\\cmd;C:\\Users\\AK_firmware\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\AK_firmware\\.dotnet\\tools;C:\\Microsoft VS Code\\bin",
      "ZEPHYR_BASE": "d:\\ncs\\v1.9.1\\zephyr",
      "GNUARMEMB_TOOLCHAIN_PATH": "d:\\ncs\\v1.9.1\\toolchain\\opt",
      "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
      "PYTHONPATH": "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin;d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\Lib;d:\\ncs\\v1.9.1\\toolchain\\opt\\bin\\Lib\\site-packages",
      "Python3_ROOT": "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin"
    },
    "toolchainPath": "d:\\ncs\\v1.9.1\\toolchain",
    "toolchainBinPath": "d:\\ncs\\v1.9.1\\toolchain\\opt\\bin",
    "toolchainVersion": "1.9.1"
  },
  "terminal": {
    "shell": null,
    "defaultProfile": null
  }
}

there's  Developer log file:

[2022-04-01 16:11:42.676] [renderer1] [warning] Settings pattern "keyboard.*" doesn't match any settings
[2022-04-01 16:11:43.378] [renderer1] [info] Ignoring configured affinity for 'pub.name' because the extension is unknown or cannot execute.
[2022-04-01 16:11:45.042] [renderer1] [info] Ignoring configured affinity for 'pub.name' because the extension is unknown or cannot execute.
[2022-04-01 16:11:46.554] [renderer1] [warning] Settings pattern "keyboard.*" doesn't match any settings
[2022-04-01 16:11:51.302] [renderer1] [error] [Extension Host] (node:15140) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Code --trace-deprecation ...` to show where the warning was created)
[2022-04-01 16:11:53.876] [renderer1] [warning] [File Watcher (parcel)] ignoring a path for watching who's parent is already watched: d:\ncs\v1.9.1\test\cmock\vendor\unity
[2022-04-01 16:11:53.918] [renderer1] [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: d:\ncs\v1.9.1\find-my)
[2022-04-01 16:11:53.919] [renderer1] [error] [File Watcher (universal)] restarting watcher after error: Invalid handle
[2022-04-01 16:11:54.127] [renderer1] [warning] [File Watcher (parcel)] ignoring a path for watching who's parent is already watched: d:\ncs\v1.9.1\test\cmock\vendor\unity
[2022-04-01 16:11:54.128] [renderer1] [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: d:\ncs\v1.9.1\find-my)
[2022-04-01 16:11:54.128] [renderer1] [error] [File Watcher (universal)] restarting watcher after error: Invalid handle
[2022-04-01 16:11:54.319] [renderer1] [warning] [File Watcher (parcel)] ignoring a path for watching who's parent is already watched: d:\ncs\v1.9.1\test\cmock\vendor\unity
[2022-04-01 16:11:54.320] [renderer1] [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: d:\ncs\v1.9.1\find-my)
[2022-04-01 16:11:54.320] [renderer1] [error] [File Watcher (universal)] restarting watcher after error: Invalid handle
[2022-04-01 16:11:54.518] [renderer1] [warning] [File Watcher (parcel)] ignoring a path for watching who's parent is already watched: d:\ncs\v1.9.1\test\cmock\vendor\unity
[2022-04-01 16:11:54.518] [renderer1] [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: d:\ncs\v1.9.1\find-my)
[2022-04-01 16:11:54.519] [renderer1] [error] [File Watcher (universal)] restarting watcher after error: Invalid handle
[2022-04-01 16:11:54.701] [renderer1] [warning] [File Watcher (parcel)] ignoring a path for watching who's parent is already watched: d:\ncs\v1.9.1\test\cmock\vendor\unity
[2022-04-01 16:11:54.702] [renderer1] [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: d:\ncs\v1.9.1\find-my)
[2022-04-01 16:11:54.702] [renderer1] [error] [File Watcher (universal)] restarting watcher after error: Invalid handle
[2022-04-01 16:11:54.883] [renderer1] [warning] [File Watcher (parcel)] ignoring a path for watching who's parent is already watched: d:\ncs\v1.9.1\test\cmock\vendor\unity
[2022-04-01 16:11:54.884] [renderer1] [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: d:\ncs\v1.9.1\find-my)
[2022-04-01 16:11:54.885] [renderer1] [error] [File Watcher (universal)] gave up attempting to restart watcher after error: Invalid handle
[2022-04-01 16:11:54.886] [renderer1] [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: d:\ncs\v1.9.1\homekit)
[2022-04-01 16:11:54.886] [renderer1] [error] [File Watcher (universal)] gave up attempting to restart watcher after error: Invalid handle
[2022-04-01 16:11:54.887] [renderer1] [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: d:\ncs\v1.9.1\modules\lib\fff)
[2022-04-01 16:11:54.888] [renderer1] [error] [File Watcher (universal)] gave up attempting to restart watcher after error: Invalid handle
[2022-04-01 16:11:54.888] [renderer1] [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: d:\ncs\v1.9.1\nrf-802154)
[2022-04-01 16:11:54.889] [renderer1] [error] [File Watcher (universal)] gave up attempting to restart watcher after error: Invalid handle

Any help troubleshooting this is greatly appreciated!

Parents Reply
  • Hi,

    The developers are unable to reproduce the popup message, only the console messages. They believe it might be a bug or an environment issue that this manifest in a popup warning. However, it does not seem like this issue should interfere with the current functionality. The developers will try to eliminate the non-functional watchers that are created for the not-cloned repositories, but until this is released you can just ignore the message.

    Best regards.

    Marte

Children
Related