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

Java Project Build Stuck at "Synchronizing Projects" #3049

Closed
rennsax opened this issue Apr 7, 2023 · 7 comments
Closed

Java Project Build Stuck at "Synchronizing Projects" #3049

rennsax opened this issue Apr 7, 2023 · 7 comments

Comments

@rennsax
Copy link

rennsax commented Apr 7, 2023

Environment:

VS Code Version: 1.77.1
Extension Version: 1.16.0
JDK Type & Version: 11, homebrew
OS Type & Version: Mac
Step to Reproduce: reload VS Code window, sometimes.

Expected Behavior: build the project successfully, not taking too much time.

Actual Behavior: I always find myself stuck in the Synchronizing projects step, which takes a long long time.
Here is an example output of Java Build Status:

bedc422b Repository registry initialization [Done]
1b7a7d2b Importing Maven project(s) [Done]
331283e3 Synchronizing projects: 0% [0/1000]
f1113ce7 Synchronizing projects: 0% [0/1000]

This status can hold on for more than 5 minutes sometimes, during which I cannot modify my code since the code checking and suggestions are just wrong.

Generally, after refreshing the window, the problem still exits. But magically, sometimes my VS Code can build the project immediately!

I'm not sure what synchronizing projects is doing actually. But if this step is unnecessary, I think it would be better if I can skip the step optionally by editing my configurations.

Related Issues: Not sure

@snjeza
Copy link
Contributor

snjeza commented Apr 7, 2023

@Eitheages Could you attach a project example reproducing the error?

@testforstephen
Copy link
Collaborator

Recently when I use pre-release version to develop eclipse.jdt.ls in VS Code, I also noticed that reloading window takes longer in "Synchronizing projects" than it did before.

Previously I suspected it's related with maven parallel downloading (#3030 (comment)). However, it seems this issue persists in stable version 1.16.0, which doesn't include parallel downloading feature. There should be some other reasons causing this problem.

@rennsax
Copy link
Author

rennsax commented Apr 10, 2023

@Eitheages Could you attach a project example reproducing the error?

Sorry for that I just cannot reproduce this problem these days. In fact, this problem truly exists for each of my Maven project. Maybe the new release has resolve the bug.

I'll provide more information once the problem occurs again. Thanks very much!

@fbricon
Copy link
Collaborator

fbricon commented Apr 10, 2023

Could it be caused by the STS extension? spring-projects/sts4#1012 (comment)

@testforstephen
Copy link
Collaborator

Have this issue again when working on eclipse.jdt.ls with java 1.17.0 installed, no STS extension installed.

7bfa03ec Importing Maven project(s) [Done]
22bebabd Synchronizing projects: 0%  [1/1000]
dcdccc12 Synchronizing projects: 0%  [0/1000]
65c834d4 Synchronizing projects: 0%  [0/1000]
a1a5f455 Refreshing workspace: 5% Refreshing '/org.eclipse.jdt.ls.filesystem'. [49/1000]
9e59e9e4 Background task: 0%  [0/1000]
2ddac2d9 Synchronizing projects: 0%  [0/1000]

Here is the thread dump.
jstack1.txt

@rgrunber
Copy link
Member

rgrunber commented Jan 23, 2024

Any chance this was similar/same as #3411 #2972 (reported at start of 2023, but finally resolved at end of it) ? Could it be closed ?

@rennsax
Copy link
Author

rennsax commented Jan 24, 2024

Closed since cannot be reproduced.

@rennsax rennsax closed this as completed Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants