Skip to content

Could not start the fs_event watcher for path ... : EPERM #1822

Closed
@luiz00martins

Description

@luiz00martins

Description

After starting up nvim-tree with :NvimTreeToggle, and nagivating to a folder which contains a subfolder without access permission, I'll get dozens of error messages such as the one above. Multiple for each failed folder.

Here's a concrete example of the output from :messages when I open nvim-tree in the folder C:\Users\luizh\AppData\Local\:

...
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\msdtadmin : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\Temp\WinSAT : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM
[NvimTree] Could not start the fs_event watcher for path C:\Users\luizh\AppData\Local\ElevatedDiagnostics : EPERM

This is followed by big performance hits over the several minutes/hours of usage:

  • Neovim starts slowly chugging more and more ram, over the course of usage (the nvim process got to 8Gb on my machine).
  • If it fills up the system's memory, the nvim process clogs to a halt.
  • Closing neovim from this state takes some time, possibly because of some cleanup in the background.
  • If it was left in that state for too long, even if you :qa, the powershell will just hang trying to close it for minutes, with no end in sight. Only the task manager solves the issue.

Basically, I suspect there's a memory leak involved somewhere.

Neovim version

NVIM v0.9.0-dev-461+ged23cd3e5
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Operating system and version

Windows 10

nvim-tree version

a2c7556

Minimal config

local use = require('packer').use

use{"wbthomason/packer.nvim"}

use {
	'kyazdani42/nvim-tree.lua',
	config = function()
		require('nvim-tree').setup {}
	end
}

Steps to reproduce

  1. Execute :NvimTreeToggle
  2. Navigate to a folder for which the current nvim process does not have permission

Expected behavior

No response

Actual behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS Windows PowerShellspecific to windows powershellbugSomething isn't workingreproducedIssue confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions