Importing maven repository data takes forever

Answered

Hi,

Since couple of days, I am experiencing problems with my Intellij and Gradle on Windows 11. Currently I'm using Intellij Ultimate 2022.1 and when the problem occured I was using Intellij Ultimate 2021.3. I decided to update Intellij, maybe it would fix the problem, but it didn't. Last week it was all working just fine, just over the weekend this problem occured.

It's a kotlin project (not android or spring). It's using the following versions:

  • Gradle: 7.4.2
  • Kotlin: 1.5.31
  • Groovy: 3.0.9
  • JVM: 11.0.14 (Ubuntu 11.0.14+9-Ubuntu-0ubuntu2.20.04)
  • OS: Linux 5.10.16.3-microsoft-standard-WSL2 amd64

Problem: When I'm syncing the project with Gradle, it will take forever to get past "Gradle: Importing maven repository data". Also building the project takes forever.

What did I already do?:

  • I deleted .idea folder and *.iml files of the project
  • I reinstalled Intellij
  • I deleted the cache folder in AppData
  • I deleted Gradle cache in home (WSL)
  • I deleted Gradle wrapper in home (WSL)
  • I invalidated cache and restarted Intellij

Is there something I'm missing to do?

2
6 comments

Seems related to https://youtrack.jetbrains.com/issue/KTIJ-19271/IntelliJ-freezes-on-Gradle-Importing-maven-repository-data-after

Could you reproduce the issue and share the logs (Help | Collect Logs And Diagnostic Data) after that? You can use https://uploads.jetbrains.com/ for sharing. 

0

Upload id: 2022_05_30_5m36qWEUXBFrKcoB (files: threadDump-20220530-145626.txt, threadDump-20220530-142816.txt)

 

0

I tried several other Kotlin plugins like suggested in the threads you shared. Neither of them worked. I downgraded my Intellij to 2021.3.3 for using a stable kotlin plugin, that also didn't work. 

What I also forgot to mention is, I'm running this on my WSL2 (Ubuntu 20 LTS) in Windows 11.

0

Do you have IDE installed on Windows and open project on WSL?

How does it work if you build the project by Gradle from the command line?

The WSL is known for its slowness especially when Windows Antivirus/Firewall is used, see thread discussion and workarounds in https://youtrack.jetbrains.com/issue/IDEA-286059/IDE-freezes-and-hangs-202131-on-indexing-of-WSL-project issue, including this comment.

The attached thread dumps do not show anything useful unfortunately. If problem remains, to understand what is going on we would need to see thread dumps. So could you please take several jstack thread dump of the IDE process and several thread dumps of the Gradle daemon process  when the issue happens. Please also attach complete IDE logs zipped using the Help | Collect Logs And Diagnostic Data action. Thank you.

0

Indeed I have installed IDE on Windows and project is on WSL. I also did the workaround you mentioned, but that didn't work unfortunately.

Upload id: 2022_06_01_7amMqjCsH5pbcpss (file: idea-logs-20220601-1841033448235087589601198.zip)

I uploaded the whole zip file, with all the logs. Maybe that would help. 

0

The thread dumps show that IDE is doing a really long read operations from disk similar to this report. This supports the suggestion about about the issue of the slowness between Windows machine and the WSL host that is most often caused by the Windows WSL misconfiguration. PLease double check the suggestions mentioned above. Note that for each IDE installation the IDE settings/caches and installation directories will be different. So each IDE installation need to be excluded from the scan.

If slowness remains, clarify how does it work if you build the project by Gradle from the command line?

Does it happen with this only project? Please try any other gradle (non-Kotlin) projects.

Attach several jstack thread dumps for the IDE and Gradle daemon processes to investigate them.

0

Please sign in to leave a comment.