Skip to content

Instantly share code, notes, and snippets.

@royling
Last active September 21, 2021 21:23
Show Gist options
  • Save royling/b8281915a76792ba54626dcfe39ecf24 to your computer and use it in GitHub Desktop.
Save royling/b8281915a76792ba54626dcfe39ecf24 to your computer and use it in GitHub Desktop.
UNABLE_TO_GET_ISSUER_CERT_LOCALLY/"Error: unable to get local issuer certificate" with `webdriver-manager update`

With angular-cli, it helps create an angular2 app quickly. All required tools are provisioned in a simple command ng new, including Protractor - the end-to-end testing tool for angular.

To perform the testing, run ng e2e. It will first run webdriver-manager update to download & install webdrivers, see pree2e script in package.json. However, the below error may be encountered if you are in a corporate network:

[15:10:59] E/downloader - { Error: unable to get local issuer certificate
    at Error (native)
    at TLSSocket.<anonymous> (_tls_wrap.js:1060:38)
    at emitNone (events.js:86:13)
    at TLSSocket.emit (events.js:185:7)
    at TLSSocket._finishInit (_tls_wrap.js:584:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38) code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' }

To workaround the issue, change pree2e script to webdriver-manager update --ignore_ssl=true. Hope this helps you. Happy coding!

@knlykos
Copy link

knlykos commented Sep 21, 2021

It works perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment