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

GitHub Copilot Java: Spring Boot Application failed unzip #133

Closed
tsubakimoto opened this issue Jun 3, 2024 · 3 comments
Closed

GitHub Copilot Java: Spring Boot Application failed unzip #133

tsubakimoto opened this issue Jun 3, 2024 · 3 comments
Labels

Comments

@tsubakimoto
Copy link

https://github.com/microsoft/moaw/blob/main/workshops/github-copilot-java/workshop.md#creating-a-spring-boot-application

Hi team.
When I executed the following command, an error occurred and I could not proceed to the subsequent steps.

command

> mkdir sample; cd sample
> curl https://start.spring.io/starter.zip \
           -d dependencies=web,devtools \
           -d bootVersion=3.1.5 \
           -d type=maven-project \
           -d applicationName=CopilotSample \
           -d packageName=com.microsoft.sample \
           -d groupId=com.microsoft.sample \
           -d artifactId=CopilotSample \
           -o my-project.zip
> unzip my-project.zip

error

$ unzip my-project.zip
Archive:  my-project.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of my-project.zip or
        my-project.zip.zip, and cannot find my-project.zip.ZIP, period.

reason

my-project.zip is empty and version 3.1.5 is invalid.

$ curl https://start.spring.io/starter.zip \
           -d dependencies=web,devtools \
           -d bootVersion=3.1.5 \
           -d type=maven-project \
           -d applicationName=CopilotSample \
           -d packageName=com.microsoft.sample \
           -d groupId=com.microsoft.sample \
           -d artifactId=CopilotSample | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   373    0   194  100   179    293    270 --:--:-- --:--:-- --:--:--   564
{
  "timestamp": "2024-06-03T09:33:16.076+00:00",
  "status": 400,
  "error": "Bad Request",
  "message": "Invalid Spring Boot version '3.1.5', Spring Boot compatibility range is >=3.2.0",
  "path": "/starter.zip"
}
@yoshioterada
Copy link
Member

Dear @tsubakimoto san

I hope this message finds you well. I would like to express my sincere gratitude for taking the time to report this issue despite your busy schedule.

Upon reviewing the version of Spring Boot, I have confirmed that the latest stable version currently available is 3.3.0. You can find this information at the following link: https://start.spring.io/

The correct command is as follows:

curl https://start.spring.io/starter.zip \
           -d dependencies=web,devtools \
           -d bootVersion=3.3.0 \
           -d type=maven-project \
           -d applicationName=CopilotSample \
           -d packageName=com.microsoft.sample \
           -d groupId=com.microsoft.sample \
           -d artifactId=CopilotSample \
           -d javaVersion=21 \
           -o my-project.zip

Based on this information, I will proceed with the necessary corrections.
Thank you very much for pointing this out.

Your assistance is greatly appreciated.
Best Regards.
Yoshio

yoshioterada added a commit to yoshioterada/moaw that referenced this issue Jun 4, 2024
…iled unzip

This is the fix for the microsoft#133

In the fix,
I updated the Spring Boot Version to 3.3.0 and also specified Java Version.

microsoft#133
@tsubakimoto
Copy link
Author

Thank you @yoshioterada san.
I would like to try again the workshop you modified.

@sinedied
Copy link
Collaborator

sinedied commented Jun 4, 2024

🎉 This issue has been resolved in version 1.5.0 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants