[qgis-qwc2] Error 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' for WMS url with https

Thomas Schüttenberg thomas at qgis.de
Wed Nov 3 03:18:20 PDT 2021


Hi there!

I'm currently struggling with compiling my https QGSI server into a new themes.json file ad I hope someone can give me a clue.

First of all, everything seems set up correctly[1], compiling the qwc-demo-app application bundle works and also a themes.json is created.

Now, my QGIS server for production (intranet), that I want to use in QWC, is configured to use ssl and does work e.g. in QGIS desktop. But when I put this wms url in themesConfig.json the compilation crashes with an error reading my WMS projectsettings:

 Error: unable to get local issuer certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
    at TLSSocket.emit (node:events:390:28)
    at TLSSocket._finishInit (node:_tls_wrap:944:8)
    at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12) {
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',

I tried this with my own WMS as well as a qgiscloud https-url with the same result.

Though I am not quite sure, if this is a QWC issue, or related to our corporate network or the node/yarn components, maybe some of you managed to use https-wms in themesConfig.json?

Btw, none of the solutions found on the web like 'yarn config set cafile "C:\path\to\cert.pem"' or (not recommended ) 'npm config set strict-ssl=false' did work for me. Also not sure, if the wanted cert is the same I included in my web-server configuration. 

Thankful for any hint, cheers
Thomas

[1] https://github.com/qgis/qwc2-demo-app/blob/master/doc/QWC2_Documentation.md#quick-start


More information about the qgis-qwc2 mailing list