Copilot Blank Chat in IntelliJ? Create the Missing Files to Fix It
Unhandled exception ...
com.github.copilot.platform.utils.VirtualFileNotFoundException: Cannot find virtual file for URL: file:///C:/...
If Copilot Chat is blank in IntelliJ and you see VirtualFileNotFoundException with Cannot find virtual file for URL, Copilot is referencing a deleted file. Recreate the file (even empty), sync/restart, done.
Why it happens
Copilot keeps a reference to a file you deleted or moved. IntelliJ’s VFS can’t resolve it → the chat UI crashes.
The fast fix (what worked for me)
Recreate the exact folder path shown in the error.
Create the missing file (an empty Java class with minimal valid code is fine).
(For example, in my case I created the Java file and added a valid class with minimal content inside it.)
If you don't write a valid class, you will get another error, so make sure to add at least the basic structure inside the file.
Restart IntelliJ (Ctrl+Alt+Y or File → Invalidate Caches / Restart).
(In my case, "Invalidate Caches" was not even needed.)
Copilot Chat works again. Then you can safely delete the temporary file after starting a new chat. Delete all the old chats that might still be referring to the deleted files.
Hopefully, they will fix this bug in the future.
#GitHubCopilot #IntelliJ #IntelliJIDEA #VirtualFileNotFoundException #CopilotChat #CopilotError #IntelliJError #JavaDev #JavaDevelopers #CopilotFix #JetBrains #CopilotPlugin #ProgrammingTips #CodeFix #VirtualFileNotFoundException
Commentaires
Enregistrer un commentaire