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

Print IDEasy version in ide status when offline #1160

Open
julia-cap opened this issue Mar 24, 2025 · 0 comments
Open

Print IDEasy version in ide status when offline #1160

julia-cap opened this issue Mar 24, 2025 · 0 comments
Labels
bug Something isn't working status StatusCommandlet (ide status)

Comments

@julia-cap
Copy link
Contributor

julia-cap commented Mar 24, 2025

Expected behavior

As an IDEasy user, I expect to get relevant information such as my current IDEasy version, when calling ide status even when I am offline.

$ ide status
IDE_ROOT is set to D:\projects
IDE_HOME is set to D:\projects\IDEasy
You are offline. Check your internet connection and potential proxy settings.
Your version of IDEasy is 2025.03.001.

Actual behavior

$ ide status
Updates are available for the settings repository. If you want to apply the latest changes, call "ide update"
IDE_ROOT is set to D:\projects
IDE_HOME is set to D:\projects\IDEasy
You are offline. Check your internet connection and potential proxy settings.
Your settings are not up-to-date, please run 'ide update'. 
An unexpected error occurred!
We are sorry for the inconvenience.
Please check the error below, resolve it and try again.
If the error is not on your end (network connectivity, lack of permissions, etc.) please file a bug:
https://github.com/devonfw/IDEasy/issues/new?assignees=&labels=bug&projects=&template=bug.md&title=IllegalStateException%3A+Failed+to+fetch+XML+metadata+from+https%3A%2F%2Fs01.oss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshots%2Fcom%2Fdevonfw%2Ftools%2FIDEasy%2Fide-cli%2Fmaven-metadata.xml
java.lang.IllegalStateException: Failed to fetch XML metadata from https://s01.oss.sonatype.org/content/repositories/snapshots/com/devonfw/tools/IDEasy/ide-cli/maven-metadata.xml
        at com.devonfw.tools.ide.tool.repository.MavenRepository.fetchXmlMetadata(MavenRepository.java:307)
        at com.devonfw.tools.ide.tool.repository.MavenRepository.fetchVersions(MavenRepository.java:214)
        at com.devonfw.tools.ide.tool.repository.MavenRepository.resolveVersion(MavenRepository.java:201)
        at com.devonfw.tools.ide.tool.repository.MavenRepository.resolveVersion(MavenRepository.java:186)
        at com.devonfw.tools.ide.tool.IdeasyCommandlet.getLatestVersion(IdeasyCommandlet.java:122)
        at com.devonfw.tools.ide.tool.IdeasyCommandlet.checkIfUpdateIsAvailable(IdeasyCommandlet.java:132)
        at com.devonfw.tools.ide.commandlet.StatusCommandlet.run(StatusCommandlet.java:45)
        at com.devonfw.tools.ide.context.AbstractIdeContext.applyAndRun(AbstractIdeContext.java:958)
        at com.devonfw.tools.ide.context.AbstractIdeContext.run(AbstractIdeContext.java:876)
        at com.devonfw.tools.ide.cli.Ideasy.runOrThrow(Ideasy.java:95)
        at com.devonfw.tools.ide.cli.Ideasy.run(Ideasy.java:59)
        at com.devonfw.tools.ide.cli.Ideasy.main(Ideasy.java:133)
        at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.net.ConnectException: Connection timed out: connect
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$NewObjectWithObjectArrayArgFunctionPointer.invoke(JNIFunctions.java)
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.ThrowNew(JNIFunctions.java:907)
        at [email protected]/sun.nio.ch.Net.connect0(Native Method)
        at [email protected]/sun.nio.ch.Net.connect(Net.java:589)
        at [email protected]/sun.nio.ch.Net.connect(Net.java:578)
        at [email protected]/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:583)
        at [email protected]/java.net.Socket.connect(Socket.java:751)
        at [email protected]/java.net.Socket.connect(Socket.java:686)
        at [email protected]/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
        at [email protected]/sun.net.www.http.HttpClient.openServer(HttpClient.java:531)
        at [email protected]/sun.net.www.http.HttpClient$1.run(HttpClient.java:590)
        at [email protected]/sun.net.www.http.HttpClient$1.run(HttpClient.java:588)
        at [email protected]/java.security.AccessController.executePrivileged(AccessController.java:114)
        at [email protected]/java.security.AccessController.doPrivileged(AccessController.java:571)
        at [email protected]/sun.net.www.http.HttpClient.privilegedOpenServer(HttpClient.java:587)
        at [email protected]/sun.net.www.http.HttpClient.openServer(HttpClient.java:631)
        at [email protected]/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at [email protected]/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:377)
        at [email protected]/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:202)
        at [email protected]/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1258)
        at [email protected]/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1123)
        at [email protected]/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)
        at [email protected]/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1675)
        at [email protected]/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1599)
        at [email protected]/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223)
        at [email protected]/java.net.URL.openStream(URL.java:1325)
        at com.devonfw.tools.ide.tool.repository.MavenRepository.fetchXmlMetadata(MavenRepository.java:303)
        ... 12 more

Error: IDEasy failed with exit code 255

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. Disconnect from internet
  2. Execute ide status

Related/Dependent Issues

#1110

Comments/Hints:

Affected version:

  • OS: Windows/Linux/Mac (most likely all of them, but tested only on Windows so far)
@julia-cap julia-cap added the bug Something isn't working label Mar 24, 2025
@julia-cap julia-cap moved this to 🆕 New in IDEasy board Mar 24, 2025
@julia-cap julia-cap added the status StatusCommandlet (ide status) label Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status StatusCommandlet (ide status)
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant