1

I am currently following some NodeJS & Deepstream.io.client-js tutorials. But an error occurs while trying to login to the server. I have no idea what that error means but here it is!

const express = require('express'),
  bodyParser = require('body-parser'),
  ds = require('deepstream.io-client-js'),
  app = express();

 // Create deepstream client
 const client = ds('wss://154.deepstreamhub.com?apiKey=xxx');
 client.login();  

The error I get :

 Error: connectionError: Error: self signed certificate in certificate chain (C)
at Client._$onError (C:\Users\xdidemk\Desktop\nodejs\node_modules\deepstream.io-client-js\dist\lib\client.js:204:11)
at Timeout._onTimeout (C:\Users\xdidemk\Desktop\nodejs\node_modules\deepstream.io-client-js\dist\lib\message\connect
 ion.js:315:19)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
2
  • Unable to help you myself here, but I'd recommend jumping into the deepstream Slack chat and asking there. Commented Aug 16, 2017 at 8:20
  • try connecting with ws protocol instead of wss, looks like the problem is in your ssl certificate also check ssl config variables in your config file, they should be set to null unless you have valid ssl certificate : sslKey: null sslCert: null sslCa: null Commented Sep 5, 2017 at 19:24

1 Answer 1

1

Have you tried adding this?

process.env.NODE_TLS_REJECT_UNAUTHORIZED='0'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.