epiccurious / jade-diy

Securely custody your bitcoin with Open Source software and generic hardware.
MIT No Attribution
17 stars 2 forks source link

Download mismatch error when installing esp-idf #65

Open epiccurious opened 9 months ago

epiccurious commented 9 months ago

After cloning the repo, during ./install.sh esp32, seeing this error WARNING: file size mismatch for ..., expected x, got <x

+ ./install.sh esp32
Detecting the Python interpreter
Checking "python3" ...
Python 3.10.12
"python3" has been detected
Checking Python compatibility
Installing ESP-IDF tools
Current system platform: linux-amd64
Selected targets are: esp32
Installing tools: xtensa-esp-elf-gdb, xtensa-esp32-elf, esp32ulp-elf, openocd-esp32, esp-rom-elfs
Skipping xtensa-esp-elf-gdb@12.1_20221002 (already installed)
Installing xtensa-esp32-elf@esp-12.2.0_20230208
Downloading https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz
Destination: /home/user1/.espressif/dist/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz.tmp
99%WARNING: file size mismatch for /home/user1/.espressif/dist/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz.tmp, expected 67006496, got 66673920
WARNING: Download failure: <urlopen error retrieval incomplete: got only 66673920 out of 67006496 bytes>
WARNING: Failed to download https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz to /home/user1/.espressif/dist/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz.tmp
Downloading https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz
Destination: /home/user1/.espressif/dist/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz.tmp
99%WARNING: file size mismatch for /home/user1/.espressif/dist/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz.tmp, expected 67006496, got 66685248
WARNING: Download failure: <urlopen error retrieval incomplete: got only 66685248 out of 67006496 bytes>
WARNING: Failed to download https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz to /home/user1/.espressif/dist/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz.tmp
Downloading https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz
Destination: /home/user1/.espressif/dist/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz.tmp
99%WARNING: file size mismatch for /home/user1/.espressif/dist/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz.tmp, expected 67006496, got 66794880
WARNING: Download failure: <urlopen error retrieval incomplete: got only 66794880 out of 67006496 bytes>
WARNING: Failed to download https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz to /home/user1/.espressif/dist/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz.tmp
ERROR: Failed to download, and retry count has expired
Please make sure you have a working Internet connection.
+ cleanup
+ rm -rf -- /home/user1/Downloads/diy_jade/temp
+ '[' Linux == Linux ']'
+ '[' -n '' ']'
epiccurious commented 9 months ago

I do indeed have a working internet connection. Need to understand if this is an upstream bug or something to do with my local environment..

67006496 vs 66794880 is 0.32% less than expected file size.

epiccurious commented 9 months ago

https://github.com/espressif/esp-idf/issues/11157

epiccurious commented 9 months ago

I saw this error after reinstalling Ubuntu and installing system updates with dist-upgrade. Might reinstall Ubuntu again to check if it's reproducible.