How to get NET errors in Javascript - javascript

When using WebSocket to open my wss I sometimes see in the browser console ...
foo.js:557 WebSocket connection to 'wss://:9002/changes' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
Other times I see...
WebSocket connection to 'wss://:9002/changes' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
However, in either case the onclose event is code 1006. Is there anyway in JavaScript I can differentiate between the invalid certificate and the down connection?

Related

What is error net::ERR_CONNECTION_REFUSED?

Failed to load resource:
net::ERR_CONNECTION_REFUSED?
It means exactly what it says.
You tried to connect to something over the network. The system you were connecting to refused to accept the connection.
Usually this is because there isn't a service listening on the port you tried to connect to. Sometimes the connection is blocked by a firewall.

How to connect SSL websocket with mqtt?

I created a self signed certificate and I've been working on the mqtt websockets over SSL/TSL, however I'm unsure exactly where I made an error. On my terminal websocket is open and sends out CONNACK/SUBSCRIBE/PUBLISH etc...
However when I opened up my chrome console log, I got an error saying that
"websocket connection to 'wss:.//hostname:9001/mqtt' failed: Error in connection establishment: net: ERR_CERT_AUTHORITY_INVALID
My time is synchronised correctly, and I'm either thinking my certificate has an error or chrome doesn't accept it but if my certificate error, wouldn't it have given an error when I first tried it on regular mosquitto_sub?
Any tips?
Thank you

Nodemailer Error that may be result of port error?

I'm using Nodemailer and I get an error that I can't seem to solve. Some sites say it's my firewall blocking ports, I opened the ports and used different ports, didn't solve much.
Below are logs of the errors Nodemailer emitted.
[2020-10-07 03:38:23] DEBUG Creating transport: nodemailer (6.4.13; +https://nodemailer.com/; SMTP/6.4.13[client:6.4.13])
[2020-10-07 03:38:23] DEBUG Sending mail using SMTP/6.4.13[client:6.4.13]
[2020-10-07 03:38:23] DEBUG [TNYM4ZexJbo] Resolved smtp.mailtrap.io as 34.224.73.100 [cache miss]
[2020-10-07 03:38:44] ERROR [TNYM4ZexJbo] connect EACCES 34.224.73.100:25
[2020-10-07 03:38:44] DEBUG [TNYM4ZexJbo] Closing connection to the server using "destroy"
[2020-10-07 03:38:44] ERROR Send Error: connect EACCES 34.224.73.100:25

Coldfusion websocket cant create a websocket handshake while changing ws to wss protocol

Coldfusion websocket (using cfwebsocket with secure attribute true) cant create a websocket handshake, I am getting a connection refused error. To make websocket secure I followed these steps but I am getting
Error in connection establishment: net::ERR_CONNECTION_REFUSED in network WS tab
Administrator. Administrator console > Server Setting > WebSocket: Enabled SSL Port
Added secure attribute true for cfwebsocket tag

signalR Disconnect in client browser after a while

I am using SignalR in asp.net core and it work correctly in visual studio but when i publish it to iis an when connect to server after a while signalR disconnect and browser show blow errors:
[2019-09-24T18:46:05.446Z] Error: Connection disconnected with error 'Error: Error occurred'.
Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
signalr.js:2678 [2019-09-24T18:46:05.711Z] Error: Connection disconnected with error 'Error: Error occurred'.
Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
signalr.js:2678 [2019-09-24T18:46:05.713Z] Error: Connection disconnected with error 'Error: Error occurred'.
Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
Normally signalr have connection time out so you need to let signalr know you want to have long polling connection by setting this in your code
connection.start({ transport: 'longPolling' });

Categories