Skip to content

"emsdk install latest" fails when downloading something due to SSL stuff #140

Closed

Description

@damu

So I wanted to try Webassembly and followed the instructions at https://github.com/juj/emsdk.
First emsdk failed because I had no Python, so I installed Python (3.6.5).
"emsdk update" seemed to work (no output) but "emsdk install latest" failed, output:

C:\Users\damu\Downloads\emsdk-portable>emsdk install latest
Update complete, however skipped fetching the Emscripten tags, since git was not found.
If you want to compile one of the tagged releases from source, please install git by typing 'emsdk install git-1.9.4', o
r alternatively by installing it manually from http://git-scm.com/downloads . If you install git manually, remember to a
dd it to PATH.
If you are not looking to build Emscripten from source, you can safely ignore this message.
Installing SDK 'sdk-1.37.1-64bit'..
Installing tool 'clang-e1.37.1-64bit'..
The contents of file 'llvm/tag/win_64bit/emscripten-llvm-e1.37.1.zip' already exist in destination 'C:/Users/damu/Downl
oads/emsdk-portable/clang/e1.37.1_64bit', skipping.
Done installing tool 'clang-e1.37.1-64bit'.
Installing tool 'node-4.1.1-64bit'..
The contents of file 'node_4.1.1_64bit.zip' already exist in destination 'C:/Users/damu/Downloads/emsdk-portable/node/4
.1.1_64bit', skipping.
Done installing tool 'node-4.1.1-64bit'.
Installing tool 'python-2.7.5.3-64bit'..
The contents of file 'python_2.7.5.3_64bit.zip' already exist in destination 'C:/Users/damu/Downloads/emsdk-portable/py
thon/2.7.5.3_64bit', skipping.
Done installing tool 'python-2.7.5.3-64bit'.
Installing tool 'emscripten-1.37.1'..
Traceback (most recent call last):
  File "C:\Users\damu\Downloads\emsdk-portable\\emsdk", line 2149, in <module>
    sys.exit(main())
  File "C:\Users\damu\Downloads\emsdk-portable\\emsdk", line 2132, in main
    success = tool.install()
  File "C:\Users\damu\Downloads\emsdk-portable\\emsdk", line 1229, in install
    success = tool.install()
  File "C:\Users\damu\Downloads\emsdk-portable\\emsdk", line 1244, in install
    success = download_and_unzip(url, self.installation_path(), download_even_if_exists, filename_prefix=self.zipfile_pr
efix if hasattr(self, 'zipfile_prefix') else '')
  File "C:\Users\damu\Downloads\emsdk-portable\\emsdk", line 850, in download_and_unzip
    dst_file = download_file(urljoin(emsdk_packages_url, zipfile), 'zips/', download_even_if_exists, filename_prefix)
  File "C:\Users\damu\Downloads\emsdk-portable\\emsdk", line 416, in download_file
    u = urlopen(url)
  File "C:\Users\damu\Downloads\emsdk-portable\python\2.7.5.3_64bit\lib\urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "C:\Users\damu\Downloads\emsdk-portable\python\2.7.5.3_64bit\lib\urllib2.py", line 404, in open
    response = self._open(req, data)
  File "C:\Users\damu\Downloads\emsdk-portable\python\2.7.5.3_64bit\lib\urllib2.py", line 422, in _open
    '_open', req)
  File "C:\Users\damu\Downloads\emsdk-portable\python\2.7.5.3_64bit\lib\urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "C:\Users\damu\Downloads\emsdk-portable\python\2.7.5.3_64bit\lib\urllib2.py", line 1222, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "C:\Users\damu\Downloads\emsdk-portable\python\2.7.5.3_64bit\lib\urllib2.py", line 1184, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert pr
otocol version>

I'm using Windows 7 btw.
Git is not in my path but it doesn't seem to require it (which would be weird).

So my first impression was not good and some suggestions from my perspective I guess (mostly C++ developer who has also done web stuff with Javascript&Typescript):
Why is the script apparently installing Python 2.7.5.3? I just installed a new(er) Python version.
Why is it downloading stuff? Why is there no simple installer with everything it needs?

At first I was on http://webassembly.org/getting-started/developers-guide/ but it seems to be a build from source which I don't really want, I just want to use it and that should be made easy. The instruction on this Github page are apparently for the prebuild version which seemed easier. But apparently Webassembly still can't be used for anything 😉, at least not without a lot of hassle and on Windows.
Is there any IDE for it or some instruction to integrate it (like use the normal run hotkey to build it and open it in a browser)? I think I've heard of something but neither this Github nor webassembly.org list one, would be nice to have a more "out of the box" solution.
Is there a way to access the DOM to do typical Javascript stuff with Webassembly? Or can I call Javascript functions? It's often advertised as kinda replacing JS but I can't find anything that easily, though would expect it in a "Getting Started" guide. This kinda sounded like it but seems to be something else:
http://webassembly.org/getting-started/js-api/
I'm checking out Emscripten and Webassembly occasionally for years already and love the idea but it still seems to be in the "Let's check that out again in a few years"-stage...

Activity

  1. kripken commented on Apr 24, 2018

    @kripken
    Member

    This looks like it might be emscripten-core/emscripten#6275 , which was caused by a github update to SSL, which requires a quite recent python version. You might want to try running emsdk.bat using that newer python directly, that works on other platforms at least.

    Why is it downloading stuff? Why is there no simple installer with everything it needs?

    Sorry about that! It used to be better, bundling Python in the windows download, but sadly we no longer have a windows person helping with releases. None of the active devs, myself included, are on windows, which is definitely bad :( I'm trying to get help to improve our windows support, but so far no luck.

  2. damu commented on Apr 24, 2018

    @damu
    Author

    I commented those four "@if EXIST ..." blocks in the emsdk.bat out and it seemed to work.
    It apparently also installed a JRE. Those requirements are strange.

    One more reason to hate SSL. There's so much hassle with certificates running out, version incompatibilities, ...

    Strange that no one uses Windows since a lot of (probably the most) software is developed for Windows. Maybe it's just that most of that is closed source and most open source contributors use Linux.

  3. juj commented on Apr 27, 2018

    @juj
    Collaborator

    The root issue here I think is that after we migrated emsdk on Windows from Python 2.7.5.3 to 2.7.13.1, we did not kick off the emsdk deployment script (mentioned this here emscripten-core/emscripten#6275 (comment) as well), so the emsdk-portable.zip hosted on Amazon for download still has the old version of that lying around.

  4. juj commented on Apr 27, 2018

    @juj
    Collaborator

    I commented those four "@if EXIST ..." blocks in the emsdk.bat out and it seemed to work.

    The fix to this SSL oddiness is in https://github.com/juj/emsdk/blob/master/emsdk.bat, but due to the above, the emsdk-portable.zip you downloaded was outdated. Try going via the manual git clone https://github.com/juj/emsdk.git route to bootstrap (or wait until we get an up to date emsdk-portable.zip deployed).

    One more reason to hate SSL. There's so much hassle with certificates running out, version incompatibilities,

    A particularly nasty thing here was also that since this problem affected downloading from Python, and the updater mechanism also needs to download, it means that one can't use emsdk to update to newer fixed version, since the issue broke the updating mechanism as well, but need to bootstrap from scratch.

    It apparently also installed a JRE. Those requirements are strange.

    If you install a "full sdk" via emsdk, it will install JRE, since the Closure minifier/compiler uses JRE. (that is the only feature that we use Java for). For Emscripten though, JRE is optional, and if not present, Closure minification is then not available. Installing a full SDK via emdk is a convenience that installs a full set of packages, for example, emdsk install latest will install clang, node.js, python, java, and emscripten. If you wanted to explicitly not install python or java, the workflow is then instead to explicitly specify only the packages that you want, e.g. emsdk install clang-e1.37.36-64bit emscripten-tag-1.37.36-64bit node-8.9.1-64bit if you only want clang, node.js and emscripten, but want to omit python and java. That is, a "SDK" in emsdk is in itself just a shorthand alias to a list of predetermined set of good packages.

  5. kripken commented on Apr 27, 2018

    @kripken
    Member

    Thanks @juj, now I see where part of the confusion here arose - the emsdk readme was not in sync with the emscripten docs. I opened #141.

  6. yait-202 commented on Feb 15, 2022

    @yait-202

    (I'm sorry for my awful English, Im not a native speaker :)) I'm trying to install an emsdk and getting this:

    ADMIN@DESKTOP-8VJMACF MINGW64 /c/emsdk (main)
    $ ./emsdk install 1.39.8
    Python
    ADMIN@DESKTOP-8VJMACF MINGW64 /c/emsdk (main)
    $
    
    

    Does anyone know how to solve it?

  7. sbc100 commented on Feb 15, 2022

    @sbc100
    Collaborator

    Your issue looks unrelated to this one. Can you open a new issue perhaps? I would say that since you are using mingw you might need to be able to investigate and fix any issues you find since its not one of our primary 3 targets and we don't test in that environment (If somebody wanted to take it on they could add testing to out CI). The first thing to try is to run with bash -x to see what the emsdk bash script ends up running for example can you run $ bash -x ./emsdk install 1.39.8 and see which version of python is being used?

  8. yait-202 commented on Feb 16, 2022

    @yait-202

    Oh, sure, I'm sorry. As you can see I'm a new in GitHub, so I should just learn some rules. Thanks a lot for your comment

  9. added a commit that references this issue on Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions