question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to fetch yarn from GitHub because of protocol version

See original GitHub issue

Do you want to request a feature or report a bug? Bug

What is the current behavior? Unable to fetch yarn from GitHub

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-yarn (install node) on project dxportal-web: Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v1.5.1/yarn-v1.5.1.tar.gz: Received fatal alert: protocol_version -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-yarn (install node) on project dxportal-web: Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v1.5.1/yarn-v1.5.1.tar.gz
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v1.5.1/yarn-v1.5.1.tar.gz
	at com.github.eirslett.maven.plugins.frontend.mojo.MojoUtils.toMojoFailureException(MojoUtils.java:28)
	at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:103)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
Caused by: com.github.eirslett.maven.plugins.frontend.lib.InstallationException: Could not download Yarn
	at com.github.eirslett.maven.plugins.frontend.lib.YarnInstaller.installYarn(YarnInstaller.java:131)
	at com.github.eirslett.maven.plugins.frontend.lib.YarnInstaller.install(YarnInstaller.java:70)
	at com.github.eirslett.maven.plugins.frontend.mojo.InstallNodeAndYarnMojo.execute(InstallNodeAndYarnMojo.java:85)
	at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:94)
	... 22 more
Caused by: com.github.eirslett.maven.plugins.frontend.lib.DownloadException: Could not download https://github.com/yarnpkg/yarn/releases/download/v1.5.1/yarn-v1.5.1.tar.gz
	at com.github.eirslett.maven.plugins.frontend.lib.DefaultFileDownloader.download(FileDownloader.java:77)
	at com.github.eirslett.maven.plugins.frontend.lib.YarnInstaller.downloadFile(YarnInstaller.java:177)
	at com.github.eirslett.maven.plugins.frontend.lib.YarnInstaller.downloadFileIfMissing(YarnInstaller.java:170)
	at com.github.eirslett.maven.plugins.frontend.lib.YarnInstaller.installYarn(YarnInstaller.java:111)
	... 25 more
Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
	at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
	at com.github.eirslett.maven.plugins.frontend.lib.DefaultFileDownloader.execute(FileDownloader.java:104)
	at com.github.eirslett.maven.plugins.frontend.lib.DefaultFileDownloader.download(FileDownloader.java:65)
	... 28 more

and pom.xml:

            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.6</version>
                <configuration>
                    <workingDirectory>${basedir}/build</workingDirectory>
                    <installDirectory>${basedir}/build</installDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>install node</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>install-node-and-yarn</goal>
                        </goals>
                        <configuration>
                            <nodeVersion>v6.4.0</nodeVersion>
                            <yarnVersion>v1.5.1</yarnVersion>
                        </configuration>
                    </execution>
                    <execution>
                        <id>yarn install</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>--ignore-engines install</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Please mention your frontend-maven-plugin and operating system version. Mac OSX version 10.11.6, frontend-maven-plugin version 1.6

I can only imagine it’s related to: https://github.com/blog/2498-weak-cryptographic-standards-removal-notice

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
mikeobrcommented, Mar 30, 2018

At the end of a painful day, this https://github.com/jenkinsci/ghprb-plugin/issues/638 gave me the clue I needed. On linux add this

export JAVA_TOOL_OPTIONS="-Dhttps.protocols=TLSv1.2"

And it seems to do the trick.

3reactions
jorgutdevcommented, Aug 13, 2018

Thanks @mikeobr This also works for maven commands

mvn clean install -Dhttps.protocols=TLSv1.2 did the trick for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yarn install Invalid protocol error · Issue #1625 - GitHub
I found a temporary fix. Delete the yarn.lock file when trying to run on a new machine. Yarn will generate another one.
Read more >
[Reason] Fail to fetch git url starts with "git+" #411 - GitHub
Fail to install an npm package where it fails at fetching: yarn add @opam-alpha/ocamlfind yarn add v0.13.0 info No lockfile found.
Read more >
yarn 0.23.2 unable to install from git+ssh repo #3203 - GitHub
When trying to add a dependency with the git+ssh specification, yarn is unable to read from the remote repository.
Read more >
Can't install package from private GitHub repository with Yarn ...
The package is installed without permission issues. Please mention your node. js, yarn and operating system version.
Read more >
[Bug] Yarn install --immutable successful locally, fails in CI ...
yarn install --immutable successful locally, fails in CI. According to CI logs, because of mismatched checksum when resolving a file: protocol local dependency....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found