cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
428 stars 60 forks source link

[Wrapper] Warning: couldn't download https://beust.com/kobalt/kobalt-1.0.129.zip #509

Closed apahl closed 4 years ago

apahl commented 4 years ago

Hello,

I see that this issue has come up earlier and was fixed, but it seems to have reappeared.

On Kubuntu 19.10:

$ kobaltw --init kotlin
[Wrapper] Warning: couldn't download https://beust.com/kobalt/kobalt-1.0.129.zip
[Wrapper] Warning: couldn't download https://beust.com/kobalt/kobalt-1.0.129.zip
[Wrapper] Warning: couldn't download https://beust.com/kobalt/kobalt-1.0.129.zip
Exception in thread "main" java.nio.file.NoSuchFileException: /home/pahl/.kobalt/wrapper/dist/kobalt-1.0.129.zip
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
        at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
        at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149)
        at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
        at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
        at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1225)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:727)
        at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:844)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:247)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:177)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:191)
        at com.beust.kobalt.wrapper.Main.extractZipFile(Main.java:335)
        at com.beust.kobalt.wrapper.Main.installDistribution(Main.java:188)
        at com.beust.kobalt.wrapper.Main.installAndLaunchMain(Main.java:81)
        at com.beust.kobalt.wrapper.Main.main(Main.java:17)

$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu119.10.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu119.10.1, mixed mode, sharing)

Many thanks for all your efforts.

Kind regards,
Axel

cbeust commented 4 years ago

Should be fixed now.

apahl commented 4 years ago

Sorry, it still does not work for me.

When I try to download the file manually with wget I get a warning about the certificate.

$ wget https://beust.com/kobalt/kobalt-1.0.129.zip
--2020-03-10 08:40:36--  https://beust.com/kobalt/kobalt-1.0.129.zip
Resolving beust.com (beust.com)... 13.57.86.167
Connecting to beust.com (beust.com)|13.57.86.167|:443... connected.
ERROR: cannot verify beust.com's certificate, issued by ‘CN=Sectigo RSA Domain Validation Secure Server CA,O=Sectigo Limited,L=Salford,ST=Greater Manchester,C=GB’:
  Unable to locally verify the issuer's authority.
To connect to beust.com insecurely, use `--no-check-certificate'.

Using wget with the --no-check-certificate option does work.

Kind regards,
Axel

cedricbeust-okta commented 4 years ago

I do see the same result as you with wget, but Chrome says the certificate is valid:

image

Not quite sure why there is a discrepancy.

cbeust commented 4 years ago

Seems to be a wget configuration issue:

https://serverfault.com/questions/314635/why-wget-doesnt-verify-ssl-certificates