microsoft / microsoft/copilot-for-eclipse

Random "resource does not exist" errors on managing watches to derived files

Open
#78 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
126
Forks
60
Avg merge
2d 6h
Merged PRs (30d)
5

Description

Feedback source

None

GitHub Copilot plugin version

0.14.0.202601210225_nightly

Eclipse IDE and version

4.38

Platform

If a workspace is started and some projects start full build, there is a chance that the content of output folders is deleted in parallel to the Copilot query trying to get watched files.

The error itself is written to the log, however it should be ignored by Copilot as changes on file system are "expected" and can happen at any time.

Note, the main issue here is that Copilot tries to get file information on a file from build output directory, which should be marked as derived, so Copilot shouldn't add any watches to that directory or file in first place.

Steps to reproduce
  • Have some Java projects that contain .gitignore files in source folders.
  • These files are automatically copied by JDT to build output directories.
  • Enable "Scrub output folders..." project build property which would automatically clean the output folder on build
Image * Enable "Workspace context" in Copilot * Run a build on startup or just delete the output folders before startup.
Logs (optional)

Rot cause:

eclipse.buildId=4.38.3.v20260121-1246
java.version=25
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

org.eclipse.core.resources
Error
Mon Jan 26 07:47:40 CET 2026
Resource '/someProject/bin/workspace/exec_query_test2/.gitignore' does not exist.

java.lang.Exception: Resource '/someProject/bin/workspace/exec_query_test2/.gitignore' does not exist.
	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
	at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:376)
	at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:248)
	at org.eclipse.core.internal.resources.File.getContents(File.java:359)
	at org.eclipse.core.internal.resources.File.getContents(File.java:351)
	at com.microsoft.copilot.eclipse.core.lsp.WatchedFileManager.loadGitignoreNodeMap(WatchedFileManager.java:249)
	at com.microsoft.copilot.eclipse.core.lsp.WatchedFileManager.scanWorkspace(WatchedFileManager.java:148)
	at com.microsoft.copilot.eclipse.core.lsp.WatchedFileManager.getWatchedFilesWithProgress(WatchedFileManager.java:92)
	at com.microsoft.copilot.eclipse.core.lsp.CopilotLanguageClient.getWatchedFiles(CopilotLanguageClient.java:219)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:128)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:271)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:201)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$3(LanguageServerWrapper.java:449)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:185)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:97)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:114)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
	at java.base/java.lang.Thread.run(Thread.java:1474)

High level problem

eclipse.buildId=4.38.3.v20260121-1246
java.version=25
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

com.microsoft.copilot.eclipse
Error
Mon Jan 26 07:47:40 CET 2026
[Error] Error when parse git ignore file:

org.eclipse.core.internal.resources.ResourceException(/someProject/bin/workspace/exec_query_test2/.gitignore)[368]: java.lang.Exception: Resource '/someProject/bin/workspace/exec_query_test2/.gitignore' does not exist.
	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
	at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:376)
	at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:248)
	at org.eclipse.core.internal.resources.File.getContents(File.java:359)
	at org.eclipse.core.internal.resources.File.getContents(File.java:351)
	at com.microsoft.copilot.eclipse.core.lsp.WatchedFileManager.loadGitignoreNodeMap(WatchedFileManager.java:249)
	at com.microsoft.copilot.eclipse.core.lsp.WatchedFileManager.scanWorkspace(WatchedFileManager.java:148)
	at com.microsoft.copilot.eclipse.core.lsp.WatchedFileManager.getWatchedFilesWithProgress(WatchedFileManager.java:92)
	at com.microsoft.copilot.eclipse.core.lsp.CopilotLanguageClient.getWatchedFiles(CopilotLanguageClient.java:219)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:128)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:271)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:201)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$3(LanguageServerWrapper.java:449)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:185)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:97)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:114)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
	at java.base/java.lang.Thread.run(Thread.java:1474)
Expected behavior

No errors, Copilot doesn't watch output folders content.

Actual behavior

Random errors on startup.

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in com.microsoft.copilot.eclipse.core.lsp.WatchedFileManager, especially scanWorkspace and loadGitignoreNodeMap, using the reported startup/build scenario to trace how derived output files enter the watch scan. Done means derived output folders are not watched and startup produces no errors when those files are deleted during a build.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.