devonfw / ide

Tool to automate setup and update of development environment (esp. for Java projects).
Apache License 2.0
33 stars 102 forks source link

download of gcviewer fails with checksum error in windows integration test #1300

Closed hohwille closed 11 months ago

hohwille commented 11 months ago
Starting installation of gcviewer in version 1.36 to /d/a/ide/ide/scripts/target/integration-test/test-setup/software/gcviewer
Trying to download gcviewer-1.36-windows.jar from https://sourceforge.net/projects/gcviewer/files/gcviewer-1.36.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100   746  100   746    0     0   5698      0 --:--:-- --:--:-- --:--:--  5698
Download of gcviewer-1.36-windows.jar from https://sourceforge.net/projects/gcviewer/files/gcviewer-1.36.jar succeeded.

******** ATTENTION ********
Downloaded file has the wrong checksum!
Expected 5e6757735903d1d3b8359ae8fabc66cdc2ac6646725e820a18e55b85b3bc00f4
Download 251a85b3bac687974f360d3796048c20ded3bf0bd69e0d1cfd1db23d013f89ed
This could be a man-in-the-middle-attack, a download failure, or a release that has been updated afterwards.
Please review carefully.
Expected checksum can be found at /d/a/ide/ide/scripts/target/integration-test/test-setup/urls/gcviewer/gcviewer/1.36/urls.sha256.
Actual checksum was computed via sha256sum /c/Users/runneradmin/Downloads/devonfw-ide/gcviewer-1.36-windows.jar
Installation was aborted for security reasons!
We are sorry for the inconvenience. Please check the above errors, resolve them and try again.
[ERROR] Failed running test #13: integration-test-gcviewer - exit code 255

I ran this locally on my windows laptop and got this:

$ devon gcviewer setup
Success: run command mkdir
Starting installation of gcviewer in version 1.36 to /d/projects/devonfw/software/gcviewer
Trying to download gcviewer-1.36-windows.jar from https://sourceforge.net/projects/gcviewer/files/gcviewer-1.36.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   718    0   718    0     0   2137      0 --:--:-- --:--:-- --:--:--  2149
100   734    0   734    0     0    698      0 --:--:--  0:00:01 --:--:-- 31913
100   973    0   973    0     0    736      0 --:--:--  0:00:01 --:--:--   736
100   325  100   325    0     0    156      0  0:00:02  0:00:02 --:--:--     0
100   154  100   154    0     0     66      0  0:00:02  0:00:02 --:--:--    66
100   323  100   323    0     0     79      0  0:00:04  0:00:04 --:--:--   441
100   138  100   138    0     0     32      0  0:00:04  0:00:04 --:--:--    32
100   323  100   323    0     0     53      0  0:00:06  0:00:06 --:--:--   435
100  549k  100  549k    0     0  75539      0  0:00:07  0:00:07 --:--:-- 1610k
Download of gcviewer-1.36-windows.jar from https://sourceforge.net/projects/gcviewer/files/gcviewer-1.36.jar succeeded.
Checksum 5e6757735903d1d3b8359ae8fabc66cdc2ac6646725e820a18e55b85b3bc00f4 is correct
Success: run command mkdir
Success: run command cp
Successfully installed gcviewer
The software gcviewer has been added. You need to rerun 'devon' command without arguments or restart your terminal to update your PATH so the newly installed software will be found.

As you can see both environments used the same download URL but got different results. Looking carefully at the integration-test log reveals that the downloaded file is only 746´ bytes large. This is very suspicious and makes it obvious that the checksum does not match as this is not the proper download. So the download was incomplete or what IMHO is more likely on the windows VM we have an oldcurl` installed that did not follow the redirects and therefore we downloaded the HTML content rather than the actual download file.

hohwille commented 11 months ago

Also this error magically disappeared. Maybe there was a temporary problem on github action side.