How to fix SSL: CERTIFICATE_VERIFY_FAILED error on jupyter labextension install ... (behind proxy, npm works)

I have a corp artifactory set up that we have to go through in installing npm/yarn packages. Now I am able to npm install, but jupyter labextension install generates an SSL Cert error. I am looking for idea in configuration in how to fix this issue.

Yes, I have contact the team who supports artifactory in my company. Their position is:

  1. npm works
  2. Unless I can translate jupyter labextension install into a valid npm or yarn CLI command, they cannot help me.
    (Yes, if someone can provide this info, that would help too).

A. this works: npm

$ npm install @jupyter-widgets/jupyterlab-manage

B. this does not: jupyter install

$ jupyter labextension install @jupyter-widgets/jupyterlab-manager
Failed to fetch package metadata for ‘@jupyter-widgets/jupyterlab-manager’:
URLError(SSLError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)’),)
Building jupyterlab assets (production, minimized)

C. Turning on debug

$ jupyter labextension install @jupyter-widgets/jupyterlab-manager --debug

Fetching URL: https:://artifactory.trusted.acme.com/api/npm/@jupyter-widgets%2Fjupyterlab-manager
Failed to fetch package metadata for ‘@jupyter-widgets/jupyterlab-manager’:
URLError(SSLError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)’),)
Node v14.8.0

Thanks


Below are version and .npmrc and .yarnrc settings:
$ jupyter --version
jupyter core : 4.7.1
jupyter-notebook : 6.3.0
qtconsole : not installed
ipython : 6.1.0
ipykernel : 5.3.4
jupyter client : 6.1.12
jupyter lab : 3.0.14
nbconvert : 6.0.7
ipywidgets : not installed
nbformat : 5.1.3
traitlets : 4.3.3

$ jupyter labextension list
JupyterLab v3.0.14

$ cat ~/.npmrc
strict-ssl=false
registry=https://artifactory.trusted.acme.com/api/npm/dp-npm-virtual/
no-proxy=*.acme.com,localhost
_auth = Y2N…N2U=
email = dgreen@acme.com
always-auth=true

$ cat ~/.yarnrc
registry “https://artifactory.trusted.acme.com/api/npm/dp-npm-virtual
cafile “”
lastUpdateCheck 1606699330013
noproxy “*.acme.com,localhost”
strict-ssl false

This doesn’t fix the root cause, but it could be a workaround. JupyterLab 3 supports installation of extensions packaged as PyPI or conda packages, which has the additional benefit of not requiring a resource intensive build step when you install it.

It looks like jupyter-widgets supports this installation method:

@maniacs Thanks for the suggestion. Yes, this is one of the Jalb3 features that I am really excited about. It would make installation and conda env construction so much easier! (However, I reckon that it is goid to take a while to get to that point).
In my case, I actually have 5 or 6 labextension that I ran into this SSL: Certificate_verify_failed. I only listed one for simplicity here. So I am really looking for a solution that could fix the underlying root cause. Thanks again!