ProfessorManhattan / ansible-androidstudio

šŸš€ Installs Android Studio and sets up Android SDKs on nearly any OS šŸŽŸ
https://megabyte.space
Other
20 stars 5 forks source link

Ensure commandline-tools archive is downloaded task is failing due to checksum mismatch #2

Open Snipx opened 2 years ago

Snipx commented 2 years ago

Steps to reproduce:

dependencies:
  - role: professormanhattan.androidstudio
    user_configs:
      - username: ubuntu
        system: true

Result:

    amazon-ebs: TASK [professormanhattan.androidstudio : Ensure commandline-tools archive is downloaded] ***
    amazon-ebs: Tuesday 24 May 2022  18:13:39 +0300 (0:00:00.143)       0:06:44.233 ***********
    amazon-ebs: fatal: [default]: FAILED! => {"changed": true, "checksum_dest": null, "checksum_src": "5e7bf2dd563d34917d32f3c5920a85562a795c93", "dest": "/tmp/commandlinetools-linux-8512546_latest.zip", "elapsed": 0, "msg": "The checksum for /tmp/commandlinetools-linux-8512546_latest.zip did not match 5e7bf2dd563d34917d32f3c5920a85562a795c93; it was 2ccbda4302db862a28ada25aa7425d99dce9462046003c1714b059b5c47970d8.", "src": "/root/.ansible/tmp/ansible-moduletmp-1653405221.423859-6jitlcxz/tmpv55h7esk", "url": "https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip"}
    amazon-ebs:

Note that 2ccbda4302db862a28ada25aa7425d99dce9462046003c1714b059b5c47970d8 is the SHA256 checksum and 5e7bf2dd563d34917d32f3c5920a85562a795c93 is the SHA1 checksum, both of the same file

Snipx commented 2 years ago

Ah, that's probably a bug at https://developer.android.com/studio

The checksum is declared to be SHA-256 but actually SHA-1 is used

image

Snipx commented 2 years ago

See https://issuetracker.google.com/issues/233703117 for the bug reported to Google