Closed caracal7 closed 4 years ago
solve problem in Node.js by adding
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
But can't solve in browser
Solve problem with accepting self signed certificate in Chrome
Simply paste this in Chrome:
chrome://flags/#allow-insecure-localhost
Now the same console error like in Safari
ReferenceError: Can't find variable: Buffer
Next install Buffer polyfill
npm i buffer
and use it
import { DeepstreamClient } from '@deepstream/client';
window.Buffer = require('buffer').Buffer;
const client = new DeepstreamClient('wss://localhost:6020');
Bingo! can close the issue
P.S. everything is worked with "default" httpServer.
If I try uWS then browser client connect without problems but Node client get ECONNREFUSED
without text message
Interesting! I wonder why we need the buffer tho, should be bundled normally.
Thanks for mentioning the fix! Closing
deepstream.io server
. Browser client and NODE.js client is the same
Chrome console error
Safari console error
Node.js 12.4.0 error With uWS server
With default server