question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Could not set the project description for '<xyz>' because the project description file (.project) is out of sync with the file system" since v0.66.0

See original GitHub issue

Ever since the latest update (0.66.0), I’ve consistently been getting the title error message in exceptions in the extension output panel (Could not set the project description for '<xyz>' because the project description file (.project) is out of sync with the file system.) and is very difficult to solve consistently.

Environment
  • Operating System: Arch Linux
  • JDK version: 14
  • Visual Studio Code version: 1.48.2
  • Java extension version: 0.66.0
Steps To Reproduce

Often happens when invoking the command “clean language server workspace”, sometimes just when restarting VSCode

Cant repro easily and consistently

Issue isn’t isolated to any one repo

Logs
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on
WARNING: Using incubator modules: jdk.incubator.foreign, jdk.incubator.jpackage
[Error - 1:12:44 PM] Sep 3, 2020, 1:12:44 PM Failed to configure project spoon-core
Could not set the project description for 'spoon-core' because the project description file (.project) is out of sync with the file system.
org.eclipse.core.internal.resources.ResourceException(/spoon-core)[274]: java.lang.Exception: Could not set the project description for 'spoon-core' because the project description file (.project) is out of sync with the file system.
	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.Project.setDescription(Project.java:1264)
	at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1298)
	at org.eclipse.buildship.core.internal.workspace.ProjectNatureUpdater.update(ProjectNatureUpdater.java:49)
	at org.eclipse.buildship.core.internal.workspace.BaseConfigurator.configure(BaseConfigurator.java:86)
	at org.eclipse.buildship.core.internal.workspace.BaseConfigurator.configure(BaseConfigurator.java:66)
	at org.eclipse.buildship.core.internal.extension.InternalProjectConfigurator.configure(InternalProjectConfigurator.java:65)
	at org.eclipse.buildship.core.internal.workspace.ProjectConfigurators.configureConfigurators(ProjectConfigurators.java:70)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.synchronizeOpenWorkspaceProject(SynchronizeGradleBuildOperation.java:163)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.synchronizeWorkspaceProject(SynchronizeGradleBuildOperation.java:137)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.synchronizeGradleProjectWithWorkspaceProject(SynchronizeGradleBuildOperation.java:127)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.access$000(SynchronizeGradleBuildOperation.java:42)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation$1.run(SynchronizeGradleBuildOperation.java:85)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2312)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.synchronizeProjectsWithWorkspace(SynchronizeGradleBuildOperation.java:82)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.run(SynchronizeGradleBuildOperation.java:64)
	at org.eclipse.buildship.core.internal.DefaultGradleBuild$SynchronizeOperation.runInToolingApi(DefaultGradleBuild.java:230)
	at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:58)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
	at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:39)
	at org.eclipse.buildship.core.internal.DefaultGradleBuild$SynchronizeOperation.run(DefaultGradleBuild.java:192)
	at org.eclipse.buildship.core.internal.DefaultGradleBuild.synchronize(DefaultGradleBuild.java:100)
	at org.eclipse.buildship.core.internal.DefaultGradleBuild.synchronize(DefaultGradleBuild.java:86)
	at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.startSynchronization(GradleProjectImporter.java:238)
	at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.importDir(GradleProjectImporter.java:127)
	at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.lambda$0(GradleProjectImporter.java:119)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1087)
	at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.importToWorkspace(GradleProjectImporter.java:119)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:114)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:104)
	at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:195)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

[Error - 1:12:44 PM] Sep 3, 2020, 1:12:44 PM Failed to configure project spoon-core
Could not set the project description for 'spoon-core' because the project description file (.project) is out of sync with the file system.
org.eclipse.core.internal.resources.ResourceException(/spoon-core)[274]: java.lang.Exception: Could not set the project description for 'spoon-core' because the project description file (.project) is out of sync with the file system.
	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.Project.setDescription(Project.java:1264)
	at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1298)
	at org.eclipse.buildship.core.internal.workspace.ProjectNatureUpdater.update(ProjectNatureUpdater.java:49)
	at org.eclipse.buildship.core.internal.workspace.BaseConfigurator.configure(BaseConfigurator.java:86)
	at org.eclipse.buildship.core.internal.workspace.BaseConfigurator.configure(BaseConfigurator.java:66)
	at org.eclipse.buildship.core.internal.extension.InternalProjectConfigurator.configure(InternalProjectConfigurator.java:65)
	at org.eclipse.buildship.core.internal.workspace.ProjectConfigurators.configureConfigurators(ProjectConfigurators.java:70)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.synchronizeOpenWorkspaceProject(SynchronizeGradleBuildOperation.java:163)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.synchronizeWorkspaceProject(SynchronizeGradleBuildOperation.java:137)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.synchronizeGradleProjectWithWorkspaceProject(SynchronizeGradleBuildOperation.java:127)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.access$000(SynchronizeGradleBuildOperation.java:42)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation$1.run(SynchronizeGradleBuildOperation.java:85)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2312)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.synchronizeProjectsWithWorkspace(SynchronizeGradleBuildOperation.java:82)
	at org.eclipse.buildship.core.internal.workspace.SynchronizeGradleBuildOperation.run(SynchronizeGradleBuildOperation.java:64)
	at org.eclipse.buildship.core.internal.DefaultGradleBuild$SynchronizeOperation.runInToolingApi(DefaultGradleBuild.java:230)
	at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:58)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
	at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:39)
	at org.eclipse.buildship.core.internal.DefaultGradleBuild$SynchronizeOperation.run(DefaultGradleBuild.java:192)
	at org.eclipse.buildship.core.internal.DefaultGradleBuild.synchronize(DefaultGradleBuild.java:100)
	at org.eclipse.buildship.core.internal.DefaultGradleBuild.synchronize(DefaultGradleBuild.java:86)
	at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.startSynchronization(GradleProjectImporter.java:238)
	at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.importDir(GradleProjectImporter.java:127)
	at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.lambda$0(GradleProjectImporter.java:119)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1087)
	at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.importToWorkspace(GradleProjectImporter.java:119)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:114)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:104)
	at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:195)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Current Result

Language server gives up, no autocomplete, linting etc. Deleting .project files and restarting does not consistently solve the issue, nor does invoking the command to clean the lang server workspace.

Expected Result

Opposite of above

Additional Informations

Issue never occurred in previous version

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:9
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
snjezacommented, Oct 9, 2020

This is a buildship upstream issue. It can be reproduced in Eclipse. Related issue - https://github.com/eclipse/buildship/issues/478 cc @donat @Slay3r Thanks

1reaction
Slay3rcommented, Oct 9, 2020

@snjeza

I think I found the problem by stripping down and preparing a project for you. I don’t know if this is allowed or not.

I disabled all extension except for the “Language Support for Java™” extension

The Problem: I declared in the settings.gradle file my Root Project Name with:

rootProject.name = ‘demo’

But the Project is in a Folder called “demoproject”.

If I have this configuration the problem is occurring when cleaning the language server several times.

If I change the Root Project Name to:

rootProject.name = ‘demoproject’ Everything is working.

So the question is now, is it allowed to declare a different root project name in gradle than the folder name?

Demo Project (check the settings.gradle): demoproject.zip

Thanks for your time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

project is out of sync with the file system Eclipse - Stack Overflow
Could not set the project description for 'web-portal' because the project description file (.project) is out of sync with the file system. I ......
Read more >
Project description file is out of sync with the file system
Hello! I'm trying to execute a few(5) TestSuits in parallel, without using SuitCollection, by starting few suits in console at the same time ......
Read more >
Build Gradle projects with Eclipse Buildship
Project synchronization. Another fundamental feature is the project synchronization. When modifying the build configuration, you can apply the changes by ...
Read more >
Advanced Bash-Scripting Guide
Since you may not wish to wipe out the entire system log, this version ... #!/bin/bash # rpm-check.sh # Queries an rpm file...
Read more >
[Solved] resource is out of sync with the filesystem error in ...
As the name suggests this error occurs when you made changes in the files present in your workspace from outside eclipse. In this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found