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

tools/get.py CORRUPTED/dist DOWNLOADS #3817

Closed
nemo9955 opened this issue Nov 10, 2017 · 8 comments
Closed

tools/get.py CORRUPTED/dist DOWNLOADS #3817

nemo9955 opened this issue Nov 10, 2017 · 8 comments
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.

Comments

@nemo9955
Copy link

Basic Infos

Hardware

Hardware: (uname -a) Linux debst 4.9.0-3-686-pae #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) i686
Core Version: 2.3.0

Description

Problem description
Debian 9 on an old laptop, the script seems to be downloading corrupted/altered archive files.
Removing the SHA check, the code still fails with not a gzip file .
Changed source to only show needed download link
Platform: i686-pc-linux-gnu https://github.com/igrr/esptool-ck/releases/download/0.4.12/esptool-0.4.12-linux32.tar.gz https://github.com/esp8266/Arduino/releases/download/2.3.0/linux32-xtensa-lx106-elf.tar.gz https://github.com/igrr/mkspiffs/releases/download/0.2.0/mkspiffs-0.2.0-no_magic_length-linux32.tar.gz
I downloaded them and put them in /dist, reverted source of get.py and it worked.

Debug Messages


======= original stack trace =============

Platform: i686-pc-linux-gnu
Downloading esptool-0.4.9-linux32.tar.gz
Done
Hash mismatch for dist/esptool-0.4.9-linux32.tar.gz, delete the file and try again
Traceback (most recent call last):
  File "./get.py", line 116, in <module>
    get_tool(tool)
  File "./get.py", line 83, in get_tool
    raise RuntimeError()
RuntimeError

======= removing the SHA integrity check =============

Platform: i686-pc-linux-gnu
Tool esptool-0.4.12-linux32.tar.gz already downloaded
Extracting dist/esptool-0.4.12-linux32.tar.gz
Traceback (most recent call last):
  File "get.py", line 116, in <module>
    get_tool(tool)
  File "get.py", line 84, in get_tool
    unpack(local_path, '.')
  File "get.py", line 50, in unpack
    tfile = tarfile.open(filename, 'r:gz')
  File "/usr/lib/python2.7/tarfile.py", line 1693, in open
    return func(name, filemode, fileobj, **kwargs)
  File "/usr/lib/python2.7/tarfile.py", line 1751, in gzopen
    raise ReadError("not a gzip file")
tarfile.ReadError: not a gzip file


@igrr
Copy link
Member

igrr commented Jan 2, 2018

Do you still have the old (corrupted) file saved somewhere to see how exactly it was corrupted? I.e. partial download, or downloaded something totally different, or something else?

@igrr igrr added the waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. label Jan 2, 2018
@nemo9955
Copy link
Author

nemo9955 commented Jan 2, 2018

I will re-download them tomorrow at work on that laptop and send them.

@nemo9955
Copy link
Author

nemo9955 commented Jan 3, 2018

esptool-0.4.12-linux32.tar.gz

linux32-xtensa-lx106-elf.tar.gz

mkspiffs-0.2.0-no_magic_length-linux32.tar.gz

All 3 files gave Hash mismatch for dist/.............. .
Pulled the new repo, renamed working /dist -> /dist_copy, python get.py , esptool..., upload it , replace it with the working one , python get.py , Hash mismatch for dist/linux32-xtensa-lx106-elf.tar.gz, delete the file and try again etc.

@devyte
Copy link
Collaborator

devyte commented Mar 2, 2018

@nemo9955 is this issue still valid?

@nemo9955
Copy link
Author

nemo9955 commented Mar 2, 2018

Will test it in the following days.

@devyte
Copy link
Collaborator

devyte commented Jul 13, 2018

@nemo9955 did you test this? Please test with latest git, not with 2.4.1 due to several known issues in that release.

@devyte
Copy link
Collaborator

devyte commented Sep 6, 2018

Closing due to lack of feedback in several months.

@devyte devyte closed this as completed Sep 6, 2018
@sergio-rivas
Copy link

I am getting the exact same issue when using python(tried with 2.7.14 & also 3.7.1) on mac osx. Hash mismatch for esptools.

Is there a workaround? (i.e. just telling me which url's to download, and which files to run after downloading?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Projects
None yet
Development

No branches or pull requests

4 participants