Unhandled error while trying to connect to local server (Raspberry Pi)

Hello, I was trying to set up Blynk on my Raspberry Pi. I did everything as shown in this video: (462) Blynk an LED on Raspberry Pi - YouTube, but when I execute the command node index.js it gives me this error:

pi@octopi:~/stampante $ node index.js

    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\

  Give Blynk a Github star! => https://github.com/vshymanskyy/blynk-library-js

OnOff mode
Connecting to: 8080
SSL authorization...
    throw err; // Unhandled 'error' event

Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('ECONNRESET')
    at Blynk.emit (events.js:187:17)
    at Blynk.error (/home/pi/stampante/node_modules/blynk-library/blynk.js:649:8)
    at exports.SslClient.<anonymous> (/home/pi/stampante/node_modules/blynk-library/blynk.js:612:48)
    at exports.SslClient.emit (events.js:198:13)
    at TLSSocket.<anonymous> (/home/pi/stampante/node_modules/blynk-library/blynk-node.js:223:16)
    at TLSSocket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)

This is my code:

var Blynk = require('blynk-library');
var Gpio = require('onoff').Gpio;
var led = new Gpio(18, 'out');


var blynk = new Blynk.Blynk(AUTH, options= {addr:"", port:8080});

var v0 = new blynk.VirtualPin(0);

v0.on('write', function(param) {

        if(param[0] == '1') {
        } else {

        console.log('V0:', param[0]);


When I change the port, for example in 8443 the SSL authorization fails. It only gives me this error when I put port 8080 (this is my local Blynk server). Any ideas on why this is happening?

I’m using a Raspberry Pi 3 A+, built in WiFi, local server, Blynk library version 0.5.4. Node version: 10.24.0, npm version: 5.8.0. I am on a Oneplus Nord. Thanks

Blynk local server uses 9443 for SSL.

What version of local server are you running?


The local server is on 0.41.15. It’s running on a Raspberry Pi 4 model B.
As for the port, 8443 was only an example; the autorization fails with every port, even 9443.