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

[File Watcher (node.js)] Error: ENAMETOOLONG: name too long #221583

Open
jrieken opened this issue Jul 12, 2024 · 6 comments · Fixed by #224535
Open

[File Watcher (node.js)] Error: ENAMETOOLONG: name too long #221583

jrieken opened this issue Jul 12, 2024 · 6 comments · Fixed by #224535
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-watcher File watcher typescript Typescript support issues
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Jul 12, 2024

See this in the console of insiders.. Looks like some ad-hoc chat model is ending up being file watched

ERR [File Watcher (node.js)] Error: ENAMETOOLONG: name too long, stat "/^/vscode-copilot-chat-code-block/4b3e2ea8-fd64-4d09-b875-d9770d5e94d4/response_0/0#{"references":[{"uri":{"$mid":1,"fsPath":"/Users/jrieken/Code/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.ts","external":"file:/Users/jrieken/Code/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.ts","path":"/Users/jrieken/Code/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.ts","scheme":"file"},"range":{"startLineNumber":21,"startColumn":3,"endLineNumber":21,"endColumn":72}},{"uri":{"$mid":1,"fsPath":"/Users/jrieken/Code/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.ts","external":"file:/Users/jrieken/Code/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.ts","path":"/Users/jrieken/Code/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.ts","scheme":"file"},"range":{"startLineNumber":1,"startColumn":1,"endLineNumber":297,"endColumn":1}},{"uri":{"$mid":1,"fsPath":"/Users/jrieken/Code/vscode/src/vs/workbench/api/common/extHostWorkspace.ts","external":"file:/Users/jrieken/Code/vscode/src/vs/workbench/api/common/extHostWorkspace.ts","path":"/Users/jrieken/Code/vscode/src/vs/workbench/api/common/extHostWorkspace.ts","scheme":"file"},"range":{"startLineNumber":238,"startColumn":1,"endLineNumber":250,"endColumn":3}},{"uri":{"$mid":1,"fsPath":"/Users/jrieken/Code/vscode/src/vs/workbench/browser/web.main.ts","external":"file:/Users/jrieken/Code/vscode/src/vs/workbench/browser/web.main.ts","path":"/Users/jrieken/Code/vscode/src/vs/workbench/browser/path/to/inlineChatSessionService"
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Jul 12, 2024
@mjbvz
Copy link
Collaborator

mjbvz commented Jul 12, 2024

Possibly a TypeScript bug as the ^ indicates that the file is in-memory file. We shouldn"t create any file watchers for it

@mjbvz mjbvz added this to the July 2024 milestone Jul 12, 2024
@mjbvz
Copy link
Collaborator

mjbvz commented Jul 12, 2024

Couldn"t repro this in my testing. @jrieken do you remember what you did to cause this?

I can add defensive code here but would prefer to understand the root cause first

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 1, 2024

Not 100% sure but I think this happens when one of the code blocks is a valid module. Adding guards to not watch in-memory resources and also filed an issue against TS

mjbvz added a commit to mjbvz/vscode that referenced this issue Aug 1, 2024
@mjbvz mjbvz closed this as completed in fd5f15a Aug 2, 2024
@vs-code-engineering vs-code-engineering bot added the unreleased Patch has not yet been released in VS Code Insiders label Aug 2, 2024
Copy link

		Issue marked as unreleased but unable to locate closing commit in issue timeline. You can manually reference a commit by commenting `\closedWith someCommitSha`, or directly add the `insiders-released` label if you know this has already been releaased

@vs-code-engineering vs-code-engineering bot added unreleased Patch has not yet been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Aug 2, 2024
BABA983 pushed a commit to BABA983/vscode that referenced this issue Aug 2, 2024
@vs-code-engineering vs-code-engineering bot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Aug 24, 2024
@jrieken jrieken added the verified Verification succeeded label Aug 29, 2024
@jrieken
Copy link
Member Author

jrieken commented Aug 29, 2024

verified in code

@bpasero bpasero reopened this Sep 16, 2024
@bpasero bpasero modified the milestones: August 2024, September 2024 Sep 16, 2024
@bpasero bpasero added typescript Typescript support issues and removed verified Verification succeeded insiders-released Patch has been released in VS Code Insiders labels Sep 16, 2024
@bpasero bpasero added the file-watcher File watcher label Sep 16, 2024
@bpasero
Copy link
Member

bpasero commented Sep 16, 2024

@mjbvz this is still happening, it looks like paths can also end with a ^:

/Users/bpasero/Development/Microsoft/vscode/^

Steps:

  • run out of sources
  • in EventName.createDirectoryWatcher and EventName.createFileWatcher print the paths that get watched
  • open the vscode folder
  • notice a path ending with ^ comes in

I am not sure if its the same path, but I also see /^/review/ts-nul-authority in my selfhost file watcher logs.

@mjbvz mjbvz modified the milestones: September 2024, October 2024 Sep 23, 2024
@mjbvz mjbvz modified the milestones: October 2024, November 2024 Oct 22, 2024
@mjbvz mjbvz modified the milestones: November 2024, January 2025 Dec 2, 2024
@mjbvz mjbvz modified the milestones: January 2025, February 2025 Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug file-watcher File watcher typescript Typescript support issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants