VSCode Spring Initializr Error : Failed to fetch metadata

Viewed 3025

When I try to create a new project on Spring Initializr on VSCode, it produces the error on right bottom screen

Fail to create a project. Error: Failed to fetch metadata

Fail screenshot

  • I have checked Developer : Toggle Developer Tools and checked the error, it's not common JSON tag (html error return) problem.
  • I have checked the access to https://start.spring.io/ on my browser : no problem.
  • I have checked the internet access via proxy : There's no proxy.
  • I have completely removed VSCode (including extensions) and re-installed, still the same problem.

Windows 10, using gradle 6.9, java 11.0.12, vscode 1.59.0

3 Answers

Ok I've resolved the problem. In case anyone comes up with the same issue, here it is :

  1. open Spring Initializr Java Support extension from VSCode extensions.
  2. click settings icon, then choose Extension Settings.
  3. scroll down, and click "Edit in settings.json" In my case spring.initializr.serviceUrl was empty. It should be :

"spring.initializr.serviceUrl": "https://start.spring.io/"

Sometimes the issue can be resolved by simply restarting the vs code editor. Because extensions will get reflected only after restarting the editor

I received the same error message after having installed the extension pack and starting up a new maven project. Yet, for me the solution of @sayginify did not work.

In my case lowering the version to 0.4.8 did help. I was on 0.8.0. Also the versions in between did not work either. Obviously there are some known bugs in some versions. The solution came in here on the VS Code Spring Boot initializr Github page: https://github.com/microsoft/vscode-spring-initializr/issues/162#issuecomment-726832226 .

Related