[SOLVED] Blynk.js causes "Uncaught unspecified error event"

I’m attempting to setup Blynk for the first time using a Raspberry Pi 2 - Model B. I’m a complete novice at this stuff.

Here’s the error. I’ve hidden most of my auth token.

$ blynk.js 7da54…a7f2b
OnOff mode
Connecting to: blynk-cloud.com 8441
SSL authorization…
events.js:87
throw Error(‘Uncaught, unspecified “error” event.’);
^
Error: Uncaught, unspecified “error” event.
at Error (native)
at emit (events.js:87:13)
at Blynk.error (/usr/local/lib/node_modules/blynk-library/blynk.js:571:8)
at null. (/usr/local/lib/node_modules/blynk-library/blynk.js:534:48)
at emit (events.js:107:17)
at TLSSocket. (/usr/local/lib/node_modules/blynk-library/blynk-node.js:197:16)
at TLSSocket.emit (events.js:107:17)
at TLSSocket. (_tls_wrap.js:942:18)
at TLSSocket.emit (events.js:104:17)
at TLSSocket._finishInit (_tls_wrap.js:460:8)

It doesn’t appear to be a firewall issue or an issue connecting to the internet. I can telnet to the Blynk cloud server using:

$ telnet cloud.blynk.cc 8441
Trying 45.55.195.102…
Connected to cloud.blynk.cc.

I think I’m using current versions:

$ node -v
v0.12.6

$ npm -v
3.8.6

The SD Card is freshly formatted and a plain vanilla Raspbian was installed. After connecting to the Pi, I installed node.js according to these instructions: https://learn.adafruit.com/node-embedded-development/installing-node-dot-js

Then I ran:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
sudo npm install -g npm
sudo npm install -g onoff
sudo npm install -g blynk-library

This simple “hello world” node.js runs.

$ node hello.js
Node is installed!

Any suggestions on what I could try next?

1 Like

I have the exact same problem. Same version of node and npm.

I’m having the same problem. There are not many tutorials for the Raspberry pi and they all lead to the same error. Any help would be great for everyone in this thread. Sorry for not providing information to help. Just showing support for the error.

Error it got

OnOff mode Connecting to: blynk-cloud.com 8441 SSL authorization... events.js:87 throw Error('Uncaught, unspecified "error" event.'); ^ Error: Uncaught, unspecified "error" event. at Error (native) at emit (events.js:87:13) at Blynk.error (/usr/local/lib/node_modules/blynklibrary/blynk.js:571:8) at null.<anonymous> (/usr/local/lib/node_modules/blynk-library/blynk.js:534:48) at emit (events.js:107:17) at TLSSocket.<anonymous> (/usr/local/lib/node_modules/blynk-library/blynk-node.js:197:16) at TLSSocket.emit (events.js:107:17) at TLSSocket.<anonymous> (_tls_wrap.js:942:18) at TLSSocket.emit (events.js:104:17) at TLSSocket._finishInit (_tls_wrap.js:460:8)

After following this instrucatable for setting up blynk
And this instrucatble for the sensor data

@vshymanskyy do you know the reason?

Please let me re-check it…

Bump, Can you provide any insight on how to fix this error?

Bump, same here…

@vshymanskyy any update on this issue? Have you been able to duplicate the error? Is there anything we can do to help?

@jlonge, @jacktimble, @Monti55, @drice78
please update the library from npm - it should work now.

Thanks @vshymanskyy. That solves the issue for me.
In case there are other newbies like me, I used:

sudo npm update -g blynk-library