Skip to content

Installation fails with corrupt files [Windows and Linux] #1538

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

Open
GeneThomas opened this issue Mar 17, 2025 · 5 comments
Open

Installation fails with corrupt files [Windows and Linux] #1538

GeneThomas opened this issue Mar 17, 2025 · 5 comments

Comments

@GeneThomas
Copy link

GeneThomas commented Mar 17, 2025

The download node .zip is corrupted, using curl to download it is ok?

python -V
Python 3.11.9

git clone "https://github.com/emscripten-core/emsdk.git"
Cloning into 'emsdk'...

cd emsdk

git rev-parse HEAD
b665079

emsdk install latest

Resolving SDK alias 'latest' to '4.0.5'
Resolving SDK version '4.0.5' to 'sdk-releases-d7f8ff5e2ca3539c33fae81e98f7c56ef9fa1239-64bit'
Installing SDK 'sdk-releases-d7f8ff5e2ca3539c33fae81e98f7c56ef9fa1239-64bit'..
Installing tool 'node-20.18.0-64bit'..
Downloading: C:/Users/Pemrt/Documents/Projects/ext/emsdk/downloads/node-v20.18.0-win-x64.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/node-v20.18.0-win-x64.zip, 31379384 Bytes
Unpacking 'C:/Users/Pemrt/Documents/Projects/ext/emsdk/downloads/node-v20.18.0-win-x64.zip' to 'C:/Users/Pemrt/Documents/Projects/ext/emsdk/node/20.18.0_64bit'
Unzipping file 'C:/Users/Pemrt/Documents/Projects/ext/emsdk/downloads/node-v20.18.0-win-x64.zip' failed due to reason: File is not a zip file! Removing the corrupted zip file.
error: installation failed!

curl https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/node-v20.18.0-win-x64.zip --output downloads\node-v20.18.0-win-x64.zip

unzip /d c:\temp\node-tmp downloads\node-v20.18.0-win-x64.zip

is ok, showing that the .zip curl downloaded is ok?

@GeneThomas GeneThomas changed the title Installation fails on Windows Installation fails with corrupt files [Windows and Linux] Mar 17, 2025
@GeneThomas
Copy link
Author

GeneThomas commented Mar 17, 2025

owner@owner:~/emsdk$ python3 -V
Python 3.12.3

wner@owner:~/emsdk$ ./emsdk install latest
Resolving SDK alias 'latest' to '4.0.5'
Resolving SDK version '4.0.5' to 'sdk-releases-d7f8ff5e2ca3539c33fae81e98f7c56ef9fa1239-64bit'
Installing SDK 'sdk-releases-d7f8ff5e2ca3539c33fae81e98f7c56ef9fa1239-64bit'..
Installing tool 'node-20.18.0-64bit'..
Downloading: /home/owner/emsdk/downloads/node-v20.18.0-linux-x64.tar.xz from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/node-v20.18.0-linux-x64.tar.xz, 25738964 Bytes
Unpacking '/home/owner/emsdk/downloads/node-v20.18.0-linux-x64.tar.xz' to '/home/owner/emsdk/node/20.18.0_64bit'
xz: (stdin): Unexpected end of input
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
['tar', '-xf', '/home/owner/emsdk/downloads/node-v20.18.0-linux-x64.tar.xz', '--strip', '1'] failed with error code 2!
error: installation failed!

@GeneThomas
Copy link
Author

A work around is to use curl to download the archives by hand (into the downloads/ directory) and setting EMSDK_KEEP_DOWNLOADS=1 which re-uses archives that have been downloaded already.

I have a slow internet connection, perhaps storage.googleapis.com is truncating the download and curl, used by the python to perform the downloads, does not notice!

Isn’t wasm’s loop/block structure odd!

@sbc100
Copy link
Collaborator

sbc100 commented Mar 17, 2025

Were you able to reproduce this or was it a one off?

@GeneThomas
Copy link
Author

GeneThomas commented Mar 17, 2025 via email

@sbc100
Copy link
Collaborator

sbc100 commented Mar 17, 2025

The number of bytes read looks correct (31379384 Bytes).

Can you modify the emsdk.py script to remove the rmfile lines right below the Removing the corrupted zip file. line? Then attach take the zip file from the emsdk/downloads directory and attach it to this ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants