skydiver / ewelink-api

eWeLink API for JavaScript
https://www.npmjs.com/package/ewelink-api
MIT License
264 stars 108 forks source link

unable to get local issuer certificate #159

Open airbone42 opened 2 years ago

airbone42 commented 2 years ago

Hi,

I'm trying to use this handy package, but always end up with following certificate error. As the data is anyway not sensitive, is it possible to bypass the certificate-check?

{ FetchError: request to https://eu-api.coolkit.cc:8080/api/user/login failed, reason: unable to get local issuer certificate
    at ClientRequest.<anonymous> (/openhab/userdata/scripts/watertemperature/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:198:13)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at TLSSocket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  message:
   'request to https://eu-api.coolkit.cc:8080/api/user/login failed, reason: unable to get local issuer certificate',
  type: 'system',
  errno: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' }