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

Force using a version of tls older than 2 #2325

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eliemichel
Copy link

Problem

On a fresh git clone (commit 2f6dd29), fresh install of Haskell via GHCup (GHCup 0.1.22.0, cabal 3.10.3.1, GHC 9.4.8), on Windows 10, I get the following error:

~/src/elm-compiler $ cabal build
[...]
[129 of 132] Compiling Develop.StaticFiles ( terminal\src\Develop\StaticFiles.hs, [...]\elm-compiler\dist-newstyle\build\x86_64-windows\ghc-9.4.8\elm-0.19.1\x\elm\build\elm\elm-tmp\Develop\StaticFiles.o )
-- PROBLEM LOADING PACKAGE LIST ------------------------------------------------

I need the list of published packages to verify your dependencies, so I tried to
fetch:

    https://package.elm-lang.org/all-packages

But my HTTP library is giving me the following error message:

    InternalException (HandshakeFailed (Error_Protocol "peer does not support Extended Main Secret" HandshakeFailure))

Are you somewhere with a slow internet connection? Or no internet? Does the link
I am trying to fetch work in your browser? Maybe the site is down? Does your
internet connection have a firewall that blocks certain domains? It is usually
something like that!


terminal\src\Develop\StaticFiles.hs:91:3: error:
    * Exception when trying to run compile-time code:

--------------------------------------------------------
Error in Develop.StaticFiles.Build.buildReactorFrontEnd
Compile with `elm make` directly to figure it out faster
--------------------------------------------------------

CallStack (from HasCallStack):
  error, called at terminal/src\Develop\StaticFiles\Build.hs:68:15 in main:Develop.StaticFiles.Build
      Code: (bsToExp =<< runIO Build.buildReactorFrontEnd)
    * In the untyped splice:
        $(bsToExp =<< runIO Build.buildReactorFrontEnd)
   |
91 |   $(bsToExp =<< runIO Build.buildReactorFrontEnd)
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: cabal-3.10.3.0.exe: Failed to build exe:elm from elm-0.19.1.

Quick fix

Several sources suggest that this is due to the server of https://package.elm-lang.org/all-packages not being up to date on its TLS implementation. The suggested workaround is always to backport the tls package to a version < 2, i.e., before they dropped support for this kind of outdated server.

Better fix

IMHO this should rather be solved on the server side, but as I may not be the only person around bumping into this issue, I open this PR with a fix that anybody can run in the meantime.

This fixes the issue of getting the following error while downloading
package list:

    InternalException (HandshakeFailed (Error_Protocol "peer does not support Extended Main Secret" HandshakeFailure))
Copy link

github-actions bot commented May 6, 2024

Thanks for suggesting these code changes. To set expectations:

  • Pull requests are reviewed in batches, so it can take some time to get a response.
  • Smaller pull requests are easier to review. To fix nine typos, nine specific issues will always go faster than one big one. Learn why here.
  • Reviewers may not know as much as you about certain situations, so add links to supporting evidence for important claims, especially regarding standards for CSS, HTTP, URI, etc.

Finally, please be patient with the core team. They are trying their best with limited resources.

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

Successfully merging this pull request may close these issues.

1 participant