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.

Node/NPM install does not respect ignoring SSL

See original GitHub issue

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

What is the current behavior? When specifying the nodeDownloadRoot to a location that is using a self-signed certificate or certificate that may not be trusted, the plugin fails to download even though command line options specify to ignore SSL errors.

If the current behavior is a bug, please provide the steps to reproduce.

  1. Load nodejs into a repository that is behind a SSL certificate.
  2. The JDK should not have the certificate imported.
  3. Run mvn clean package -U -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:install-node-and-npm (install node and npm) on project my-web-app:
Could not download Node.js: Could not download https://internalnexus/nexus/content/repositories/software/org/nodejs/node/v6.9.1/node-v6.9.1-linux-x64.tar.gz:
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

What is the expected behavior? Node is downloaded and installed.

Please mention your frontend-maven-plugin and operating system version. Frontend-Maven-Plugin v1.6 OS: RHEL 7.3

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:8
  • Comments:11

github_iconTop GitHub Comments

11reactions
patrickercommented, Nov 30, 2018

This is not an issue of the proxy not being properly identified. This happens when the corporate network is replacing all SSL certificates with their own. These certs are not trusted by default.

7reactions
senthilkumarselvakesavancommented, Nov 17, 2017

Hi all, I have the solution for this, It is working fine for me and the build got success. Don’t DO’s:

  1. please do not add any new entry in pom.xml like the below

        ` <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
          <npmDownloadRoot>http://registry.npmjs.org/npm/-/</npmDownloadRoot>`
    
  2. It will append extra line to the actual url to download nodejs and npm.

DO’s.

  1. please verify the URL return by maven logs in the browser.
  2. It should open the download path of nodejs
  3. you just add the network proxy in Maven’s settings.xml file <proxies> <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>username</username> <password>password</password> <host>xxx.xx.xx.xx</host> <port>*****</port>port number <proxy> <proxies> Note: your company’s network proxy and it’s host, username, password details.
  4. mvn clean install , it will be downloaded and install automatically … you can see the magic in Maven console.

I hope it will help you guys… 😃

Regards, Senthilkumar.S RENAULT NISSAN-CHENNAI

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node/NPM install does not respect ignoring SSL -
If the current behavior is a bug, please provide the steps to reproduce. 1. Load nodejs into a repository that is behind a...
Read more >
SSL Error: SELF_SIGNED_CERT_IN_CHAIN' while using ...
The error pops up once npm tries to resolve the 'https://registry.npmjs.org' URL. Is there anyway I can ignore the error or perhaps locate/add...
Read more >
npm ignore certificate | The Search Engine You Control
How to fix SSL certificate error when running Npm on Windows? ... eirslett/frontend-maven-pluginNode/NPM install does not respect ignoring SSL#664.
Read more >
Prevent npm install for not supported Node.js versions
The pull request's goal was to guarantee that users run the project with a specific Node.js version. You can do so by defining...
Read more >
@pact-foundation/pact-node - npm package | Snyk
All security vulnerabilities belong to production dependencies of direct and indirect packages. License: MIT. Security Policy: No.
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