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

Project cannot be imported after clean workspace #1631

Open
yuyully opened this issue Nov 14, 2024 · 0 comments
Open

Project cannot be imported after clean workspace #1631

yuyully opened this issue Nov 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@yuyully
Copy link

yuyully commented Nov 14, 2024

Extension Name: vscode-gradle
Extension Version: v3.17.0
OS Version: Windows
VSCode version: 1.95.2

Describe the bug
The project is imported successfully at first time, but it's failed after clean workspace and restart.

This issue doesn't repro with v3.16.4. With v3.16.4, it can be imported after clean workspace.

To Reproduce

  1. Delete AppData/Roaming/Code folder
  2. Open project https://github.com/AppliedEnergistics/Applied-Energistics-2.git > Import successfully (shows java:ready) but there is no log in 'build server for gradle(log)'
  3. Clean workspace and restart > Always import failed

Expected behavior
A clear and concise description of what you expected to happen.

Logs/Screenshots
log.txt
java.util.concurrent.CompletionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Cannot invoke "org.gradle.api.internal.project.ProjectState.applyToMutableState(java.util.function.Consumer)" because "this.rootProjectState" is null
at java.base/java.util.concurrent.CompletableFuture.reportJoin(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.join(Unknown Source)
at com.microsoft.gradle.bs.importer.Utils.getBuildTargetsMappedByProjectPath(Utils.java:55)
at com.microsoft.gradle.bs.importer.GradleBuildServerProjectImporter.importProjects(GradleBuildServerProjectImporter.java:322)
at com.microsoft.gradle.bs.importer.GradleBuildServerProjectImporter.importToWorkspace(GradleBuildServerProjectImporter.java:226)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:164)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:126)
at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:277)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Cannot invoke "org.gradle.api.internal.project.ProjectState.applyToMutableState(java.util.function.Consumer)" because "this.rootProjectState" is null
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
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(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Image

Output from "Gradle for Java"
You can find this by clicking on the "Output" panel, then selecting the "Gradle for Java" channel from the dropdown.

Does the bug still exist if you disable all other extensions?
Yes/No

Additional context
Add any other context about the problem here.

@yuyully yuyully added the bug Something isn't working label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant