i'm currently using sails.js and i deploy it in a2hosting shared hosting with turbo plan , i'm trying to connect to the sails socket in (ionic /angular) app i used the nodejs script for sails.io.js and socket.io.js from this documentation from here
and this is my configuration in my ionic app
this.io = sailsIOClient(socketIOClient);
this.io.sails.url = 'https://example.com/api';
this.io.sails.path = '/api';
this.io.sails.environment = 'production';
this.io.sails.useCORSRouteToGetCookie = false;
and every time trying to connect this errors appear
websocket.js:110 WebSocket connection to 'wss://example.com/api/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 404
any one can help me please ?
Related
I try to connect a socket-io with flutter. Before, our server-side developer give me an URL without SSL-Certificate and everything is worked. But now, our server has SSL-Certificate, I can't connect to that socket-io. This is my code to connect:
Socket socket = io(
'wss://server-address',
OptionBuilder()
.setTransports(['websocket'])
.disableAutoConnect()
.build());
socket.connect();
socket.onConnect((_) {
print('socket connect');
});
socket.onConnectError((data) => print('socket error = ' + data.toString()));
I get this error:
socket error = {msg: websocket error, desc: null, type: TransportError}
I try to deploy my web application on a secure host like firebase but still have problems. In inspect of firefox, I also see this error:
Firefox cant establish a connection to the server
How to fix this problem? How to connect to secure socket-io address in flutter web?
I want to use a web socket on Flutter.
I can easily connect to non-SSL API. But when connecting to an API with SSL get the following error.
WebSocketChannelException: WebSocketChannelException:
HandshakeException: Handshake error in client (OS Error:
WRONG_VERSION_NUMBER(tls_record.cc:242))
I tried using SecureSocket, but it doesn't allow adding parameters in SecureSocket.
We are getting below error while using Bluemix API Connect service. The same service was working fine few days back.
Error Message:
root request.py invoke_request: Response is: { "httpCode":"500", "httpMessage":"Internal Server Error", "moreInformation":"Failed to establish a backside connection" }
Thanks in advance.
I am writing a NodeJS application which is supposed to get deploymentstatuses from the Kubernetes API using the websocket transport layer.
For this I use the socket.io-client module and I connect with the following snippet:
var url = 'wss://myurl:8443?watch=true&access_token=myaccesstoken';
var socket = ioClient.connect(url, {
reconnect: true,
transports : ['websocket'],
path : "/api/v1/namespaces/mynamespace/replicationcontrollers",
secure : true,
rejectUnauthorized: false,
verify : false});
This however gives me an unexpected error, 403. Testing this in extensions like Websocket Client to Chrome works perfectly fine. Also I receive a 200 if I try a path with less sensetive data, but not an upgrade to websocket.
I read somewhere the Kubernetes API doesn't treat the WebSocket-protocol correctly, perhaps this is related? I have also tried with other more native libraries to Node such as websocket and ws with the same result.
When adding a ?watch=true in a Kubernetes API call, the request does not use WebSocket's but instead will stream / chunk the response over the HTTP connection.
I have a Meteor app hosted on Heroku and the problem is that the websocket handshake fails responding with a 400 status code.
From my understanding websockets should be supported on Heroku at this point.
What am I doing wrong?